azure / ARO-RP
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
mod
rego
txt
mk
npmrc
cfg
prettierignore
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.

main157101 LOC (52%) 1,552 files
test97876 LOC (32%) 431 files
generated6749 LOC (2%) 59 files
build and deployment3205 LOC (1%) 34 files
other32313 LOC (10%) 174 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rego
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1552 files match defined criteria (157,101 LOC, 100.0% vs. main code):
    • 1,117 *.go files (98,299 LOC)
    • 298 *.py files (47,810 LOC)
    • 94 *.yaml files (6,751 LOC)
    • 28 *.tsx files (3,945 LOC)
    • 6 *.rego files (200 LOC)
    • 2 *.js files (54 LOC)
    • 2 *.dockerignore files (23 LOC)
    • 3 *.html files (16 LOC)
    • 1 *.cfg files (2 LOC)
    • 1 *.cjs files (1 LOC)
  • " *.go" is biggest, containing 62.57% of LOC.
  • " *.cjs" is smallest, containing 0% of LOC.


*.go98299 LOC (62%) 1,117 files
*.py47810 LOC (30%) 298 files
*.yaml6751 LOC (4%) 94 files
*.tsx3945 LOC (2%) 28 files
*.rego200 LOC (<1%) 6 files
*.js54 LOC (<1%) 2 files
*.dockerignore23 LOC (<1%) 2 files
*.html16 LOC (<1%) 3 files
*.cfg2 LOC (<1%) 1 file
*.cjs1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • 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 ".*/test_.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
  • 431 files match defined criteria (97,876 LOC, 62.3% vs. main code):
    • 407 *.go files (94,849 LOC)
    • 9 *.py files (1,992 LOC)
    • 5 *.rego files (414 LOC)
    • 4 *.sh files (381 LOC)
    • 6 *.yaml files (240 LOC)
  • " *.go" is biggest, containing 96.91% of LOC.
  • " *.yaml" is smallest, containing 0.25% of LOC.


*.go94849 LOC (96%) 407 files
*.py1992 LOC (2%) 9 files
*.rego414 LOC (<1%) 5 files
*.sh381 LOC (<1%) 4 files
*.yaml240 LOC (<1%) 6 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 any line of content like "//[ ]*Generated by .*".
  • 59 files match defined criteria (6,749 LOC, 4.3% vs. main code). All matches are in *.go files.


*.go6749 LOC (100%) 59 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 ".*[.]mk".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
  • 34 files match defined criteria (3,205 LOC, 2.0% vs. main code). All matches are in *.sh files.


*.sh3205 LOC (100%) 34 files
Other Code
mod
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]dockerignore".
  • 174 files match defined criteria (32,313 LOC, 20.6% vs. main code):
    • 155 *.json files (29,466 LOC)
    • 1 *.mod files (1,615 LOC)
    • 8 *.md files (742 LOC)
    • 1 *.go files (189 LOC)
    • 4 *.txt files (134 LOC)
    • 2 *.sh files (100 LOC)
    • 2 *.rst files (48 LOC)
    • 1 *.svg files (19 LOC)
  • " *.json" is biggest, containing 91.19% of LOC.
  • " *.svg" is smallest, containing 0.06% of LOC.


*.json29466 LOC (91%) 155 files
*.mod1615 LOC (4%) 1 file
*.md742 LOC (2%) 8 files
*.go189 LOC (<1%) 1 file
*.txt134 LOC (<1%) 4 files
*.sh100 LOC (<1%) 2 files
*.rst48 LOC (<1%) 2 files
*.svg19 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:57