microsoft / OpenXR-MixedReality
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
vcxproj
filters
hlsl
inl
targets
gitattributes
nuspec
clang-format
props
txt
  • 19 extensions are included in analyses: h, cpp, vcxproj, filters, hlsl, inl, md, targets, gitignore, hpp, gitattributes, xml, json, yml, nuspec, html, clang-format, props, txt
  • 5 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 ".*/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.

main87273 LOC (94%) 194 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other4959 LOC (5%) 48 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
inl
vcxproj
filters
hlsl
props
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 194 files match defined criteria (87,273 lines of code, 100.0% vs. main code):
    • 128 *.h files (50,008 lines of code)
    • 6 *.inl files (23,386 lines of code)
    • 32 *.cpp files (10,165 lines of code)
    • 8 *.vcxproj files (2,591 lines of code)
    • 8 *.filters files (443 lines of code)
    • 2 *.hpp files (325 lines of code)
    • 7 *.hlsl files (263 lines of code)
    • 1 *.yml files (70 lines of code)
    • 1 *.props files (15 lines of code)
    • 1 *.targets files (7 lines of code)
  • " *.h" is biggest, containing 57.3% of code.
  • " *.targets" is smallest, containing 0.01% of code.


*.h50008 LOC (57%) 128 files
*.inl23386 LOC (26%) 6 files
*.cpp10165 LOC (11%) 32 files
*.vcxproj2591 LOC (2%) 8 files
*.filters443 LOC (<1%) 8 files
*.hpp325 LOC (<1%) 2 files
*.hlsl263 LOC (<1%) 7 files
*.yml70 LOC (<1%) 1 files
*.props15 LOC (<1%) 1 files
*.targets7 LOC (<1%) 1 files
Other Code
vcxproj
filters
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 ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 48 files match defined criteria (4,959 lines of code, 5.7% vs. main code):
    • 23 *.cpp files (3,188 lines of code)
    • 7 *.vcxproj files (1,119 lines of code)
    • 3 *.md files (234 lines of code)
    • 9 *.h files (229 lines of code)
    • 6 *.filters files (189 lines of code)
  • " *.cpp" is biggest, containing 64.29% of code.
  • " *.filters" is smallest, containing 3.81% of code.


*.cpp3188 LOC (64%) 23 files
*.vcxproj1119 LOC (22%) 7 files
*.md234 LOC (4%) 3 files
*.h229 LOC (4%) 9 files
*.filters189 LOC (3%) 6 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
  • *.inl 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
  • *.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
  • *.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
  • *.hpp 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
  • *.hlsl 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
  • *.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
  • *.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-31 01:09