microsoft / vscode
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
vscodeignore
txt
cmd
plist
npmignore
pug
gitattributes
desktop
coffee
iss
handlebars
editorconfig
tex
diff
hbs
sty
eslintignore
shader
jl
fs
ini
hlsl
cshtml
lua
bib
  • 66 extensions are included in analyses: ts, json, js, css, vscodeignore, txt, svg, md, html, yml, sh, gitignore, bat, ps1, cmd, xml, yaml, cpp, scss, less, plist, php, npmignore, pug, py, rs, gitattributes, desktop, go, coffee, pl, iss, java, handlebars, editorconfig, ipynb, swift, clj, mm, tex, diff, vb, rb, groovy, hbs, sty, eslintignore, shader, jl, fs, jsx, sql, dart, tsx, cc, c, ini, hlsl, m, cshtml, cs, Dockerfile, cu, r, lua, bib
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (199 files).
    • exclude files with path like ".*/cache/.*" (Caches) (0 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (102 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (12 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (3 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (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) (68 files).
    • exclude files with path like ".*/bundle[.]js" (JS library) (1 file).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (4 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.

main631299 LOC (57%) 3159 files
test201323 LOC (18%) 912 files
generated1834 LOC (<1%) 1 files
build and deployment1895 LOC (<1%) 89 files
other259149 LOC (23%) 663 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
iss
desktop
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3159 files match defined criteria (631,299 lines of code, 100.0% vs. main code):
    • 2,799 *.ts files (595,785 lines of code)
    • 134 *.js files (16,485 lines of code)
    • 184 *.css files (14,744 lines of code)
    • 16 *.yml files (2,240 lines of code)
    • 1 *.iss files (1,299 lines of code)
    • 13 *.html files (413 lines of code)
    • 7 *.ps1 files (230 lines of code)
    • 1 *.yaml files (62 lines of code)
    • 2 *.desktop files (29 lines of code)
    • 2 *.cmd files (12 lines of code)
  • " *.ts" is biggest, containing 94.37% of code.
  • " *.cmd" is smallest, containing 0% of code.


*.ts595785 LOC (94%) 2799 files
*.js16485 LOC (2%) 134 files
*.css14744 LOC (2%) 184 files
*.yml2240 LOC (<1%) 16 files
*.iss1299 LOC (<1%) 1 files
*.html413 LOC (<1%) 13 files
*.ps1230 LOC (<1%) 7 files
*.yaml62 LOC (<1%) 1 files
*.desktop29 LOC (<1%) 2 files
*.cmd12 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cshtml
coffee
pug
handlebars
jl
hbs
bib
sty
tex
shader
fs
hlsl
lua
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]tests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 912 files match defined criteria (201,323 lines of code, 31.9% vs. main code):
    • 751 *.ts files (181,069 lines of code)
    • 53 *.js files (14,348 lines of code)
    • 28 *.html files (4,094 lines of code)
    • 16 *.css files (304 lines of code)
    • 4 *.scss files (264 lines of code)
    • 1 *.cu files (113 lines of code)
    • 1 *.groovy files (106 lines of code)
    • 2 *.py files (77 lines of code)
    • 5 *.cpp files (55 lines of code)
    • 2 *.pl files (55 lines of code)
    • 4 *.less files (51 lines of code)
    • 3 *.php files (43 lines of code)
    • 2 *.ps1 files (38 lines of code)
    • 1 *.clj files (38 lines of code)
    • 1 *.cshtml files (38 lines of code)
    • 1 *.mm files (33 lines of code)
    • 1 *.m files (33 lines of code)
    • 4 *.yaml files (32 lines of code)
    • 2 *.coffee files (32 lines of code)
    • 2 *.rs files (31 lines of code)
    • 1 *.jsx files (29 lines of code)
    • 2 *.sh files (28 lines of code)
    • 2 *.pug files (27 lines of code)
    • 1 *.c files (27 lines of code)
    • 1 *.handlebars files (26 lines of code)
    • 1 *.rb files (26 lines of code)
    • 1 *.jl files (23 lines of code)
    • 1 *.java files (23 lines of code)
    • 1 *.cs files (23 lines of code)
    • 2 *.go files (21 lines of code)
    • 1 *.hbs files (21 lines of code)
    • 1 *.bib files (19 lines of code)
    • 1 *.cc files (18 lines of code)
    • 1 *.sty files (18 lines of code)
    • 1 *.tex files (16 lines of code)
    • 1 *.vb files (16 lines of code)
    • 1 *.shader files (15 lines of code)
    • 1 *.dart files (15 lines of code)
    • 1 *.bat files (15 lines of code)
    • 1 *.fs files (14 lines of code)
    • 1 *.swift files (13 lines of code)
    • 1 *.r files (11 lines of code)
    • 1 *.hlsl files (10 lines of code)
    • 1 *.lua files (10 lines of code)
    • 1 *.tsx files (5 lines of code)
  • " *.ts" is biggest, containing 89.94% of code.
  • " *.tsx" is smallest, containing 0% of code.


*.ts181069 LOC (89%) 751 files
*.js14348 LOC (7%) 53 files
*.html4094 LOC (2%) 28 files
*.css304 LOC (<1%) 16 files
*.scss264 LOC (<1%) 4 files
*.cu113 LOC (<1%) 1 files
*.groovy106 LOC (<1%) 1 files
*.py77 LOC (<1%) 2 files
*.cpp55 LOC (<1%) 5 files
*.pl55 LOC (<1%) 2 files
*.less51 LOC (<1%) 4 files
*.php43 LOC (<1%) 3 files
*.ps138 LOC (<1%) 2 files
*.clj38 LOC (<1%) 1 files
*.cshtml38 LOC (<1%) 1 files
*.mm33 LOC (<1%) 1 files
*.m33 LOC (<1%) 1 files
*.yaml32 LOC (<1%) 4 files
*.coffee32 LOC (<1%) 2 files
*.rs31 LOC (<1%) 2 files
*.jsx29 LOC (<1%) 1 files
*.sh28 LOC (<1%) 2 files
*.pug27 LOC (<1%) 2 files
*.c27 LOC (<1%) 1 files
*.handlebars26 LOC (<1%) 1 files
*.rb26 LOC (<1%) 1 files
*.jl23 LOC (<1%) 1 files
*.java23 LOC (<1%) 1 files
*.cs23 LOC (<1%) 1 files
*.go21 LOC (<1%) 2 files
*.hbs21 LOC (<1%) 1 files
*.bib19 LOC (<1%) 1 files
*.cc18 LOC (<1%) 1 files
*.sty18 LOC (<1%) 1 files
*.tex16 LOC (<1%) 1 files
*.vb16 LOC (<1%) 1 files
*.shader15 LOC (<1%) 1 files
*.dart15 LOC (<1%) 1 files
*.bat15 LOC (<1%) 1 files
*.fs14 LOC (<1%) 1 files
*.swift13 LOC (<1%) 1 files
*.r11 LOC (<1%) 1 files
*.hlsl10 LOC (<1%) 1 files
*.lua10 LOC (<1%) 1 files
*.tsx5 LOC (<1%) 1 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 ".*[.]generated[.][a-zA-Z]+".
  • 1 file matches defined criteria (1,834 lines of code, 0.3% vs. main code). All matches are in *.json files.


*.json1834 LOC (100%) 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 ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 89 files match defined criteria (1,895 lines of code, 0.3% vs. main code):
    • 53 *.js files (905 lines of code)
    • 24 *.sh files (671 lines of code)
    • 12 *.bat files (319 lines of code)
  • " *.js" is biggest, containing 47.76% of code.
  • " *.bat" is smallest, containing 16.83% of code.


*.js905 LOC (47%) 53 files
*.sh671 LOC (35%) 24 files
*.bat319 LOC (16%) 12 files
Other Code
plist
ini
diff
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 663 files match defined criteria (259,149 lines of code, 41.1% vs. main code):
    • 542 *.json files (245,672 lines of code)
    • 8 *.js files (11,510 lines of code)
    • 53 *.md files (1,132 lines of code)
    • 48 *.svg files (664 lines of code)
    • 5 *.xml files (60 lines of code)
    • 1 *.ipynb files (53 lines of code)
    • 3 *.plist files (36 lines of code)
    • 1 *.ini files (9 lines of code)
    • 1 *.diff files (7 lines of code)
    • 1 *.sql files (6 lines of code)
  • " *.json" is biggest, containing 94.8% of code.
  • " *.sql" is smallest, containing 0% of code.


*.json245672 LOC (94%) 542 files
*.js11510 LOC (4%) 8 files
*.md1132 LOC (<1%) 53 files
*.svg664 LOC (<1%) 48 files
*.xml60 LOC (<1%) 5 files
*.ipynb53 LOC (<1%) 1 files
*.plist36 LOC (<1%) 3 files
*.ini9 LOC (<1%) 1 files
*.diff7 LOC (<1%) 1 files
*.sql6 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
  • *.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
  • *.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
  • *.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
  • *.iss 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
  • *.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
  • *.ps1 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
  • *.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
  • *.desktop 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


2022-01-30 11:07