microsoft / cppgraphqlgen
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
txt
in
cmake
clang-format
gitmodules
  • 12 extensions are included in analyses: cpp, h, txt, md, graphql, in, cmake, yml, gitignore, clang-format, json, gitmodules
  • 5 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 ".*/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) (19 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.

main18424 LOC (44%) 64 files
test4931 LOC (11%) 12 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other17800 LOC (43%) 172 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
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 64 files match defined criteria (18,424 lines of code, 100.0% vs. main code):
    • 22 *.cpp files (12,944 lines of code)
    • 34 *.h files (5,096 lines of code)
    • 4 *.cmake files (206 lines of code)
    • 1 *.graphql files (95 lines of code)
    • 3 *.in files (83 lines of code)
  • " *.cpp" is biggest, containing 70.26% of code.
  • " *.in" is smallest, containing 0.45% of code.


*.cpp12944 LOC (70%) 22 files
*.h5096 LOC (27%) 34 files
*.cmake206 LOC (1%) 4 files
*.graphql95 LOC (<1%) 1 files
*.in83 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 12 files match defined criteria (4,931 lines of code, 26.8% vs. main code):
    • 11 *.cpp files (4,888 lines of code)
    • 1 *.in files (43 lines of code)
  • " *.cpp" is biggest, containing 99.13% of code.
  • " *.in" is smallest, containing 0.87% of code.


*.cpp4888 LOC (99%) 11 files
*.in43 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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
  • 172 files match defined criteria (17,800 lines of code, 96.6% vs. main code):
    • 76 *.h files (9,093 lines of code)
    • 80 *.cpp files (7,240 lines of code)
    • 9 *.md files (1,080 lines of code)
    • 7 *.graphql files (387 lines of code)
  • " *.h" is biggest, containing 51.08% of code.
  • " *.graphql" is smallest, containing 2.17% of code.


*.h9093 LOC (51%) 76 files
*.cpp7240 LOC (40%) 80 files
*.md1080 LOC (6%) 9 files
*.graphql387 LOC (2%) 7 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
  • *.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
  • *.graphql 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


2022-01-30 21:56