microsoft / vcpkg
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
cmake
patch
txt
in
gn
diff
gni
vcxproj
props
gitattributes
targets
nix
cmakein
fish
  • 34 extensions are included in analyses: json, cmake, patch, txt, md, in, ps1, h, gn, diff, py, yml, bat, sh, gni, gitignore, psm1, vcxproj, xml, cpp, c, props, rb, pl, gitattributes, targets, zsh, nix, inc, cc, cmakein, psd1, fish, bash
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (120 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) (267 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (2 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.

main92898 LOC (28%) 2434 files
test1887 LOC (<1%) 20 files
generated0 LOC (0%) 0 files
build and deployment304 LOC (<1%) 8 files
other232003 LOC (70%) 5445 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
in
vcxproj
gn
targets
fish
nix
gni
props
cmakein
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2434 files match defined criteria (92,898 lines of code, 100.0% vs. main code):
    • 2,217 *.cmake files (80,923 lines of code)
    • 92 *.in files (3,900 lines of code)
    • 33 *.ps1 files (3,253 lines of code)
    • 2 *.vcxproj files (1,164 lines of code)
    • 29 *.h files (1,094 lines of code)
    • 10 *.py files (587 lines of code)
    • 2 *.pl files (451 lines of code)
    • 7 *.yml files (409 lines of code)
    • 3 *.psm1 files (400 lines of code)
    • 19 *.gn files (185 lines of code)
    • 1 *.targets files (169 lines of code)
    • 2 *.rb files (87 lines of code)
    • 1 *.fish files (84 lines of code)
    • 1 *.nix files (45 lines of code)
    • 5 *.gni files (39 lines of code)
    • 2 *.c files (27 lines of code)
    • 1 *.psd1 files (24 lines of code)
    • 2 *.props files (23 lines of code)
    • 1 *.bash files (10 lines of code)
    • 1 *.cmakein files (9 lines of code)
    • 1 *.cc files (7 lines of code)
    • 1 *.zsh files (7 lines of code)
    • 1 *.inc files (1 lines of code)
  • " *.cmake" is biggest, containing 87.11% of code.
  • " *.inc" is smallest, containing 0% of code.


*.cmake80923 LOC (87%) 2217 files
*.in3900 LOC (4%) 92 files
*.ps13253 LOC (3%) 33 files
*.vcxproj1164 LOC (1%) 2 files
*.h1094 LOC (1%) 29 files
*.py587 LOC (<1%) 10 files
*.pl451 LOC (<1%) 2 files
*.yml409 LOC (<1%) 7 files
*.psm1400 LOC (<1%) 3 files
*.gn185 LOC (<1%) 19 files
*.targets169 LOC (<1%) 1 files
*.rb87 LOC (<1%) 2 files
*.fish84 LOC (<1%) 1 files
*.nix45 LOC (<1%) 1 files
*.gni39 LOC (<1%) 5 files
*.c27 LOC (<1%) 2 files
*.psd124 LOC (<1%) 1 files
*.props23 LOC (<1%) 2 files
*.bash10 LOC (<1%) 1 files
*.cmakein9 LOC (<1%) 1 files
*.cc7 LOC (<1%) 1 files
*.zsh7 LOC (<1%) 1 files
*.inc1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmake
gni
gn
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]tests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 20 files match defined criteria (1,887 lines of code, 2.0% vs. main code):
    • 17 *.cmake files (1,497 lines of code)
    • 1 *.ps1 files (388 lines of code)
    • 1 *.gni files (1 lines of code)
    • 1 *.gn files (1 lines of code)
  • " *.cmake" is biggest, containing 79.33% of code.
  • " *.gn" is smallest, containing 0.05% of code.


*.cmake1497 LOC (79%) 17 files
*.ps1388 LOC (20%) 1 files
*.gni1 LOC (<1%) 1 files
*.gn1 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
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 ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 8 files match defined criteria (304 lines of code, 0.3% vs. main code):
    • 3 *.sh files (266 lines of code)
    • 5 *.bat files (38 lines of code)
  • " *.sh" is biggest, containing 87.5% of code.
  • " *.bat" is smallest, containing 12.5% of code.


*.sh266 LOC (87%) 3 files
*.bat38 LOC (12%) 5 files
Other Code
patch
diff
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 5445 files match defined criteria (232,003 lines of code, 249.7% vs. main code):
    • 3,792 *.json files (138,707 lines of code)
    • 1,625 *.patch files (76,090 lines of code)
    • 14 *.md files (16,455 lines of code)
    • 12 *.diff files (496 lines of code)
    • 2 *.xml files (255 lines of code)
  • " *.json" is biggest, containing 59.79% of code.
  • " *.xml" is smallest, containing 0.11% of code.


*.json138707 LOC (59%) 3792 files
*.patch76090 LOC (32%) 1625 files
*.md16455 LOC (7%) 14 files
*.diff496 LOC (<1%) 12 files
*.xml255 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cmake 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
  • *.in files are analyzed with RustAnalyzer:
    • 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
    • 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
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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
  • *.gn files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic 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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.fish 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
  • *.nix 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
  • *.gni 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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
    • No dependency analysis
  • *.psd1 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
  • *.bash files are analyzed with ShellAnalyzer:
    • 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
  • *.cmakein 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
  • *.cc 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
  • *.zsh files are analyzed with ShellAnalyzer:
    • 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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
    • Basic heuristic dependency analysis


2022-01-30 13:58