azure / azure-sdk-for-go
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
txt
tpl
cmd
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.

main2756546 LOC (80%) 10,601 files
test547030 LOC (16%) 3,918 files
generated28255 LOC (<1%) 85 files
build and deployment120 LOC (<1%) 3 files
other84015 LOC (2%) 1,690 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 10601 files match defined criteria (2,756,546 LOC, 100.0% vs. main code):
    • 10,418 *.go files (2,738,494 LOC)
    • 125 *.ps1 files (16,690 LOC)
    • 13 *.tpl files (325 LOC)
    • 39 *.yaml files (295 LOC)
    • 1 *.psm1 files (263 LOC)
    • 1 *.css files (247 LOC)
    • 1 *.js files (196 LOC)
    • 3 *.cmd files (36 LOC)
  • " *.go" is biggest, containing 99.35% of LOC.
  • " *.cmd" is smallest, containing 0% of LOC.


*.go2738494 LOC (99%) 10,418 files
*.ps116690 LOC (<1%) 125 files
*.tpl325 LOC (<1%) 13 files
*.yaml295 LOC (<1%) 39 files
*.psm1263 LOC (<1%) 1 file
*.css247 LOC (<1%) 1 file
*.js196 LOC (<1%) 1 file
*.cmd36 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
    • files with paths like ".*/test[.].*".
  • 3918 files match defined criteria (547,030 LOC, 19.8% vs. main code):
    • 3,911 *.go files (546,365 LOC)
    • 5 *.ps1 files (610 LOC)
    • 2 *.yaml files (55 LOC)
  • " *.go" is biggest, containing 99.88% of LOC.
  • " *.yaml" is smallest, containing 0.01% of LOC.


*.go546365 LOC (99%) 3,911 files
*.ps1610 LOC (<1%) 5 files
*.yaml55 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/.*".
    • files with paths like ".*/package[-]lock[.]json".
  • 85 files match defined criteria (28,255 LOC, 1.0% vs. main code):
    • 79 *.go files (24,224 LOC)
    • 2 *.json files (2,792 LOC)
    • 4 *.md files (1,239 LOC)
  • " *.go" is biggest, containing 85.73% of LOC.
  • " *.md" is smallest, containing 4.39% of LOC.


*.go24224 LOC (85%) 79 files
*.json2792 LOC (9%) 2 files
*.md1239 LOC (4%) 4 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
  • 3 files match defined criteria (120 LOC, 0.0% vs. main code). All matches are in *.sh files.


*.sh120 LOC (100%) 3 files
Other Code
mod
txt
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 ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]svg".
  • 1690 files match defined criteria (84,015 LOC, 3.0% vs. main code):
    • 937 *.md files (63,227 LOC)
    • 130 *.json files (8,941 LOC)
    • 312 *.mod files (6,188 LOC)
    • 309 *.txt files (5,261 LOC)
    • 1 *.go files (322 LOC)
    • 1 *.svg files (76 LOC)
  • " *.md" is biggest, containing 75.26% of LOC.
  • " *.svg" is smallest, containing 0.09% of LOC.


*.md63227 LOC (75%) 937 files
*.json8941 LOC (10%) 130 files
*.mod6188 LOC (7%) 312 files
*.txt5261 LOC (6%) 309 files
*.go322 LOC (<1%) 1 file
*.svg76 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:20