microsoft / vscode-python
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
cfg
txt
in
project
vscodeignore
gitattributes
editorconfig
npmrc
csproj
eslintignore
properties
  • 22 extensions are included in analyses: ts, py, json, md, svg, cfg, yml, txt, js, toml, ipynb, in, project, html, gitignore, vscodeignore, gitattributes, editorconfig, npmrc, csproj, eslintignore, properties
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (114 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (10 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) (12 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.

main39419 LOC (21%) 519 files
test69561 LOC (37%) 466 files
generated30749 LOC (16%) 1 files
build and deployment244 LOC (<1%) 9 files
other45231 LOC (24%) 111 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 519 files match defined criteria (39,419 lines of code, 100.0% vs. main code):
    • 447 *.ts files (36,708 lines of code)
    • 58 *.py files (2,215 lines of code)
    • 4 *.js files (409 lines of code)
    • 2 *.toml files (40 lines of code)
    • 3 *.in files (24 lines of code)
    • 2 *.html files (14 lines of code)
    • 3 *.yml files (9 lines of code)
  • " *.ts" is biggest, containing 93.12% of code.
  • " *.yml" is smallest, containing 0.02% of code.


*.ts36708 LOC (93%) 447 files
*.py2215 LOC (5%) 58 files
*.js409 LOC (1%) 4 files
*.toml40 LOC (<1%) 2 files
*.in24 LOC (<1%) 3 files
*.html14 LOC (<1%) 2 files
*.yml9 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 466 files match defined criteria (69,561 lines of code, 176.5% vs. main code):
    • 349 *.ts files (61,924 lines of code)
    • 106 *.py files (7,573 lines of code)
    • 4 *.toml files (39 lines of code)
    • 7 *.cfg files (25 lines of code)
  • " *.ts" is biggest, containing 89.02% of code.
  • " *.cfg" is smallest, containing 0.04% of code.


*.ts61924 LOC (89%) 349 files
*.py7573 LOC (10%) 106 files
*.toml39 LOC (<1%) 4 files
*.cfg25 LOC (<1%) 7 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".
  • 1 file matches defined criteria (30,749 lines of code, 78.0% vs. main code). All matches are in *.json files.


*.json30749 LOC (100%) 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
  • 9 files match defined criteria (244 lines of code, 0.6% vs. main code):
    • 7 *.js files (216 lines of code)
    • 1 *.csproj files (20 lines of code)
    • 1 *.html files (8 lines of code)
  • " *.js" is biggest, containing 88.52% of code.
  • " *.html" is smallest, containing 3.28% of code.


*.js216 LOC (88%) 7 files
*.csproj20 LOC (8%) 1 files
*.html8 LOC (3%) 1 files
Other Code
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 ".*/[.]eslintignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 111 files match defined criteria (45,231 lines of code, 114.7% vs. main code):
    • 31 *.json files (35,305 lines of code)
    • 45 *.md files (9,436 lines of code)
    • 5 *.ipynb files (340 lines of code)
    • 30 *.svg files (150 lines of code)
  • " *.json" is biggest, containing 78.05% of code.
  • " *.svg" is smallest, containing 0.33% of code.


*.json35305 LOC (78%) 31 files
*.md9436 LOC (20%) 45 files
*.ipynb340 LOC (<1%) 5 files
*.svg150 LOC (<1%) 30 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
  • *.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
  • *.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
  • *.in 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
  • *.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
  • *.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


2022-01-30 15:15