microsoft / CLRInstrumentationEngine
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
vcxproj
txt
props
targets
wixproj
nuspec
wxi
wxs
awk
xsd
gitattributes
editorconfig
shproj
filters
  • 27 extensions are included in analyses: h, cpp, xml, cs, yaml, md, csproj, vcxproj, txt, props, targets, ps1, wixproj, sh, json, nuspec, wxi, wxs, awk, xsd, gitattributes, psm1, editorconfig, yml, shproj, gitignore, filters
  • 7 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 ".*/docs/.*" (Documentation) (11 files).
    • exclude files with path like ".*/dependencies/.*" (Dependencies) (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) (11 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.

main79480 LOC (84%) 439 files
test9304 LOC (9%) 118 files
generated228 LOC (<1%) 2 files
build and deployment1210 LOC (1%) 17 files
other3719 LOC (3%) 135 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
props
targets
wxi
wixproj
wxs
awk
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 439 files match defined criteria (79,480 lines of code, 100.0% vs. main code):
    • 208 *.h files (52,377 lines of code)
    • 128 *.cpp files (21,425 lines of code)
    • 10 *.cs files (1,337 lines of code)
    • 41 *.yaml files (1,117 lines of code)
    • 10 *.vcxproj files (1,060 lines of code)
    • 7 *.ps1 files (857 lines of code)
    • 12 *.props files (494 lines of code)
    • 9 *.targets files (226 lines of code)
    • 1 *.psm1 files (225 lines of code)
    • 3 *.wxi files (125 lines of code)
    • 3 *.wixproj files (85 lines of code)
    • 3 *.wxs files (77 lines of code)
    • 3 *.awk files (43 lines of code)
    • 1 *.filters files (32 lines of code)
  • " *.h" is biggest, containing 65.9% of code.
  • " *.filters" is smallest, containing 0.04% of code.


*.h52377 LOC (65%) 208 files
*.cpp21425 LOC (26%) 128 files
*.cs1337 LOC (1%) 10 files
*.yaml1117 LOC (1%) 41 files
*.vcxproj1060 LOC (1%) 10 files
*.ps1857 LOC (1%) 7 files
*.props494 LOC (<1%) 12 files
*.targets226 LOC (<1%) 9 files
*.psm1225 LOC (<1%) 1 files
*.wxi125 LOC (<1%) 3 files
*.wixproj85 LOC (<1%) 3 files
*.wxs77 LOC (<1%) 3 files
*.awk43 LOC (<1%) 3 files
*.filters32 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
vcxproj
csproj
shproj
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 paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 118 files match defined criteria (9,304 lines of code, 11.7% vs. main code):
    • 59 *.cs files (3,770 lines of code)
    • 23 *.cpp files (3,004 lines of code)
    • 21 *.h files (1,153 lines of code)
    • 6 *.vcxproj files (695 lines of code)
    • 8 *.csproj files (670 lines of code)
    • 1 *.shproj files (12 lines of code)
  • " *.cs" is biggest, containing 40.52% of code.
  • " *.shproj" is smallest, containing 0.13% of code.


*.cs3770 LOC (40%) 59 files
*.cpp3004 LOC (32%) 23 files
*.h1153 LOC (12%) 21 files
*.vcxproj695 LOC (7%) 6 files
*.csproj670 LOC (7%) 8 files
*.shproj12 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 2 files match defined criteria (228 lines of code, 0.3% vs. main code). All matches are in *.cs files.


*.cs228 LOC (100%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
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".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]sh".
  • 17 files match defined criteria (1,210 lines of code, 1.5% vs. main code):
    • 3 *.sh files (628 lines of code)
    • 11 *.csproj files (508 lines of code)
    • 3 *.nuspec files (74 lines of code)
  • " *.sh" is biggest, containing 51.9% of code.
  • " *.nuspec" is smallest, containing 6.12% of code.


*.sh628 LOC (51%) 3 files
*.csproj508 LOC (41%) 11 files
*.nuspec74 LOC (6%) 3 files
Other Code
xsd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • 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 ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 135 files match defined criteria (3,719 lines of code, 4.7% vs. main code):
    • 122 *.xml files (3,110 lines of code)
    • 9 *.md files (491 lines of code)
    • 2 *.xsd files (87 lines of code)
    • 2 *.json files (31 lines of code)
  • " *.xml" is biggest, containing 83.62% of code.
  • " *.json" is smallest, containing 0.83% of code.


*.xml3110 LOC (83%) 122 files
*.md491 LOC (13%) 9 files
*.xsd87 LOC (2%) 2 files
*.json31 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.cpp 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)
  • *.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
  • *.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
  • *.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
  • *.psm1 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
  • *.wxi 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
  • *.wixproj 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
  • *.wxs 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
  • *.awk 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
  • *.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


2022-01-30 21:59