azure / azure-iot-sdk-c
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
cmd
vcxproj
resx
gitattributes
xsl
mak
csproj
gitmodules
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.

main77783 LOC (35%) 244 files
test117279 LOC (54%) 313 files
generated214 LOC (<1%) 3 files
build and deployment1345 LOC (<1%) 38 files
other19866 LOC (9%) 334 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
xsl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 244 files match defined criteria (77,783 LOC, 100.0% vs. main code):
    • 97 *.c files (66,664 LOC)
    • 108 *.h files (6,371 LOC)
    • 1 *.css files (1,426 LOC)
    • 10 *.cs files (1,101 LOC)
    • 11 *.py files (829 LOC)
    • 10 *.cmd files (458 LOC)
    • 1 *.yaml files (379 LOC)
    • 3 *.ps1 files (321 LOC)
    • 2 *.cmake files (199 LOC)
    • 1 *.xsl files (35 LOC)
  • " *.c" is biggest, containing 85.71% of LOC.
  • " *.xsl" is smallest, containing 0.04% of LOC.


*.c66664 LOC (85%) 97 files
*.h6371 LOC (8%) 108 files
*.css1426 LOC (1%) 1 file
*.cs1101 LOC (1%) 10 files
*.py829 LOC (1%) 11 files
*.cmd458 LOC (<1%) 10 files
*.yaml379 LOC (<1%) 1 file
*.ps1321 LOC (<1%) 3 files
*.cmake199 LOC (<1%) 2 files
*.xsl35 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 ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
  • 313 files match defined criteria (117,279 LOC, 150.8% vs. main code):
    • 271 *.c files (107,151 LOC)
    • 11 *.cpp files (9,379 LOC)
    • 26 *.h files (580 LOC)
    • 5 *.sh files (169 LOC)
  • " *.c" is biggest, containing 91.36% of LOC.
  • " *.sh" is smallest, containing 0.14% of LOC.


*.c107151 LOC (91%) 271 files
*.cpp9379 LOC (7%) 11 files
*.h580 LOC (<1%) 26 files
*.sh169 LOC (<1%) 5 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 ".*[.]designer[.](cs|vb)".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 3 files match defined criteria (214 LOC, 0.3% vs. main code). All matches are in *.cs files.


*.cs214 LOC (100%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
mak
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • 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 ".*[.]mak".
  • 38 files match defined criteria (1,345 LOC, 1.7% vs. main code):
    • 36 *.sh files (1,173 LOC)
    • 1 *.csproj files (156 LOC)
    • 1 *.mak files (16 LOC)
  • " *.sh" is biggest, containing 87.21% of LOC.
  • " *.mak" is smallest, containing 1.19% of LOC.


*.sh1173 LOC (87%) 36 files
*.csproj156 LOC (11%) 1 file
*.mak16 LOC (1%) 1 file
Other Code
txt
vcxproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 334 files match defined criteria (19,866 LOC, 25.5% vs. main code):
    • 214 *.txt files (7,687 LOC)
    • 41 *.c files (7,229 LOC)
    • 57 *.md files (3,728 LOC)
    • 5 *.vcxproj files (898 LOC)
    • 11 *.h files (163 LOC)
    • 4 *.svg files (94 LOC)
    • 1 *.cpp files (46 LOC)
    • 1 *.json files (21 LOC)
  • " *.txt" is biggest, containing 38.69% of LOC.
  • " *.json" is smallest, containing 0.11% of LOC.


*.txt7687 LOC (38%) 214 files
*.c7229 LOC (36%) 41 files
*.md3728 LOC (18%) 57 files
*.vcxproj898 LOC (4%) 5 files
*.h163 LOC (<1%) 11 files
*.svg94 LOC (<1%) 4 files
*.cpp46 LOC (<1%) 1 file
*.json21 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.xsl 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


2025-05-06 21:16