microsoft / azuredatastudio
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
xlf
vscodeignore
txt
plist
npmignore
gitattributes
desktop
iss
editorconfig
diff
cmd
eslintignore
  • 31 extensions are included in analyses: json, ts, svg, css, xlf, js, md, html, vscodeignore, txt, gitignore, yml, ipynb, sql, sh, xml, bat, ps1, py, plist, npmignore, gitattributes, desktop, iss, editorconfig, yaml, diff, less, cmd, eslintignore, Dockerfile
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (197 files).
    • exclude files with path like ".*/cache/.*" (Caches) (0 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (105 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • exclude files with path like ".*/dist/.*" (Distributions) (851 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (4 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 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) (64 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.

main1067235 LOC (66%) 4788 files
test220078 LOC (13%) 1036 files
generated1769 LOC (<1%) 1 files
build and deployment1758 LOC (<1%) 90 files
other307271 LOC (19%) 6508 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xlf
iss
desktop
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 4788 files match defined criteria (1,067,235 lines of code, 100.0% vs. main code):
    • 3,926 *.ts files (741,175 lines of code)
    • 288 *.xlf files (275,398 lines of code)
    • 328 *.css files (25,207 lines of code)
    • 139 *.js files (19,492 lines of code)
    • 34 *.yml files (3,519 lines of code)
    • 58 *.html files (1,767 lines of code)
    • 1 *.iss files (294 lines of code)
    • 9 *.ps1 files (286 lines of code)
    • 1 *.yaml files (62 lines of code)
    • 2 *.desktop files (29 lines of code)
    • 2 *.py files (6 lines of code)
  • " *.ts" is biggest, containing 69.45% of code.
  • " *.py" is smallest, containing 0% of code.


*.ts741175 LOC (69%) 3926 files
*.xlf275398 LOC (25%) 288 files
*.css25207 LOC (2%) 328 files
*.js19492 LOC (1%) 139 files
*.yml3519 LOC (<1%) 34 files
*.html1767 LOC (<1%) 58 files
*.iss294 LOC (<1%) 1 files
*.ps1286 LOC (<1%) 9 files
*.yaml62 LOC (<1%) 1 files
*.desktop29 LOC (<1%) 2 files
*.py6 LOC (<1%) 2 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 ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 1036 files match defined criteria (220,078 lines of code, 20.6% vs. main code):
    • 962 *.ts files (205,460 lines of code)
    • 41 *.js files (13,087 lines of code)
    • 11 *.html files (931 lines of code)
    • 13 *.css files (302 lines of code)
    • 1 *.yml files (93 lines of code)
    • 2 *.py files (77 lines of code)
    • 3 *.sh files (74 lines of code)
    • 2 *.bat files (53 lines of code)
    • 1 *.less files (1 lines of code)
  • " *.ts" is biggest, containing 93.36% of code.
  • " *.less" is smallest, containing 0% of code.


*.ts205460 LOC (93%) 962 files
*.js13087 LOC (5%) 41 files
*.html931 LOC (<1%) 11 files
*.css302 LOC (<1%) 13 files
*.yml93 LOC (<1%) 1 files
*.py77 LOC (<1%) 2 files
*.sh74 LOC (<1%) 3 files
*.bat53 LOC (<1%) 2 files
*.less1 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,769 lines of code, 0.2% vs. main code). All matches are in *.json files.


*.json1769 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 ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]bat".
  • 90 files match defined criteria (1,758 lines of code, 0.2% vs. main code):
    • 52 *.js files (775 lines of code)
    • 26 *.sh files (631 lines of code)
    • 12 *.bat files (352 lines of code)
  • " *.js" is biggest, containing 44.08% of code.
  • " *.bat" is smallest, containing 20.02% of code.


*.js775 LOC (44%) 52 files
*.sh631 LOC (35%) 26 files
*.bat352 LOC (20%) 12 files
Other Code
plist
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 ".*[.]diff".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 6508 files match defined criteria (307,271 lines of code, 28.8% vs. main code):
    • 5,614 *.json files (271,123 lines of code)
    • 19 *.js files (11,847 lines of code)
    • 40 *.ipynb files (11,793 lines of code)
    • 607 *.svg files (4,529 lines of code)
    • 113 *.md files (3,611 lines of code)
    • 33 *.xml files (1,752 lines of code)
    • 27 *.ts files (1,577 lines of code)
    • 44 *.sql files (857 lines of code)
    • 7 *.html files (135 lines of code)
    • 3 *.plist files (40 lines of code)
    • 1 *.diff files (7 lines of code)
  • " *.json" is biggest, containing 88.24% of code.
  • " *.diff" is smallest, containing 0% of code.


*.json271123 LOC (88%) 5614 files
*.js11847 LOC (3%) 19 files
*.ipynb11793 LOC (3%) 40 files
*.svg4529 LOC (1%) 607 files
*.md3611 LOC (1%) 113 files
*.xml1752 LOC (<1%) 33 files
*.ts1577 LOC (<1%) 27 files
*.sql857 LOC (<1%) 44 files
*.html135 LOC (<1%) 7 files
*.plist40 LOC (<1%) 3 files
*.diff7 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
  • *.xlf 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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


2022-01-30 15:24