microsoft / tsdoc
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
snap
npmrc
npmignore
gitattributes
txt
hbs
eslintignore
prettierignore
  • 16 extensions are included in analyses: ts, json, snap, js, md, tsx, yaml, npmrc, npmignore, css, gitignore, gitattributes, txt, hbs, eslintignore, prettierignore
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (23 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.

main20132 LOC (47%) 96 files
test17115 LOC (40%) 37 files
generated0 LOC (0%) 0 files
build and deployment147 LOC (<1%) 3 files
other5032 LOC (11%) 80 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hbs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 96 files match defined criteria (20,132 lines of code, 100.0% vs. main code):
    • 7 *.yaml files (9,685 lines of code)
    • 73 *.ts files (8,810 lines of code)
    • 9 *.tsx files (1,028 lines of code)
    • 4 *.js files (462 lines of code)
    • 1 *.hbs files (92 lines of code)
    • 2 *.css files (55 lines of code)
  • " *.yaml" is biggest, containing 48.11% of code.
  • " *.css" is smallest, containing 0.27% of code.


*.yaml9685 LOC (48%) 7 files
*.ts8810 LOC (43%) 73 files
*.tsx1028 LOC (5%) 9 files
*.js462 LOC (2%) 4 files
*.hbs92 LOC (<1%) 1 files
*.css55 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]snap".
    • files with any line of content like ".*/simpletest/.*".
  • 37 files match defined criteria (17,115 lines of code, 85.0% vs. main code):
    • 15 *.snap files (14,707 lines of code)
    • 22 *.ts files (2,408 lines of code)
  • " *.snap" is biggest, containing 85.93% of code.
  • " *.ts" is smallest, containing 14.07% of code.


*.snap14707 LOC (85%) 15 files
*.ts2408 LOC (14%) 22 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 ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 3 files match defined criteria (147 lines of code, 0.7% vs. main code). All matches are in *.js files.


*.js147 LOC (100%) 3 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
  • 80 files match defined criteria (5,032 lines of code, 25.0% vs. main code):
    • 67 *.json files (3,144 lines of code)
    • 9 *.md files (1,879 lines of code)
    • 4 *.ts files (9 lines of code)
  • " *.json" is biggest, containing 62.48% of code.
  • " *.ts" is smallest, containing 0.18% of code.


*.json3144 LOC (62%) 67 files
*.md1879 LOC (37%) 9 files
*.ts9 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.hbs 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
  • *.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


2022-01-30 15:48