azure / sonic-sairedis.msft
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
ini
txt
profile
m4
cfg
i
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.

main86784 LOC (92%) 482 files
test5602 LOC (5%) 32 files
generated0 LOC (0%) 0 files
build and deployment597 LOC (<1%) 7 files
other839 LOC (<1%) 44 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
i
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 482 files match defined criteria (86,784 LOC, 100.0% vs. main code):
    • 299 *.cpp files (75,413 LOC)
    • 178 *.h files (10,961 LOC)
    • 1 *.pl files (328 LOC)
    • 1 *.i files (65 LOC)
    • 1 *.cfg files (15 LOC)
    • 2 *.py files (2 LOC)
  • " *.cpp" is biggest, containing 86.9% of LOC.
  • " *.py" is smallest, containing 0% of LOC.


*.cpp75413 LOC (86%) 299 files
*.h10961 LOC (12%) 178 files
*.pl328 LOC (<1%) 1 file
*.i65 LOC (<1%) 1 file
*.cfg15 LOC (<1%) 1 file
*.py2 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
profile
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test[.].*".
  • 32 files match defined criteria (5,602 LOC, 6.5% vs. main code):
    • 12 *.cpp files (4,101 LOC)
    • 7 *.pl files (933 LOC)
    • 1 *.py files (218 LOC)
    • 1 *.pm files (151 LOC)
    • 4 *.h files (110 LOC)
    • 5 *.sh files (79 LOC)
    • 2 *.profile files (10 LOC)
  • " *.cpp" is biggest, containing 73.21% of LOC.
  • " *.profile" is smallest, containing 0.18% of LOC.


*.cpp4101 LOC (73%) 12 files
*.pl933 LOC (16%) 7 files
*.py218 LOC (3%) 1 file
*.pm151 LOC (2%) 1 file
*.h110 LOC (1%) 4 files
*.sh79 LOC (1%) 5 files
*.profile10 LOC (<1%) 2 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 ".*/[.]gitmodules".
  • 7 files match defined criteria (597 LOC, 0.7% vs. main code). All matches are in *.sh files.


*.sh597 LOC (100%) 7 files
Other Code
ini
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
  • 44 files match defined criteria (839 LOC, 1.0% vs. main code):
    • 24 *.ini files (508 LOC)
    • 2 *.md files (161 LOC)
    • 9 *.json files (129 LOC)
    • 9 *.txt files (41 LOC)
  • " *.ini" is biggest, containing 60.55% of LOC.
  • " *.txt" is smallest, containing 4.89% of LOC.


*.ini508 LOC (60%) 24 files
*.md161 LOC (19%) 2 files
*.json129 LOC (15%) 9 files
*.txt41 LOC (4%) 9 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 23:09