microsoft / vscode-textmate
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
plist
txt
coffee
npmignore
handlebars
diff
hbs
shader
jade
fs
ini
cshtml
lua
  • 48 extensions are included in analyses: json, ts, plist, txt, js, md, yaml, go, html, less, css, scss, xml, rs, yml, gitignore, coffee, php, pl, npmignore, py, ps1, java, bat, handlebars, swift, clj, cpp, diff, vb, rb, groovy, hbs, shader, jade, fs, jsx, sql, sh, tsx, cc, c, ini, m, cshtml, cs, r, lua
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (3 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.

main3944 LOC (6%) 21 files
test2765 LOC (4%) 71 files
generated1626 LOC (2%) 1 files
build and deployment15 LOC (<1%) 1 files
other48576 LOC (85%) 97 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 21 files match defined criteria (3,944 lines of code, 100.0% vs. main code):
    • 13 *.ts files (3,818 lines of code)
    • 4 *.js files (84 lines of code)
    • 2 *.go files (20 lines of code)
    • 1 *.cs files (16 lines of code)
    • 1 *.php files (6 lines of code)
  • " *.ts" is biggest, containing 96.81% of code.
  • " *.php" is smallest, containing 0.15% of code.


*.ts3818 LOC (96%) 13 files
*.js84 LOC (2%) 4 files
*.go20 LOC (<1%) 2 files
*.cs16 LOC (<1%) 1 files
*.php6 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cshtml
coffee
handlebars
hbs
shader
fs
lua
jade
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 71 files match defined criteria (2,765 lines of code, 70.1% vs. main code):
    • 22 *.ts files (1,416 lines of code)
    • 2 *.scss files (262 lines of code)
    • 2 *.css files (133 lines of code)
    • 1 *.groovy files (106 lines of code)
    • 1 *.py files (73 lines of code)
    • 2 *.pl files (55 lines of code)
    • 3 *.less files (50 lines of code)
    • 3 *.html files (42 lines of code)
    • 1 *.clj files (38 lines of code)
    • 1 *.cshtml files (38 lines of code)
    • 1 *.ps1 files (35 lines of code)
    • 1 *.m files (33 lines of code)
    • 4 *.yaml files (32 lines of code)
    • 2 *.coffee files (32 lines of code)
    • 1 *.php files (32 lines of code)
    • 2 *.rs files (31 lines of code)
    • 1 *.jsx files (29 lines of code)
    • 2 *.js 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 *.java files (23 lines of code)
    • 1 *.hbs files (21 lines of code)
    • 1 *.bat files (20 lines of code)
    • 2 *.go files (20 lines of code)
    • 1 *.sh files (19 lines of code)
    • 1 *.cc files (18 lines of code)
    • 1 *.cpp files (18 lines of code)
    • 1 *.vb files (16 lines of code)
    • 1 *.shader files (15 lines of code)
    • 1 *.fs files (14 lines of code)
    • 1 *.r files (11 lines of code)
    • 1 *.swift files (10 lines of code)
    • 1 *.lua files (10 lines of code)
    • 1 *.tsx files (5 lines of code)
    • 1 *.jade files (2 lines of code)
  • " *.ts" is biggest, containing 51.21% of code.
  • " *.jade" is smallest, containing 0.07% of code.


*.ts1416 LOC (51%) 22 files
*.scss262 LOC (9%) 2 files
*.css133 LOC (4%) 2 files
*.groovy106 LOC (3%) 1 files
*.py73 LOC (2%) 1 files
*.pl55 LOC (1%) 2 files
*.less50 LOC (1%) 3 files
*.html42 LOC (1%) 3 files
*.clj38 LOC (1%) 1 files
*.cshtml38 LOC (1%) 1 files
*.ps135 LOC (1%) 1 files
*.m33 LOC (1%) 1 files
*.yaml32 LOC (1%) 4 files
*.coffee32 LOC (1%) 2 files
*.php32 LOC (1%) 1 files
*.rs31 LOC (1%) 2 files
*.jsx29 LOC (1%) 1 files
*.js27 LOC (<1%) 2 files
*.c27 LOC (<1%) 1 files
*.handlebars26 LOC (<1%) 1 files
*.rb26 LOC (<1%) 1 files
*.java23 LOC (<1%) 1 files
*.hbs21 LOC (<1%) 1 files
*.bat20 LOC (<1%) 1 files
*.go20 LOC (<1%) 2 files
*.sh19 LOC (<1%) 1 files
*.cc18 LOC (<1%) 1 files
*.cpp18 LOC (<1%) 1 files
*.vb16 LOC (<1%) 1 files
*.shader15 LOC (<1%) 1 files
*.fs14 LOC (<1%) 1 files
*.r11 LOC (<1%) 1 files
*.swift10 LOC (<1%) 1 files
*.lua10 LOC (<1%) 1 files
*.tsx5 LOC (<1%) 1 files
*.jade2 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (1,626 lines of code, 41.2% vs. main code). All matches are in *.json files.


*.json1626 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 1 file matches defined criteria (15 lines of code, 0.4% vs. main code). All matches are in *.js files.


*.js15 LOC (100%) 1 files
Other Code
plist
diff
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 ".*/[.]npmignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 97 files match defined criteria (48,576 lines of code, 1231.6% vs. main code):
    • 75 *.json files (36,148 lines of code)
    • 12 *.plist files (12,145 lines of code)
    • 5 *.md files (223 lines of code)
    • 2 *.xml files (26 lines of code)
    • 1 *.diff files (19 lines of code)
    • 1 *.ini files (9 lines of code)
    • 1 *.sql files (6 lines of code)
  • " *.json" is biggest, containing 74.42% of code.
  • " *.sql" is smallest, containing 0.01% of code.


*.json36148 LOC (74%) 75 files
*.plist12145 LOC (25%) 12 files
*.md223 LOC (<1%) 5 files
*.xml26 LOC (<1%) 2 files
*.diff19 LOC (<1%) 1 files
*.ini9 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
  • *.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
  • *.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)
  • *.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


2022-01-30 11:08