microsoft / ProjFS-Managed-API
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
props
csproj
vcxproj
filters
txt
  • 13 extensions are included in analyses: h, cs, cpp, bat, props, md, xml, csproj, vcxproj, json, gitignore, filters, txt
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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) (0 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.

main4624 LOC (53%) 41 files
test610 LOC (7%) 5 files
generated0 LOC (0%) 0 files
build and deployment154 LOC (1%) 7 files
other3190 LOC (37%) 8 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
props
filters
vcxproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 41 files match defined criteria (4,624 lines of code, 100.0% vs. main code):
    • 6 *.cpp files (1,706 lines of code)
    • 19 *.h files (1,310 lines of code)
    • 9 *.cs files (1,260 lines of code)
    • 4 *.props files (177 lines of code)
    • 1 *.filters files (114 lines of code)
    • 2 *.vcxproj files (57 lines of code)
  • " *.cpp" is biggest, containing 36.89% of code.
  • " *.vcxproj" is smallest, containing 1.23% of code.


*.cpp1706 LOC (36%) 6 files
*.h1310 LOC (28%) 19 files
*.cs1260 LOC (27%) 9 files
*.props177 LOC (3%) 4 files
*.filters114 LOC (2%) 1 files
*.vcxproj57 LOC (1%) 2 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]est[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 5 files match defined criteria (610 lines of code, 13.2% vs. main code):
    • 4 *.cs files (591 lines of code)
    • 1 *.csproj files (19 lines of code)
  • " *.cs" is biggest, containing 96.89% of code.
  • " *.csproj" is smallest, containing 3.11% of code.


*.cs591 LOC (96%) 4 files
*.csproj19 LOC (3%) 1 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 ".*[.]bat".
    • files with paths like ".*[.]csproj".
  • 7 files match defined criteria (154 lines of code, 3.3% vs. main code):
    • 6 *.bat files (129 lines of code)
    • 1 *.csproj files (25 lines of code)
  • " *.bat" is biggest, containing 83.77% of code.
  • " *.csproj" is smallest, containing 16.23% of code.


*.bat129 LOC (83%) 6 files
*.csproj25 LOC (16%) 1 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 ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 8 files match defined criteria (3,190 lines of code, 69.0% vs. main code):
    • 3 *.xml files (3,079 lines of code)
    • 4 *.md files (106 lines of code)
    • 1 *.json files (5 lines of code)
  • " *.xml" is biggest, containing 96.52% of code.
  • " *.json" is smallest, containing 0.16% of code.


*.xml3079 LOC (96%) 3 files
*.md106 LOC (3%) 4 files
*.json5 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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


2022-01-31 00:55