microsoft / Bing-Maps-Fleet-Tracker
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
resx
csproj
editorconfig
txt
  • 15 extensions are included in analyses: cs, ts, html, css, resx, json, csproj, scss, md, gitignore, js, svg, editorconfig, txt, xml
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (1 file).
    • exclude files with path like ".*/dist/.*" (Distributions) (2 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (16 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) (0 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.

main19606 LOC (39%) 454 files
test566 LOC (1%) 25 files
generated14759 LOC (29%) 27 files
build and deployment190 LOC (<1%) 10 files
other15108 LOC (30%) 23 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 ".*".
  • 454 files match defined criteria (19,606 lines of code, 100.0% vs. main code):
    • 264 *.cs files (12,534 lines of code)
    • 110 *.ts files (5,263 lines of code)
    • 40 *.html files (1,238 lines of code)
    • 32 *.css files (497 lines of code)
    • 1 *.js files (43 lines of code)
    • 7 *.scss files (31 lines of code)
  • " *.cs" is biggest, containing 63.93% of code.
  • " *.scss" is smallest, containing 0.16% of code.


*.cs12534 LOC (63%) 264 files
*.ts5263 LOC (26%) 110 files
*.html1238 LOC (6%) 40 files
*.css497 LOC (2%) 32 files
*.js43 LOC (<1%) 1 files
*.scss31 LOC (<1%) 7 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 ".*/e2e/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*[.]spec[.]ts".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*/mock[-].*".
  • 25 files match defined criteria (566 lines of code, 2.9% vs. main code):
    • 23 *.ts files (505 lines of code)
    • 2 *.js files (61 lines of code)
  • " *.ts" is biggest, containing 89.22% of code.
  • " *.js" is smallest, containing 10.78% of code.


*.ts505 LOC (89%) 23 files
*.js61 LOC (10%) 2 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*/package[-]lock[.]json".
  • 27 files match defined criteria (14,759 lines of code, 75.3% vs. main code):
    • 1 *.json files (14,096 lines of code)
    • 26 *.cs files (663 lines of code)
  • " *.json" is biggest, containing 95.51% of code.
  • " *.cs" is smallest, containing 4.49% of code.


*.json14096 LOC (95%) 1 files
*.cs663 LOC (4%) 26 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 ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 10 files match defined criteria (190 lines of code, 1.0% vs. main code). All matches are in *.csproj files.


*.csproj190 LOC (100%) 10 files
Other Code
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 ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 23 files match defined criteria (15,108 lines of code, 77.1% vs. main code):
    • 15 *.json files (14,765 lines of code)
    • 5 *.md files (239 lines of code)
    • 1 *.xml files (96 lines of code)
    • 2 *.svg files (8 lines of code)
  • " *.json" is biggest, containing 97.73% of code.
  • " *.svg" is smallest, containing 0.05% of code.


*.json14765 LOC (97%) 15 files
*.md239 LOC (1%) 5 files
*.xml96 LOC (<1%) 1 files
*.svg8 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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:26