microsoft / IgniteTheTour
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
csproj
dockerignore
txt
cshtml
editorconfig
tpl
dbc
prettierignore
  • 25 extensions are included in analyses: cs, sh, json, js, md, Dockerfile, yaml, gitignore, csproj, html, ps1, css, dockerignore, txt, yml, cshtml, editorconfig, tpl, svg, sql, MD, vue, dbc, rb, prettierignore
  • 12 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (79 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (1 file).
    • exclude files with path like ".*/dist/.*" (Distributions) (6 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*/jquery([^.]*)\.validate(\.unobtrusive)?\.js" (jQuery validation plugin (MS bundles this with asp.net mvc)) (0 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (10 files).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main13355 LOC (5%) 342 files
test456 LOC (<1%) 8 files
generated104717 LOC (41%) 19 files
build and deployment3595 LOC (1%) 156 files
other127388 LOC (51%) 346 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cshtml
tpl
dbc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 342 files match defined criteria (13,355 lines of code, 100.0% vs. main code):
    • 138 *.cs files (5,113 lines of code)
    • 85 *.js files (4,520 lines of code)
    • 6 *.css files (1,094 lines of code)
    • 35 *.yaml files (719 lines of code)
    • 12 *.html files (397 lines of code)
    • 15 *.ps1 files (326 lines of code)
    • 9 *.cshtml files (290 lines of code)
    • 2 *.vue files (243 lines of code)
    • 24 *.dockerfile files (216 lines of code)
    • 3 *.md files (129 lines of code)
    • 6 *.yml files (118 lines of code)
    • 6 *.tpl files (102 lines of code)
    • 1 *.dbc files (88 lines of code)
  • " *.cs" is biggest, containing 38.29% of code.
  • " *.dbc" is smallest, containing 0.66% of code.


*.cs5113 LOC (38%) 138 files
*.js4520 LOC (33%) 85 files
*.css1094 LOC (8%) 6 files
*.yaml719 LOC (5%) 35 files
*.html397 LOC (2%) 12 files
*.ps1326 LOC (2%) 15 files
*.cshtml290 LOC (2%) 9 files
*.vue243 LOC (1%) 2 files
*.dockerfile216 LOC (1%) 24 files
*.md129 LOC (<1%) 3 files
*.yml118 LOC (<1%) 6 files
*.tpl102 LOC (<1%) 6 files
*.dbc88 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 8 files match defined criteria (456 lines of code, 3.4% vs. main code):
    • 4 *.cs files (396 lines of code)
    • 4 *.csproj files (60 lines of code)
  • " *.cs" is biggest, containing 86.84% of code.
  • " *.csproj" is smallest, containing 13.16% of code.


*.cs396 LOC (86%) 4 files
*.csproj60 LOC (13%) 4 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
  • 19 files match defined criteria (104,717 lines of code, 784.1% vs. main code). All matches are in *.json files.


*.json104717 LOC (100%) 19 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
  • 156 files match defined criteria (3,595 lines of code, 26.9% vs. main code):
    • 140 *.sh files (3,358 lines of code)
    • 16 *.csproj files (237 lines of code)
  • " *.sh" is biggest, containing 93.41% of code.
  • " *.csproj" is smallest, containing 6.59% of code.


*.sh3358 LOC (93%) 140 files
*.csproj237 LOC (6%) 16 files
Other Code
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 346 files match defined criteria (127,388 lines of code, 953.9% vs. main code):
    • 109 *.json files (115,690 lines of code)
    • 86 *.md files (5,683 lines of code)
    • 64 *.cs files (2,381 lines of code)
    • 36 *.js files (2,067 lines of code)
    • 3 *.css files (510 lines of code)
    • 3 *.sql files (206 lines of code)
    • 6 *.html files (180 lines of code)
    • 18 *.dockerfile files (162 lines of code)
    • 9 *.sh files (142 lines of code)
    • 4 *.yml files (137 lines of code)
    • 6 *.csproj files (99 lines of code)
    • 1 *.ps1 files (86 lines of code)
    • 1 *.rb files (45 lines of code)
  • " *.json" is biggest, containing 90.82% of code.
  • " *.rb" is smallest, containing 0.04% of code.


*.json115690 LOC (90%) 109 files
*.md5683 LOC (4%) 86 files
*.cs2381 LOC (1%) 64 files
*.js2067 LOC (1%) 36 files
*.css510 LOC (<1%) 3 files
*.sql206 LOC (<1%) 3 files
*.html180 LOC (<1%) 6 files
*.dockerfile162 LOC (<1%) 18 files
*.sh142 LOC (<1%) 9 files
*.yml137 LOC (<1%) 4 files
*.csproj99 LOC (<1%) 6 files
*.ps186 LOC (<1%) 1 files
*.rb45 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis (based on namespace heuristics)
  • *.js files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.css files are analyzed with CssAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.ps1 files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.cshtml files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.vue files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.dockerfile files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.md files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.tpl files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.dbc files are analyzed with DbcAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-30 22:27