microsoft / vscode-dev-containers
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
npmignore
prefs
txt
project
csproj
classpath
mod
editorconfig
elm
re
cmd
eslintignore
fsproj
gitattributes
fs
  • 46 extensions are included in analyses: md, json, sh, npmignore, yml, Dockerfile, gitignore, js, yaml, py, prefs, txt, java, xml, cs, ts, project, ipynb, csproj, rs, classpath, toml, swift, cpp, rb, sql, cc, go, tf, css, mod, ps1, editorconfig, html, elm, re, cmd, eslintignore, fsproj, gitattributes, fs, dart, R, h, php, pl
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (519 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*/debian/.*" (Distributions) (16 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (23 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) (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.

main3015 LOC (3%) 77 files
test439 LOC (<1%) 12 files
generated6 LOC (<1%) 2 files
build and deployment10620 LOC (13%) 109 files
other62684 LOC (81%) 393 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
re
fs
fsproj
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 77 files match defined criteria (3,015 lines of code, 100.0% vs. main code):
    • 16 *.js files (2,213 lines of code)
    • 12 *.py files (182 lines of code)
    • 5 *.cs files (149 lines of code)
    • 4 *.ts files (80 lines of code)
    • 2 *.cpp files (50 lines of code)
    • 2 *.go files (40 lines of code)
    • 5 *.java files (39 lines of code)
    • 2 *.cc files (31 lines of code)
    • 1 *.html files (21 lines of code)
    • 4 *.dockerfile files (21 lines of code)
    • 1 *.ps1 files (20 lines of code)
    • 1 *.css files (18 lines of code)
    • 3 *.yml files (18 lines of code)
    • 2 *.rs files (16 lines of code)
    • 1 *.h files (16 lines of code)
    • 2 *.rb files (14 lines of code)
    • 2 *.tf files (14 lines of code)
    • 2 *.toml files (13 lines of code)
    • 2 *.swift files (12 lines of code)
    • 1 *.re files (12 lines of code)
    • 1 *.fs files (10 lines of code)
    • 1 *.fsproj files (9 lines of code)
    • 1 *.php files (6 lines of code)
    • 1 *.yaml files (4 lines of code)
    • 1 *.r files (4 lines of code)
    • 1 *.pl files (2 lines of code)
    • 1 *.cmd files (1 lines of code)
  • " *.js" is biggest, containing 73.4% of code.
  • " *.cmd" is smallest, containing 0.03% of code.


*.js2213 LOC (73%) 16 files
*.py182 LOC (6%) 12 files
*.cs149 LOC (4%) 5 files
*.ts80 LOC (2%) 4 files
*.cpp50 LOC (1%) 2 files
*.go40 LOC (1%) 2 files
*.java39 LOC (1%) 5 files
*.cc31 LOC (1%) 2 files
*.html21 LOC (<1%) 1 files
*.dockerfile21 LOC (<1%) 4 files
*.ps120 LOC (<1%) 1 files
*.css18 LOC (<1%) 1 files
*.yml18 LOC (<1%) 3 files
*.rs16 LOC (<1%) 2 files
*.h16 LOC (<1%) 1 files
*.rb14 LOC (<1%) 2 files
*.tf14 LOC (<1%) 2 files
*.toml13 LOC (<1%) 2 files
*.swift12 LOC (<1%) 2 files
*.re12 LOC (<1%) 1 files
*.fs10 LOC (<1%) 1 files
*.fsproj9 LOC (<1%) 1 files
*.php6 LOC (<1%) 1 files
*.yaml4 LOC (<1%) 1 files
*.r4 LOC (<1%) 1 files
*.pl2 LOC (<1%) 1 files
*.cmd1 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]est/.*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 12 files match defined criteria (439 lines of code, 14.6% vs. main code):
    • 5 *.sh files (225 lines of code)
    • 3 *.java files (107 lines of code)
    • 2 *.js files (42 lines of code)
    • 1 *.rs files (39 lines of code)
    • 1 *.dockerfile files (26 lines of code)
  • " *.sh" is biggest, containing 51.25% of code.
  • " *.dockerfile" is smallest, containing 5.92% of code.


*.sh225 LOC (51%) 5 files
*.java107 LOC (24%) 3 files
*.js42 LOC (9%) 2 files
*.rs39 LOC (8%) 1 files
*.dockerfile26 LOC (5%) 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 ".*/package[-]lock[.]json".
  • 2 files match defined criteria (6 lines of code, 0.2% vs. main code). All matches are in *.json files.


*.json6 LOC (100%) 2 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 ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/pom[.]xml".
  • 109 files match defined criteria (10,620 lines of code, 352.2% vs. main code):
    • 106 *.sh files (10,596 lines of code)
    • 3 *.csproj files (24 lines of code)
  • " *.sh" is biggest, containing 99.77% of code.
  • " *.csproj" is smallest, containing 0.23% of code.


*.sh10596 LOC (99%) 106 files
*.csproj24 LOC (<1%) 3 files
Other Code
elm
mod
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 ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 393 files match defined criteria (62,684 lines of code, 2079.1% vs. main code):
    • 322 *.md files (57,529 lines of code)
    • 66 *.json files (4,957 lines of code)
    • 3 *.xml files (164 lines of code)
    • 1 *.elm files (31 lines of code)
    • 1 *.mod files (3 lines of code)
  • " *.md" is biggest, containing 91.78% of code.
  • " *.mod" is smallest, containing 0% of code.


*.md57529 LOC (91%) 322 files
*.json4957 LOC (7%) 66 files
*.xml164 LOC (<1%) 3 files
*.elm31 LOC (<1%) 1 files
*.mod3 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
  • *.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)
  • *.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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.cc 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
  • *.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
  • *.dockerfile 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
  • *.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
  • *.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
  • *.rs 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
  • *.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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.tf 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
  • *.toml 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
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.re 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
  • *.fs 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
  • *.fsproj 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
  • *.php files are analyzed with PhpAnalyzer:
    • 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
  • *.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
  • *.r files are analyzed with RAnalyzer:
    • 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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.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 22:25