microsoft / deck
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
htaccess
slim
dockerignore
gitattributes
editorconfig
adoc
npmrc
babelrc
properties
  • 26 extensions are included in analyses: js, html, ts, less, tsx, svg, json, sh, css, md, gradle, txt, htaccess, slim, dockerignore, gitattributes, bat, editorconfig, yml, adoc, npmrc, yaml, babelrc, gitignore, toml, properties
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/angular([^.]*)\.js" (AngularJS) (1 file).
    • exclude files with path like ".*/cache/.*" (Caches) (20 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (2 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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) (1 file).
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.

main117572 LOC (83%) 2151 files
test22330 LOC (15%) 239 files
generated0 LOC (0%) 0 files
build and deployment395 LOC (<1%) 11 files
other629 LOC (<1%) 18 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
slim
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2151 files match defined criteria (117,572 lines of code, 100.0% vs. main code):
    • 838 *.js files (50,570 lines of code)
    • 765 *.html files (34,574 lines of code)
    • 398 *.ts files (23,850 lines of code)
    • 120 *.less files (7,310 lines of code)
    • 26 *.tsx files (1,108 lines of code)
    • 2 *.css files (143 lines of code)
    • 1 *.yaml files (11 lines of code)
    • 1 *.slim files (6 lines of code)
  • " *.js" is biggest, containing 43.01% of code.
  • " *.slim" is smallest, containing 0.01% of code.


*.js50570 LOC (43%) 838 files
*.html34574 LOC (29%) 765 files
*.ts23850 LOC (20%) 398 files
*.less7310 LOC (6%) 120 files
*.tsx1108 LOC (<1%) 26 files
*.css143 LOC (<1%) 2 files
*.yaml11 LOC (<1%) 1 files
*.slim6 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 ".*[.]spec[.]js".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 239 files match defined criteria (22,330 lines of code, 19.0% vs. main code):
    • 171 *.js files (14,027 lines of code)
    • 67 *.ts files (8,299 lines of code)
    • 1 *.sh files (4 lines of code)
  • " *.js" is biggest, containing 62.82% of code.
  • " *.sh" is smallest, containing 0.02% of code.


*.js14027 LOC (62%) 171 files
*.ts8299 LOC (37%) 67 files
*.sh4 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 ".*/package[.]json".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 11 files match defined criteria (395 lines of code, 0.3% vs. main code):
    • 2 *.js files (139 lines of code)
    • 6 *.sh files (104 lines of code)
    • 2 *.gradle files (86 lines of code)
    • 1 *.bat files (66 lines of code)
  • " *.js" is biggest, containing 35.19% of code.
  • " *.bat" is smallest, containing 16.71% of code.


*.js139 LOC (35%) 2 files
*.sh104 LOC (26%) 6 files
*.gradle86 LOC (21%) 2 files
*.bat66 LOC (16%) 1 files
Other Code
adoc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]htaccess".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]properties".
  • 18 files match defined criteria (629 lines of code, 0.5% vs. main code):
    • 8 *.json files (341 lines of code)
    • 8 *.svg files (247 lines of code)
    • 1 *.adoc files (37 lines of code)
    • 1 *.md files (4 lines of code)
  • " *.json" is biggest, containing 54.21% of code.
  • " *.md" is smallest, containing 0.64% of code.


*.json341 LOC (54%) 8 files
*.svg247 LOC (39%) 8 files
*.adoc37 LOC (5%) 1 files
*.md4 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
  • *.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
  • *.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
  • *.less files are analyzed with LessAnalyzer:
    • 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
  • *.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
  • *.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
  • *.slim 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


2022-01-30 11:19