microsoft / slow-cheetah
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
csproj
targets
resx
txt
xaml
cscfg
props
vsixmanifest
gitattributes
fs
aspx
ccproj
cmd
fsproj
csdef
  • 21 extensions are included in analyses: cs, csproj, targets, xml, resx, md, txt, json, xaml, yml, cscfg, gitignore, props, vsixmanifest, gitattributes, fs, aspx, ccproj, cmd, fsproj, csdef
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (6 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.

main2967 LOC (57%) 51 files
test636 LOC (12%) 16 files
generated256 LOC (4%) 5 files
build and deployment260 LOC (5%) 3 files
other1070 LOC (20%) 37 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
targets
vsixmanifest
props
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 51 files match defined criteria (2,967 lines of code, 100.0% vs. main code):
    • 41 *.cs files (2,611 lines of code)
    • 6 *.targets files (285 lines of code)
    • 1 *.yml files (25 lines of code)
    • 1 *.vsixmanifest files (24 lines of code)
    • 1 *.props files (15 lines of code)
    • 1 *.cmd files (7 lines of code)
  • " *.cs" is biggest, containing 88% of code.
  • " *.cmd" is smallest, containing 0.24% of code.


*.cs2611 LOC (88%) 41 files
*.targets285 LOC (9%) 6 files
*.yml25 LOC (<1%) 1 files
*.vsixmanifest24 LOC (<1%) 1 files
*.props15 LOC (<1%) 1 files
*.cmd7 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
targets
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 16 files match defined criteria (636 lines of code, 21.4% vs. main code):
    • 10 *.cs files (384 lines of code)
    • 4 *.csproj files (250 lines of code)
    • 1 *.targets files (1 lines of code)
    • 1 *.props files (1 lines of code)
  • " *.cs" is biggest, containing 60.38% of code.
  • " *.props" is smallest, containing 0.16% of code.


*.cs384 LOC (60%) 10 files
*.csproj250 LOC (39%) 4 files
*.targets1 LOC (<1%) 1 files
*.props1 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 ".*[.]designer[.](cs|vb)".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 5 files match defined criteria (256 lines of code, 8.6% vs. main code). All matches are in *.cs files.


*.cs256 LOC (100%) 5 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (260 lines of code, 8.8% vs. main code). All matches are in *.csproj files.


*.csproj260 LOC (100%) 3 files
Other Code
csproj
fsproj
ccproj
xaml
cscfg
fs
aspx
csdef
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 ".*/[Ss]amples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 37 files match defined criteria (1,070 lines of code, 36.1% vs. main code):
    • 3 *.csproj files (430 lines of code)
    • 11 *.cs files (226 lines of code)
    • 5 *.md files (138 lines of code)
    • 1 *.fsproj files (75 lines of code)
    • 1 *.ccproj files (53 lines of code)
    • 2 *.xaml files (39 lines of code)
    • 7 *.xml files (37 lines of code)
    • 2 *.json files (27 lines of code)
    • 2 *.cscfg files (18 lines of code)
    • 1 *.fs files (10 lines of code)
    • 1 *.aspx files (9 lines of code)
    • 1 *.csdef files (8 lines of code)
  • " *.csproj" is biggest, containing 40.19% of code.
  • " *.csdef" is smallest, containing 0.75% of code.


*.csproj430 LOC (40%) 3 files
*.cs226 LOC (21%) 11 files
*.md138 LOC (12%) 5 files
*.fsproj75 LOC (7%) 1 files
*.ccproj53 LOC (4%) 1 files
*.xaml39 LOC (3%) 2 files
*.xml37 LOC (3%) 7 files
*.json27 LOC (2%) 2 files
*.cscfg18 LOC (1%) 2 files
*.fs10 LOC (<1%) 1 files
*.aspx9 LOC (<1%) 1 files
*.csdef8 LOC (<1%) 1 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)
  • *.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
  • *.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
  • *.vsixmanifest 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
  • *.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
  • *.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 14:53