azure / azure-cli
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
cshtml
in
csproj
cfg
csx
cmd
handlebars
ini
ejs
spec
wxs
wixproj
gitattributes
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.

main1589605 LOC (70%) 3,811 files
test593979 LOC (26%) 1,257 files
generated3139 LOC (<1%) 48 files
build and deployment802 LOC (<1%) 34 files
other56895 LOC (2%) 394 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
wxs
spec
wixproj
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3811 files match defined criteria (1,589,605 LOC, 100.0% vs. main code):
    • 3,785 *.py files (1,588,308 LOC)
    • 3 *.ps1 files (553 LOC)
    • 3 *.cmd files (226 LOC)
    • 1 *.wxs files (145 LOC)
    • 2 *.g4 files (123 LOC)
    • 1 *.spec files (74 LOC)
    • 1 *.wixproj files (65 LOC)
    • 2 *.html files (41 LOC)
    • 2 *.yaml files (26 LOC)
    • 5 *.in files (20 LOC)
    • 1 *.js files (17 LOC)
    • 5 *.cfg files (7 LOC)
  • " *.py" is biggest, containing 99.92% of LOC.
  • " *.cfg" is smallest, containing 0% of LOC.


*.py1588308 LOC (99%) 3,785 files
*.ps1553 LOC (<1%) 3 files
*.cmd226 LOC (<1%) 3 files
*.wxs145 LOC (<1%) 1 file
*.g4123 LOC (<1%) 2 files
*.spec74 LOC (<1%) 1 file
*.wixproj65 LOC (<1%) 1 file
*.html41 LOC (<1%) 2 files
*.yaml26 LOC (<1%) 2 files
*.in20 LOC (<1%) 5 files
*.js17 LOC (<1%) 1 file
*.cfg7 LOC (<1%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cshtml
csproj
csx
ejs
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 ".*_tests[.].*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*/test[.].*".
  • 1257 files match defined criteria (593,979 LOC, 37.4% vs. main code):
    • 576 *.yaml files (461,218 LOC)
    • 615 *.py files (130,392 LOC)
    • 1 *.gql files (1,052 LOC)
    • 8 *.sh files (254 LOC)
    • 14 *.cshtml files (190 LOC)
    • 9 *.cs files (159 LOC)
    • 4 *.ps1 files (154 LOC)
    • 3 *.bat files (138 LOC)
    • 5 *.css files (118 LOC)
    • 5 *.csproj files (100 LOC)
    • 7 *.js files (58 LOC)
    • 3 *.csx files (51 LOC)
    • 1 *.sql files (37 LOC)
    • 3 *.xml files (24 LOC)
    • 1 *.ipynb files (20 LOC)
    • 2 *.ejs files (14 LOC)
  • " *.yaml" is biggest, containing 77.65% of LOC.
  • " *.ejs" is smallest, containing 0% of LOC.


*.yaml461218 LOC (77%) 576 files
*.py130392 LOC (21%) 615 files
*.gql1052 LOC (<1%) 1 file
*.sh254 LOC (<1%) 8 files
*.cshtml190 LOC (<1%) 14 files
*.cs159 LOC (<1%) 9 files
*.ps1154 LOC (<1%) 4 files
*.bat138 LOC (<1%) 3 files
*.css118 LOC (<1%) 5 files
*.csproj100 LOC (<1%) 5 files
*.js58 LOC (<1%) 7 files
*.csx51 LOC (<1%) 3 files
*.sql37 LOC (<1%) 1 file
*.xml24 LOC (<1%) 3 files
*.ipynb20 LOC (<1%) 1 file
*.ejs14 LOC (<1%) 2 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/.*".
  • 48 files match defined criteria (3,139 LOC, 0.2% vs. main code). All matches are in *.py files.


*.py3139 LOC (100%) 48 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitattributes".
  • 34 files match defined criteria (802 LOC, 0.1% vs. main code):
    • 20 *.sh files (380 LOC)
    • 10 *.bat files (336 LOC)
    • 4 *.dockerfile files (86 LOC)
  • " *.sh" is biggest, containing 47.38% of LOC.
  • " *.dockerfile" is smallest, containing 10.72% of LOC.


*.sh380 LOC (47%) 20 files
*.bat336 LOC (41%) 10 files
*.dockerfile86 LOC (10%) 4 files
Other Code
txt
ini
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 ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
  • 394 files match defined criteria (56,895 LOC, 3.6% vs. main code):
    • 55 *.txt files (29,021 LOC)
    • 240 *.json files (12,293 LOC)
    • 12 *.rst files (7,856 LOC)
    • 85 *.md files (7,711 LOC)
    • 2 *.ini files (14 LOC)
  • " *.txt" is biggest, containing 51.01% of LOC.
  • " *.ini" is smallest, containing 0.02% of LOC.


*.txt29021 LOC (51%) 55 files
*.json12293 LOC (21%) 240 files
*.rst7856 LOC (13%) 12 files
*.md7711 LOC (13%) 85 files
*.ini14 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:18