microsoft / Atlas
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
cmd
txt
csproj
dockerignore
targets
props
editorconfig
  • 16 extensions are included in analyses: cs, yaml, json, md, cmd, sh, txt, html, ts, gitignore, csproj, svg, dockerignore, targets, props, editorconfig
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • 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) (2 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.

main6124 LOC (45%) 129 files
test3481 LOC (26%) 37 files
generated265 LOC (1%) 2 files
build and deployment60 LOC (<1%) 3 files
other3398 LOC (25%) 88 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
props
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 129 files match defined criteria (6,124 lines of code, 100.0% vs. main code):
    • 117 *.cs files (5,706 lines of code)
    • 3 *.ts files (162 lines of code)
    • 3 *.yaml files (131 lines of code)
    • 4 *.cmd files (57 lines of code)
    • 1 *.props files (38 lines of code)
    • 1 *.targets files (30 lines of code)
  • " *.cs" is biggest, containing 93.17% of code.
  • " *.targets" is smallest, containing 0.49% of code.


*.cs5706 LOC (93%) 117 files
*.ts162 LOC (2%) 3 files
*.yaml131 LOC (2%) 3 files
*.cmd57 LOC (<1%) 4 files
*.props38 LOC (<1%) 1 files
*.targets30 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
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 ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 37 files match defined criteria (3,481 lines of code, 56.8% vs. main code):
    • 36 *.cs files (3,460 lines of code)
    • 1 *.csproj files (21 lines of code)
  • " *.cs" is biggest, containing 99.4% of code.
  • " *.csproj" is smallest, containing 0.6% of code.


*.cs3460 LOC (99%) 36 files
*.csproj21 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".
  • 2 files match defined criteria (265 lines of code, 4.3% vs. main code). All matches are in *.json files.


*.json265 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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 3 files match defined criteria (60 lines of code, 1.0% vs. main code):
    • 1 *.csproj files (45 lines of code)
    • 2 *.sh files (15 lines of code)
  • " *.csproj" is biggest, containing 75% of code.
  • " *.sh" is smallest, containing 25% of code.


*.csproj45 LOC (75%) 1 files
*.sh15 LOC (25%) 2 files
Other Code
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • 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 ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
  • 88 files match defined criteria (3,398 lines of code, 55.5% vs. main code):
    • 16 *.json files (1,444 lines of code)
    • 55 *.yaml files (1,341 lines of code)
    • 9 *.md files (503 lines of code)
    • 2 *.sh files (62 lines of code)
    • 3 *.html files (33 lines of code)
    • 3 *.cmd files (15 lines of code)
  • " *.json" is biggest, containing 42.5% of code.
  • " *.cmd" is smallest, containing 0.44% of code.


*.json1444 LOC (42%) 16 files
*.yaml1341 LOC (39%) 55 files
*.md503 LOC (14%) 9 files
*.sh62 LOC (1%) 2 files
*.html33 LOC (<1%) 3 files
*.cmd15 LOC (<1%) 3 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
  • *.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
  • *.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
  • *.props 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
  • *.targets 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


2022-01-30 22:05