microsoft / SandDance
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
gitattributes
vscodeignore
hbs
npmignore
ini
cfg
  • 24 extensions are included in analyses: html, ts, json, md, scss, js, tsx, css, gitignore, py, txt, gitattributes, yml, svg, vscodeignore, hbs, npmignore, vue, bat, sh, ipynb, ini, cfg, less
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (34 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (558 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (2 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (0 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (14 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (5 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) (2 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.

main21428 LOC (11%) 276 files
test1611 LOC (<1%) 27 files
generated83406 LOC (43%) 21 files
build and deployment190 LOC (<1%) 5 files
other85618 LOC (44%) 88 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hbs
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 276 files match defined criteria (21,428 lines of code, 100.0% vs. main code):
    • 178 *.ts files (12,070 lines of code)
    • 45 *.tsx files (7,414 lines of code)
    • 20 *.scss files (963 lines of code)
    • 7 *.py files (531 lines of code)
    • 19 *.js files (265 lines of code)
    • 1 *.less files (66 lines of code)
    • 2 *.hbs files (56 lines of code)
    • 1 *.yml files (42 lines of code)
    • 1 *.css files (12 lines of code)
    • 1 *.cfg files (5 lines of code)
    • 1 *.vue files (4 lines of code)
  • " *.ts" is biggest, containing 56.33% of code.
  • " *.vue" is smallest, containing 0.02% of code.


*.ts12070 LOC (56%) 178 files
*.tsx7414 LOC (34%) 45 files
*.scss963 LOC (4%) 20 files
*.py531 LOC (2%) 7 files
*.js265 LOC (1%) 19 files
*.less66 LOC (<1%) 1 files
*.hbs56 LOC (<1%) 2 files
*.yml42 LOC (<1%) 1 files
*.css12 LOC (<1%) 1 files
*.cfg5 LOC (<1%) 1 files
*.vue4 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 27 files match defined criteria (1,611 lines of code, 7.5% vs. main code):
    • 12 *.ts files (696 lines of code)
    • 3 *.js files (403 lines of code)
    • 6 *.html files (384 lines of code)
    • 2 *.css files (84 lines of code)
    • 4 *.py files (44 lines of code)
  • " *.ts" is biggest, containing 43.2% of code.
  • " *.py" is smallest, containing 2.73% of code.


*.ts696 LOC (43%) 12 files
*.js403 LOC (25%) 3 files
*.html384 LOC (23%) 6 files
*.css84 LOC (5%) 2 files
*.py44 LOC (2%) 4 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
  • 21 files match defined criteria (83,406 lines of code, 389.2% vs. main code). All matches are in *.json files.


*.json83406 LOC (100%) 21 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 ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 5 files match defined criteria (190 lines of code, 0.9% vs. main code):
    • 3 *.js files (134 lines of code)
    • 1 *.bat files (28 lines of code)
    • 1 *.sh files (28 lines of code)
  • " *.js" is biggest, containing 70.53% of code.
  • " *.sh" is smallest, containing 14.74% of code.


*.js134 LOC (70%) 3 files
*.bat28 LOC (14%) 1 files
*.sh28 LOC (14%) 1 files
Other Code
ini
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 ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 88 files match defined criteria (85,618 lines of code, 399.6% vs. main code):
    • 67 *.json files (84,798 lines of code)
    • 19 *.md files (721 lines of code)
    • 1 *.ipynb files (94 lines of code)
    • 1 *.ini files (5 lines of code)
  • " *.json" is biggest, containing 99.04% of code.
  • " *.ini" is smallest, containing 0.01% of code.


*.json84798 LOC (99%) 67 files
*.md721 LOC (<1%) 19 files
*.ipynb94 LOC (<1%) 1 files
*.ini5 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
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.vue 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


2022-01-30 22:25