azure / macro-utils-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
gitattributes
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.

main361 LOC (8%) 4 files
test2163 LOC (49%) 54 files
generated1400 LOC (31%) 1 file
build and deployment79 LOC (1%) 2 files
other377 LOC (8%) 5 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 4 files match defined criteria (361 LOC, 100.0% vs. main code):
    • 1 *.h files (327 LOC)
    • 2 *.cs files (25 LOC)
    • 1 *.cmake files (9 LOC)
  • " *.h" is biggest, containing 90.58% of LOC.
  • " *.cmake" is smallest, containing 2.49% of LOC.


*.h327 LOC (90%) 1 file
*.cs25 LOC (6%) 2 files
*.cmake9 LOC (2%) 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_.*".
  • 54 files match defined criteria (2,163 LOC, 599.2% vs. main code):
    • 27 *.c files (2,029 LOC)
    • 27 *.h files (134 LOC)
  • " *.c" is biggest, containing 93.8% of LOC.
  • " *.h" is smallest, containing 6.2% of LOC.


*.c2029 LOC (93%) 27 files
*.h134 LOC (6%) 27 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 ".*_generated[.][a-z]+".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 1 file matches defined criteria (1,400 LOC, 387.8% vs. main code). All matches are in *.cs files.


*.cs1400 LOC (100%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
  • 2 files match defined criteria (79 LOC, 21.9% vs. main code):
    • 1 *.csproj files (67 LOC)
    • 1 *.sh files (12 LOC)
  • " *.csproj" is biggest, containing 84.81% of LOC.
  • " *.sh" is smallest, containing 15.19% of LOC.


*.csproj67 LOC (84%) 1 file
*.sh12 LOC (15%) 1 file
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
  • 5 files match defined criteria (377 LOC, 104.4% vs. main code):
    • 3 *.md files (216 LOC)
    • 2 *.txt files (161 LOC)
  • " *.md" is biggest, containing 57.29% of LOC.
  • " *.txt" is smallest, containing 42.71% of LOC.


*.md216 LOC (57%) 3 files
*.txt161 LOC (42%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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


2025-05-06 21:18