microsoft / fast
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
npmrc
eslintignore
prettierignore
npmignore
razor
ejs
gitattributes
webapp
ini
txt
vscodeignore
csproj
  • 26 extensions are included in analyses: ts, json, md, js, html, tsx, svg, sh, css, npmrc, gitignore, eslintignore, prettierignore, yml, npmignore, razor, ejs, gitattributes, webapp, xml, ini, cjs, cs, txt, vscodeignore, csproj
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (116 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (44 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (13 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 ".*[.]txt" (Text files) (0 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.

main461525 LOC (86%) 789 files
test23797 LOC (4%) 133 files
generated0 LOC (0%) 0 files
build and deployment1469 LOC (<1%) 30 files
other44232 LOC (8%) 469 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ejs
webapp
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 789 files match defined criteria (461,525 lines of code, 100.0% vs. main code):
    • 633 *.ts files (448,760 lines of code)
    • 65 *.html files (6,200 lines of code)
    • 25 *.tsx files (2,978 lines of code)
    • 50 *.js files (2,609 lines of code)
    • 12 *.css files (714 lines of code)
    • 3 *.ejs files (250 lines of code)
    • 1 *.webapp files (14 lines of code)
  • " *.ts" is biggest, containing 97.23% of code.
  • " *.webapp" is smallest, containing 0% of code.


*.ts448760 LOC (97%) 633 files
*.html6200 LOC (1%) 65 files
*.tsx2978 LOC (<1%) 25 files
*.js2609 LOC (<1%) 50 files
*.css714 LOC (<1%) 12 files
*.ejs250 LOC (<1%) 3 files
*.webapp14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*__test__.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 133 files match defined criteria (23,797 lines of code, 5.2% vs. main code):
    • 122 *.ts files (22,797 lines of code)
    • 9 *.js files (976 lines of code)
    • 2 *.html files (24 lines of code)
  • " *.ts" is biggest, containing 95.8% of code.
  • " *.html" is smallest, containing 0.1% of code.


*.ts22797 LOC (95%) 122 files
*.js976 LOC (4%) 9 files
*.html24 LOC (<1%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 30 files match defined criteria (1,469 lines of code, 0.3% vs. main code):
    • 20 *.sh files (880 lines of code)
    • 10 *.js files (589 lines of code)
  • " *.sh" is biggest, containing 59.9% of code.
  • " *.js" is smallest, containing 40.1% of code.


*.sh880 LOC (59%) 20 files
*.js589 LOC (40%) 10 files
Other Code
razor
csproj
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 469 files match defined criteria (44,232 lines of code, 9.6% vs. main code):
    • 235 *.json files (26,377 lines of code)
    • 175 *.md files (13,479 lines of code)
    • 5 *.css files (1,421 lines of code)
    • 6 *.html files (898 lines of code)
    • 17 *.svg files (754 lines of code)
    • 14 *.ts files (581 lines of code)
    • 2 *.tsx files (376 lines of code)
    • 7 *.razor files (181 lines of code)
    • 4 *.js files (112 lines of code)
    • 1 *.cs files (22 lines of code)
    • 1 *.xml files (12 lines of code)
    • 1 *.csproj files (10 lines of code)
    • 1 *.ini files (9 lines of code)
  • " *.json" is biggest, containing 59.63% of code.
  • " *.ini" is smallest, containing 0.02% of code.


*.json26377 LOC (59%) 235 files
*.md13479 LOC (30%) 175 files
*.css1421 LOC (3%) 5 files
*.html898 LOC (2%) 6 files
*.svg754 LOC (1%) 17 files
*.ts581 LOC (1%) 14 files
*.tsx376 LOC (<1%) 2 files
*.razor181 LOC (<1%) 7 files
*.js112 LOC (<1%) 4 files
*.cs22 LOC (<1%) 1 files
*.xml12 LOC (<1%) 1 files
*.csproj10 LOC (<1%) 1 files
*.ini9 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.ejs 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
  • *.webapp files are analyzed with JsonAnalyzer:
    • 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 15:48