microsoft / ELL
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
txt
i
in
cmake
cmd
ll
gitattributes
editorconfig
cfg
clang-format
xslt
gyp
  • 29 extensions are included in analyses: h, cpp, py, md, txt, i, in, js, html, cmake, cmd, sh, yml, json, inc, gitignore, scss, bat, ts, ll, css, gitattributes, editorconfig, yaml, svg, cfg, clang-format, xslt, gyp
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (138 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (2 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) (90 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.

main128010 LOC (74%) 906 files
test40345 LOC (23%) 314 files
generated0 LOC (0%) 0 files
build and deployment173 LOC (<1%) 7 files
other3097 LOC (1%) 50 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
i
in
cmake
cmd
xslt
gyp
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 906 files match defined criteria (128,010 lines of code, 100.0% vs. main code):
    • 280 *.cpp files (59,301 lines of code)
    • 436 *.h files (48,097 lines of code)
    • 105 *.py files (16,089 lines of code)
    • 42 *.i files (2,091 lines of code)
    • 18 *.in files (798 lines of code)
    • 8 *.cmake files (561 lines of code)
    • 8 *.cmd files (402 lines of code)
    • 1 *.xslt files (326 lines of code)
    • 1 *.gyp files (177 lines of code)
    • 4 *.yml files (123 lines of code)
    • 2 *.js files (25 lines of code)
    • 1 *.yaml files (20 lines of code)
  • " *.cpp" is biggest, containing 46.33% of code.
  • " *.yaml" is smallest, containing 0.02% of code.


*.cpp59301 LOC (46%) 280 files
*.h48097 LOC (37%) 436 files
*.py16089 LOC (12%) 105 files
*.i2091 LOC (1%) 42 files
*.in798 LOC (<1%) 18 files
*.cmake561 LOC (<1%) 8 files
*.cmd402 LOC (<1%) 8 files
*.xslt326 LOC (<1%) 1 files
*.gyp177 LOC (<1%) 1 files
*.yml123 LOC (<1%) 4 files
*.js25 LOC (<1%) 2 files
*.yaml20 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
ll
cfg
cmake
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 314 files match defined criteria (40,345 lines of code, 31.5% vs. main code):
    • 136 *.cpp files (28,972 lines of code)
    • 127 *.h files (6,400 lines of code)
    • 36 *.py files (3,958 lines of code)
    • 4 *.inc files (631 lines of code)
    • 4 *.js files (157 lines of code)
    • 2 *.in files (86 lines of code)
    • 1 *.ll files (57 lines of code)
    • 1 *.cfg files (36 lines of code)
    • 1 *.cmake files (23 lines of code)
    • 1 *.sh files (13 lines of code)
    • 1 *.cmd files (12 lines of code)
  • " *.cpp" is biggest, containing 71.81% of code.
  • " *.cmd" is smallest, containing 0.03% of code.


*.cpp28972 LOC (71%) 136 files
*.h6400 LOC (15%) 127 files
*.py3958 LOC (9%) 36 files
*.inc631 LOC (1%) 4 files
*.js157 LOC (<1%) 4 files
*.in86 LOC (<1%) 2 files
*.ll57 LOC (<1%) 1 files
*.cfg36 LOC (<1%) 1 files
*.cmake23 LOC (<1%) 1 files
*.sh13 LOC (<1%) 1 files
*.cmd12 LOC (<1%) 1 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
  • 7 files match defined criteria (173 lines of code, 0.1% vs. main code):
    • 6 *.sh files (171 lines of code)
    • 1 *.bat files (2 lines of code)
  • " *.sh" is biggest, containing 98.84% of code.
  • " *.bat" is smallest, containing 1.16% of code.


*.sh171 LOC (98%) 6 files
*.bat2 LOC (1%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
  • 50 files match defined criteria (3,097 lines of code, 2.4% vs. main code):
    • 42 *.md files (2,947 lines of code)
    • 4 *.json files (87 lines of code)
    • 2 *.py files (61 lines of code)
    • 1 *.bat files (1 lines of code)
    • 1 *.sh files (1 lines of code)
  • " *.md" is biggest, containing 95.16% of code.
  • " *.sh" is smallest, containing 0.03% of code.


*.md2947 LOC (95%) 42 files
*.json87 LOC (2%) 4 files
*.py61 LOC (1%) 2 files
*.bat1 LOC (<1%) 1 files
*.sh1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.i 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
  • *.in files are analyzed with RustAnalyzer:
    • 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
  • *.cmake 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
  • *.cmd 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
  • *.xslt files are analyzed with XmlAnalyzer:
    • 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
  • *.gyp files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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
  • *.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


2022-01-30 14:00