azure / azure-cli-extensions
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
cfg
cshtml
txt
jsonc
csproj
ejs
in
rego
tpl
ini
handlebars
cmd
gitattributes
vhd
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.

main2564717 LOC (77%) 12,459 files
test576827 LOC (17%) 1,850 files
generated120068 LOC (3%) 421 files
build and deployment611 LOC (<1%) 15 files
other47074 LOC (1%) 825 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
in
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 12459 files match defined criteria (2,564,717 LOC, 100.0% vs. main code):
    • 12,254 *.py files (2,562,219 LOC)
    • 1 *.rego files (984 LOC)
    • 8 *.ps1 files (623 LOC)
    • 10 *.yaml files (510 LOC)
    • 179 *.cfg files (240 LOC)
    • 1 *.g4 files (84 LOC)
    • 2 *.toml files (51 LOC)
    • 3 *.in files (3 LOC)
    • 1 *.cmd files (3 LOC)
  • " *.py" is biggest, containing 99.9% of LOC.
  • " *.cmd" is smallest, containing 0% of LOC.


*.py2562219 LOC (99%) 12,254 files
*.rego984 LOC (<1%) 1 file
*.ps1623 LOC (<1%) 8 files
*.yaml510 LOC (<1%) 10 files
*.cfg240 LOC (<1%) 179 files
*.g484 LOC (<1%) 1 file
*.toml51 LOC (<1%) 2 files
*.in3 LOC (<1%) 3 files
*.cmd3 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
jsonc
cshtml
tpl
csproj
ejs
vhd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
  • 1850 files match defined criteria (576,827 LOC, 22.5% vs. main code):
    • 727 *.yaml files (470,293 LOC)
    • 1,023 *.py files (104,285 LOC)
    • 5 *.sh files (527 LOC)
    • 14 *.jsonc files (448 LOC)
    • 28 *.cshtml files (374 LOC)
    • 16 *.cs files (304 LOC)
    • 11 *.css files (238 LOC)
    • 3 *.tpl files (166 LOC)
    • 10 *.js files (82 LOC)
    • 5 *.csproj files (46 LOC)
    • 4 *.ejs files (28 LOC)
    • 2 *.html files (20 LOC)
    • 1 *.vhd files (11 LOC)
    • 1 *.bat files (5 LOC)
  • " *.yaml" is biggest, containing 81.53% of LOC.
  • " *.bat" is smallest, containing 0% of LOC.


*.yaml470293 LOC (81%) 727 files
*.py104285 LOC (18%) 1,023 files
*.sh527 LOC (<1%) 5 files
*.jsonc448 LOC (<1%) 14 files
*.cshtml374 LOC (<1%) 28 files
*.cs304 LOC (<1%) 16 files
*.css238 LOC (<1%) 11 files
*.tpl166 LOC (<1%) 3 files
*.js82 LOC (<1%) 10 files
*.csproj46 LOC (<1%) 5 files
*.ejs28 LOC (<1%) 4 files
*.html20 LOC (<1%) 2 files
*.vhd11 LOC (<1%) 1 file
*.bat5 LOC (<1%) 1 file
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/.*".
    • files with paths like ".*/_generated/.*".
  • 421 files match defined criteria (120,068 LOC, 4.7% vs. main code). All matches are in *.py files.


*.py120068 LOC (100%) 421 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 ".*[.]csproj".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitattributes".
  • 15 files match defined criteria (611 LOC, 0.0% vs. main code):
    • 12 *.sh files (602 LOC)
    • 3 *.bat files (9 LOC)
  • " *.sh" is biggest, containing 98.53% of LOC.
  • " *.bat" is smallest, containing 1.47% of LOC.


*.sh602 LOC (98%) 12 files
*.bat9 LOC (1%) 3 files
Other Code
txt
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ss]amples/.*".
  • 825 files match defined criteria (47,074 LOC, 1.8% vs. main code):
    • 224 *.md files (21,705 LOC)
    • 371 *.json files (15,256 LOC)
    • 204 *.rst files (8,488 LOC)
    • 23 *.txt files (987 LOC)
    • 2 *.rego files (605 LOC)
    • 1 *.sh files (33 LOC)
  • " *.md" is biggest, containing 46.11% of LOC.
  • " *.sh" is smallest, containing 0.07% of LOC.


*.md21705 LOC (46%) 224 files
*.json15256 LOC (32%) 371 files
*.rst8488 LOC (18%) 204 files
*.txt987 LOC (2%) 23 files
*.rego605 LOC (1%) 2 files
*.sh33 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:33