microsoft / Orb
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
txt
mk
vcxproj
filters
styl
npmignore
gypi
csproj
cmd
gyp
gitattributes
editorconfig
  • 29 extensions are included in analyses: cc, ts, h, tsx, js, json, md, txt, css, html, py, cs, mk, bat, vcxproj, filters, ps1, sh, gitignore, styl, npmignore, yml, gypi, svg, csproj, cmd, gyp, gitattributes, editorconfig
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (126 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (12 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • exclude files with path like ".*/deps/.*" (Dependencies) (178 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) (1 file).
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.

main3605 LOC (18%) 38 files
test482 LOC (2%) 8 files
generated7233 LOC (38%) 2 files
build and deployment96 LOC (<1%) 2 files
other7577 LOC (39%) 8 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
gypi
filters
gyp
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 38 files match defined criteria (3,605 lines of code, 100.0% vs. main code):
    • 11 *.js files (944 lines of code)
    • 3 *.cc files (763 lines of code)
    • 7 *.cs files (617 lines of code)
    • 8 *.ts files (583 lines of code)
    • 1 *.yml files (242 lines of code)
    • 1 *.vcxproj files (166 lines of code)
    • 1 *.ps1 files (86 lines of code)
    • 1 *.gypi files (71 lines of code)
    • 1 *.filters files (67 lines of code)
    • 1 *.gyp files (54 lines of code)
    • 1 *.h files (10 lines of code)
    • 2 *.cmd files (2 lines of code)
  • " *.js" is biggest, containing 26.19% of code.
  • " *.cmd" is smallest, containing 0.06% of code.


*.js944 LOC (26%) 11 files
*.cc763 LOC (21%) 3 files
*.cs617 LOC (17%) 7 files
*.ts583 LOC (16%) 8 files
*.yml242 LOC (6%) 1 files
*.vcxproj166 LOC (4%) 1 files
*.ps186 LOC (2%) 1 files
*.gypi71 LOC (1%) 1 files
*.filters67 LOC (1%) 1 files
*.gyp54 LOC (1%) 1 files
*.h10 LOC (<1%) 1 files
*.cmd2 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 ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 8 files match defined criteria (482 lines of code, 13.4% vs. main code):
    • 4 *.js files (243 lines of code)
    • 4 *.ts files (239 lines of code)
  • " *.js" is biggest, containing 50.41% of code.
  • " *.ts" is smallest, containing 49.59% of code.


*.js243 LOC (50%) 4 files
*.ts239 LOC (49%) 4 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 (7,233 lines of code, 200.6% vs. main code). All matches are in *.json files.


*.json7233 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 ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]mk".
  • 2 files match defined criteria (96 lines of code, 2.7% vs. main code). All matches are in *.csproj files.


*.csproj96 LOC (100%) 2 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 ".*[.]txt".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]npmignore".
  • 8 files match defined criteria (7,577 lines of code, 210.2% vs. main code):
    • 5 *.json files (7,352 lines of code)
    • 3 *.md files (225 lines of code)
  • " *.json" is biggest, containing 97.03% of code.
  • " *.md" is smallest, containing 2.97% of code.


*.json7352 LOC (97%) 5 files
*.md225 LOC (2%) 3 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
  • *.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
  • *.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
  • *.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
  • *.vcxproj 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
  • *.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
  • *.gypi 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
  • *.filters 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
  • *.gyp 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
  • *.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
  • *.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:27