azure / azure-sdk-for-cpp
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
cmd
patch
clang-format
csproj
gitmodules
xsd
gitattributes
targets
nuspec
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.

main121861 LOC (45%) 826 files
test86133 LOC (32%) 346 files
generated18393 LOC (6%) 29 files
build and deployment35 LOC (<1%) 2 files
other42302 LOC (15%) 475 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 826 files match defined criteria (121,861 LOC, 100.0% vs. main code):
    • 217 *.cpp files (63,356 LOC)
    • 364 *.hpp files (27,014 LOC)
    • 123 *.ps1 files (16,390 LOC)
    • 45 *.rs files (11,912 LOC)
    • 41 *.cmake files (1,980 LOC)
    • 1 *.psm1 files (263 LOC)
    • 1 *.css files (247 LOC)
    • 21 *.in files (243 LOC)
    • 1 *.js files (196 LOC)
    • 3 *.toml files (149 LOC)
    • 6 *.yaml files (75 LOC)
    • 3 *.cmd files (36 LOC)
  • " *.cpp" is biggest, containing 51.99% of LOC.
  • " *.cmd" is smallest, containing 0.03% of LOC.


*.cpp63356 LOC (51%) 217 files
*.hpp27014 LOC (22%) 364 files
*.ps116390 LOC (13%) 123 files
*.rs11912 LOC (9%) 45 files
*.cmake1980 LOC (1%) 41 files
*.psm1263 LOC (<1%) 1 file
*.css247 LOC (<1%) 1 file
*.in243 LOC (<1%) 21 files
*.js196 LOC (<1%) 1 file
*.toml149 LOC (<1%) 3 files
*.yaml75 LOC (<1%) 6 files
*.cmd36 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
  • 346 files match defined criteria (86,133 LOC, 70.7% vs. main code):
    • 246 *.cpp files (79,105 LOC)
    • 79 *.hpp files (6,221 LOC)
    • 11 *.ps1 files (648 LOC)
    • 10 *.yaml files (159 LOC)
  • " *.cpp" is biggest, containing 91.84% of LOC.
  • " *.yaml" is smallest, containing 0.18% of LOC.


*.cpp79105 LOC (91%) 246 files
*.hpp6221 LOC (7%) 79 files
*.ps1648 LOC (<1%) 11 files
*.yaml159 LOC (<1%) 10 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*/generated/.*".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
  • 29 files match defined criteria (18,393 LOC, 15.1% vs. main code):
    • 16 *.cpp files (14,248 LOC)
    • 1 *.json files (2,786 LOC)
    • 12 *.hpp files (1,359 LOC)
  • " *.cpp" is biggest, containing 77.46% of LOC.
  • " *.hpp" is smallest, containing 7.39% of LOC.


*.cpp14248 LOC (77%) 16 files
*.json2786 LOC (15%) 1 file
*.hpp1359 LOC (7%) 12 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 ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
  • 2 files match defined criteria (35 LOC, 0.0% vs. main code):
    • 1 *.sh files (24 LOC)
    • 1 *.bat files (11 LOC)
  • " *.sh" is biggest, containing 68.57% of LOC.
  • " *.bat" is smallest, containing 31.43% of LOC.


*.sh24 LOC (68%) 1 file
*.bat11 LOC (31%) 1 file
Other Code
txt
patch
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]patch".
  • 475 files match defined criteria (42,302 LOC, 34.7% vs. main code):
    • 121 *.md files (16,439 LOC)
    • 152 *.txt files (10,162 LOC)
    • 116 *.json files (9,769 LOC)
    • 78 *.cpp files (5,358 LOC)
    • 5 *.hpp files (271 LOC)
    • 1 *.patch files (166 LOC)
    • 1 *.svg files (76 LOC)
    • 1 *.rs files (61 LOC)
  • " *.md" is biggest, containing 38.86% of LOC.
  • " *.rs" is smallest, containing 0.14% of LOC.


*.md16439 LOC (38%) 121 files
*.txt10162 LOC (24%) 152 files
*.json9769 LOC (23%) 116 files
*.cpp5358 LOC (12%) 78 files
*.hpp271 LOC (<1%) 5 files
*.patch166 LOC (<1%) 1 file
*.svg76 LOC (<1%) 1 file
*.rs61 LOC (<1%) 1 file
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
  • *.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
  • *.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
  • *.rs 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
  • *.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
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.toml 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
  • *.yaml 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
  • *.cmd 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


2025-05-06 21:58