GoogleCloudPlatform / accelerated-platforms
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
hcl
tpl
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.

main28446 LOC (68%) 529 files
test2542 LOC (6%) 95 files
generated0 LOC (0%) 0 files
build and deployment1013 LOC (2%) 32 files
other9249 LOC (22%) 66 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 529 files match defined criteria (28,446 LOC, 100.0% vs. main code):
    • 254 *.tf files (18,281 LOC)
    • 151 *.yaml files (6,218 LOC)
    • 26 *.py files (2,624 LOC)
    • 97 *.tfvars files (1,248 LOC)
    • 1 *.tpl files (75 LOC)
  • " *.tf" is biggest, containing 64.27% of LOC.
  • " *.tpl" is smallest, containing 0.26% of LOC.


*.tf18281 LOC (64%) 254 files
*.yaml6218 LOC (21%) 151 files
*.py2624 LOC (9%) 26 files
*.tfvars1248 LOC (4%) 97 files
*.tpl75 LOC (<1%) 1 file
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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
  • 95 files match defined criteria (2,542 LOC, 8.9% vs. main code):
    • 58 *.sh files (1,197 LOC)
    • 12 *.yaml files (564 LOC)
    • 17 *.tf files (481 LOC)
    • 5 *.py files (255 LOC)
    • 3 *.tfvars files (45 LOC)
  • " *.sh" is biggest, containing 47.09% of LOC.
  • " *.tfvars" is smallest, containing 1.77% of LOC.


*.sh1197 LOC (47%) 58 files
*.yaml564 LOC (22%) 12 files
*.tf481 LOC (18%) 17 files
*.py255 LOC (10%) 5 files
*.tfvars45 LOC (1%) 3 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 32 files match defined criteria (1,013 LOC, 3.6% vs. main code). All matches are in *.sh files.


*.sh1013 LOC (100%) 32 files
Other Code
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 ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]dockerignore".
  • 66 files match defined criteria (9,249 LOC, 32.5% vs. main code):
    • 44 *.md files (5,199 LOC)
    • 4 *.json files (3,632 LOC)
    • 5 *.sh files (287 LOC)
    • 13 *.txt files (131 LOC)
  • " *.md" is biggest, containing 56.21% of LOC.
  • " *.txt" is smallest, containing 1.42% of LOC.


*.md5199 LOC (56%) 44 files
*.json3632 LOC (39%) 4 files
*.sh287 LOC (3%) 5 files
*.txt131 LOC (1%) 13 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 16:06