GoogleCloudPlatform / magic-modules
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
p8
pb
proto
pub
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.

main170306 LOC (94%) 1,001 files
test6412 LOC (3%) 27 files
generated0 LOC (0%) 0 files
build and deployment63 LOC (<1%) 1 file
other2913 LOC (1%) 144 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1001 files match defined criteria (170,306 LOC, 100.0% vs. main code):
    • 900 *.yaml files (157,775 LOC)
    • 97 *.go files (12,499 LOC)
    • 4 *.kt files (32 LOC)
  • " *.yaml" is biggest, containing 92.64% of LOC.
  • " *.kt" is smallest, containing 0.02% of LOC.


*.yaml157775 LOC (92%) 900 files
*.go12499 LOC (7%) 97 files
*.kt32 LOC (<1%) 4 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
  • 27 files match defined criteria (6,412 LOC, 3.8% vs. main code):
    • 26 *.go files (6,411 LOC)
    • 1 *.yaml files (1 LOC)
  • " *.go" is biggest, containing 99.98% of LOC.
  • " *.yaml" is smallest, containing 0.02% of LOC.


*.go6411 LOC (99%) 26 files
*.yaml1 LOC (<1%) 1 file
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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 1 file matches defined criteria (63 LOC, 0.0% vs. main code). All matches are in *.sh files.


*.sh63 LOC (100%) 1 file
Other Code
mod
txt
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 ".*[.]pb".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ss]amples/.*".
  • 144 files match defined criteria (2,913 LOC, 1.7% vs. main code):
    • 53 *.json files (1,224 LOC)
    • 70 *.yaml files (1,038 LOC)
    • 6 *.md files (394 LOC)
    • 10 *.mod files (238 LOC)
    • 5 *.txt files (19 LOC)
  • " *.json" is biggest, containing 42.02% of LOC.
  • " *.txt" is smallest, containing 0.65% of LOC.


*.json1224 LOC (42%) 53 files
*.yaml1038 LOC (35%) 70 files
*.md394 LOC (13%) 6 files
*.mod238 LOC (8%) 10 files
*.txt19 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:33