azure / azure-policy
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
rego
txt
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.

main1866 LOC (<1%) 64 files
test0 LOC (0%) 0 files
generated4858 LOC (<1%) 1 file
build and deployment0 LOC (0%) 0 files
other945384 LOC (99%) 5,908 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 64 files match defined criteria (1,866 LOC, 100.0% vs. main code):
    • 55 *.yaml files (1,633 LOC)
    • 9 *.rego files (233 LOC)
  • " *.yaml" is biggest, containing 87.51% of LOC.
  • " *.rego" is smallest, containing 12.49% of LOC.


*.yaml1633 LOC (87%) 55 files
*.rego233 LOC (12%) 9 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (4,858 LOC, 260.3% vs. main code). All matches are in *.json files.


*.json4858 LOC (100%) 1 file
Other Code
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 ".*/[Ss]amples/.*".
    • files with paths like ".*/[Ee]xamples/.*".
  • 5908 files match defined criteria (945,384 LOC, 50663.7% vs. main code):
    • 5,512 *.json files (905,184 LOC)
    • 9 *.xml files (26,610 LOC)
    • 211 *.yaml files (6,487 LOC)
    • 18 *.psm1 files (3,596 LOC)
    • 126 *.md files (2,507 LOC)
    • 19 *.psd1 files (635 LOC)
    • 8 *.ps1 files (246 LOC)
    • 1 *.js files (70 LOC)
    • 4 *.sh files (49 LOC)
  • " *.json" is biggest, containing 95.75% of LOC.
  • " *.sh" is smallest, containing 0.01% of LOC.


*.json905184 LOC (95%) 5,512 files
*.xml26610 LOC (2%) 9 files
*.yaml6487 LOC (<1%) 211 files
*.psm13596 LOC (<1%) 18 files
*.md2507 LOC (<1%) 126 files
*.psd1635 LOC (<1%) 19 files
*.ps1246 LOC (<1%) 8 files
*.js70 LOC (<1%) 1 file
*.sh49 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:22