microsoft / VFSForGit
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
txt
vcxproj
filters
props
targets
iss
gitattributes
editorconfig
nuspec
  • 19 extensions are included in analyses: cs, h, cpp, csproj, md, bat, txt, vcxproj, filters, props, targets, json, yaml, iss, gitattributes, yml, editorconfig, nuspec, gitignore
  • 6 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 ".*/docs/.*" (Documentation) (4 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) (5 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.

main47663 LOC (62%) 406 files
test26953 LOC (35%) 183 files
generated0 LOC (0%) 0 files
build and deployment785 LOC (1%) 27 files
other764 LOC (1%) 9 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
iss
filters
targets
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 406 files match defined criteria (47,663 lines of code, 100.0% vs. main code):
    • 320 *.cs files (40,973 lines of code)
    • 29 *.cpp files (3,685 lines of code)
    • 41 *.h files (1,239 lines of code)
    • 5 *.vcxproj files (667 lines of code)
    • 1 *.iss files (661 lines of code)
    • 5 *.filters files (372 lines of code)
    • 2 *.targets files (33 lines of code)
    • 3 *.props files (33 lines of code)
  • " *.cs" is biggest, containing 85.96% of code.
  • " *.props" is smallest, containing 0.07% of code.


*.cs40973 LOC (85%) 320 files
*.cpp3685 LOC (7%) 29 files
*.h1239 LOC (2%) 41 files
*.vcxproj667 LOC (1%) 5 files
*.iss661 LOC (1%) 1 files
*.filters372 LOC (<1%) 5 files
*.targets33 LOC (<1%) 2 files
*.props33 LOC (<1%) 3 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]ests/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 183 files match defined criteria (26,953 lines of code, 56.5% vs. main code):
    • 181 *.cs files (26,902 lines of code)
    • 2 *.csproj files (51 lines of code)
  • " *.cs" is biggest, containing 99.81% of code.
  • " *.csproj" is smallest, containing 0.19% of code.


*.cs26902 LOC (99%) 181 files
*.csproj51 LOC (<1%) 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 ".*[.]bat".
  • 27 files match defined criteria (785 lines of code, 1.6% vs. main code):
    • 16 *.csproj files (412 lines of code)
    • 10 *.bat files (358 lines of code)
    • 1 *.nuspec files (15 lines of code)
  • " *.csproj" is biggest, containing 52.48% of code.
  • " *.nuspec" is smallest, containing 1.91% of code.


*.csproj412 LOC (52%) 16 files
*.bat358 LOC (45%) 10 files
*.nuspec15 LOC (1%) 1 files
Other Code
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 ".*[.]txt".
  • 9 files match defined criteria (764 lines of code, 1.6% vs. main code):
    • 8 *.md files (758 lines of code)
    • 1 *.json files (6 lines of code)
  • " *.md" is biggest, containing 99.21% of code.
  • " *.json" is smallest, containing 0.79% of code.


*.md758 LOC (99%) 8 files
*.json6 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)
  • *.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
  • *.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
  • *.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
  • *.iss 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
  • *.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
  • *.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


2022-01-30 14:44