microsoft / DLWorkspace
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
cshtml
txt
editorconfig
wsgi
dockerignore
htaccess
cfg
csproj
pub
  • 26 extensions are included in analyses: py, sh, js, tsx, md, yaml, json, cs, ts, cshtml, css, yml, txt, gitignore, svg, xml, editorconfig, wsgi, dockerignore, html, htaccess, cpp, cfg, go, csproj, pub
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (24 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (60 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (3 files).
    • exclude files with path like ".*/angular([^.]*)\.js" (AngularJS) (1 file).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • 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) (6 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.

main238162 LOC (86%) 442 files
test8848 LOC (3%) 62 files
generated0 LOC (0%) 0 files
build and deployment3137 LOC (1%) 137 files
other25226 LOC (9%) 90 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cshtml
cfg
wsgi
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 442 files match defined criteria (238,162 lines of code, 100.0% vs. main code):
    • 54 *.js files (181,951 lines of code)
    • 137 *.py files (30,640 lines of code)
    • 99 *.tsx files (9,671 lines of code)
    • 65 *.yaml files (3,916 lines of code)
    • 25 *.cs files (3,883 lines of code)
    • 3 *.css files (3,229 lines of code)
    • 17 *.cshtml files (2,956 lines of code)
    • 11 *.yml files (767 lines of code)
    • 24 *.ts files (761 lines of code)
    • 2 *.html files (178 lines of code)
    • 1 *.cpp files (84 lines of code)
    • 1 *.go files (73 lines of code)
    • 1 *.cfg files (46 lines of code)
    • 2 *.wsgi files (7 lines of code)
  • " *.js" is biggest, containing 76.4% of code.
  • " *.wsgi" is smallest, containing 0% of code.


*.js181951 LOC (76%) 54 files
*.py30640 LOC (12%) 137 files
*.tsx9671 LOC (4%) 99 files
*.yaml3916 LOC (1%) 65 files
*.cs3883 LOC (1%) 25 files
*.css3229 LOC (1%) 3 files
*.cshtml2956 LOC (1%) 17 files
*.yml767 LOC (<1%) 11 files
*.ts761 LOC (<1%) 24 files
*.html178 LOC (<1%) 2 files
*.cpp84 LOC (<1%) 1 files
*.go73 LOC (<1%) 1 files
*.cfg46 LOC (<1%) 1 files
*.wsgi7 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pub
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 ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*/mock[-].*".
  • 62 files match defined criteria (8,848 lines of code, 3.7% vs. main code):
    • 41 *.py files (7,720 lines of code)
    • 18 *.js files (1,089 lines of code)
    • 2 *.yaml files (38 lines of code)
    • 1 *.pub files (1 lines of code)
  • " *.py" is biggest, containing 87.25% of code.
  • " *.pub" is smallest, containing 0.01% of code.


*.py7720 LOC (87%) 41 files
*.js1089 LOC (12%) 18 files
*.yaml38 LOC (<1%) 2 files
*.pub1 LOC (<1%) 1 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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
  • 137 files match defined criteria (3,137 lines of code, 1.3% vs. main code):
    • 136 *.sh files (3,076 lines of code)
    • 1 *.csproj files (61 lines of code)
  • " *.sh" is biggest, containing 98.06% of code.
  • " *.csproj" is smallest, containing 1.94% of code.


*.sh3076 LOC (98%) 136 files
*.csproj61 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 ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]htaccess".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 90 files match defined criteria (25,226 lines of code, 10.6% vs. main code):
    • 60 *.json files (23,611 lines of code)
    • 4 *.xml files (1,254 lines of code)
    • 25 *.md files (183 lines of code)
    • 1 *.svg files (178 lines of code)
  • " *.json" is biggest, containing 93.6% of code.
  • " *.svg" is smallest, containing 0.71% of code.


*.json23611 LOC (93%) 60 files
*.xml1254 LOC (4%) 4 files
*.md183 LOC (<1%) 25 files
*.svg178 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.wsgi 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


2022-01-30 14:24