azure / iot-hub-device-update
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
hcl
gitattributes
editorconfig
tcl
cfg
clang-format
jsonc
clang-tidy
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.

main37188 LOC (60%) 316 files
test7009 LOC (11%) 61 files
generated0 LOC (0%) 0 files
build and deployment2819 LOC (4%) 24 files
other14935 LOC (24%) 229 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hcl
jsonc
tcl
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 316 files match defined criteria (37,188 LOC, 100.0% vs. main code):
    • 74 *.c files (18,615 LOC)
    • 48 *.cpp files (8,383 LOC)
    • 108 *.h files (3,575 LOC)
    • 44 *.hpp files (1,794 LOC)
    • 9 *.ps1 files (1,413 LOC)
    • 8 *.py files (1,338 LOC)
    • 4 *.psm1 files (678 LOC)
    • 4 *.yaml files (549 LOC)
    • 7 *.cmake files (440 LOC)
    • 5 *.tf files (221 LOC)
    • 2 *.hcl files (86 LOC)
    • 1 *.jsonc files (84 LOC)
    • 1 *.tcl files (10 LOC)
    • 1 *.cfg files (2 LOC)
  • " *.c" is biggest, containing 50.06% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.c18615 LOC (50%) 74 files
*.cpp8383 LOC (22%) 48 files
*.h3575 LOC (9%) 108 files
*.hpp1794 LOC (4%) 44 files
*.ps11413 LOC (3%) 9 files
*.py1338 LOC (3%) 8 files
*.psm1678 LOC (1%) 4 files
*.yaml549 LOC (1%) 4 files
*.cmake440 LOC (1%) 7 files
*.tf221 LOC (<1%) 5 files
*.hcl86 LOC (<1%) 2 files
*.jsonc84 LOC (<1%) 1 file
*.tcl10 LOC (<1%) 1 file
*.cfg2 LOC (<1%) 1 file
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]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
  • 61 files match defined criteria (7,009 LOC, 18.8% vs. main code):
    • 39 *.cpp files (5,288 LOC)
    • 10 *.py files (635 LOC)
    • 8 *.hpp files (571 LOC)
    • 4 *.sh files (515 LOC)
  • " *.cpp" is biggest, containing 75.45% of LOC.
  • " *.sh" is smallest, containing 7.35% of LOC.


*.cpp5288 LOC (75%) 39 files
*.py635 LOC (9%) 10 files
*.hpp571 LOC (8%) 8 files
*.sh515 LOC (7%) 4 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 24 files match defined criteria (2,819 LOC, 7.6% vs. main code). All matches are in *.sh files.


*.sh2819 LOC (100%) 24 files
Other Code
txt
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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]editorconfig".
  • 229 files match defined criteria (14,935 LOC, 40.2% vs. main code):
    • 9 *.sh files (4,306 LOC)
    • 133 *.txt files (3,288 LOC)
    • 45 *.json files (2,690 LOC)
    • 31 *.md files (2,225 LOC)
    • 9 *.ps1 files (1,960 LOC)
    • 1 *.psm1 files (325 LOC)
    • 1 *.cpp files (141 LOC)
  • " *.sh" is biggest, containing 28.83% of LOC.
  • " *.cpp" is smallest, containing 0.94% of LOC.


*.sh4306 LOC (28%) 9 files
*.txt3288 LOC (22%) 133 files
*.json2690 LOC (18%) 45 files
*.md2225 LOC (14%) 31 files
*.ps11960 LOC (13%) 9 files
*.psm1325 LOC (2%) 1 file
*.cpp141 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 22:12