GoogleCloudPlatform / cluster-toolkit
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
tpl
txt
hcl
cfg
mod
ini
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.

main97608 LOC (72%) 743 files
test10899 LOC (8%) 158 files
generated0 LOC (0%) 0 files
build and deployment3277 LOC (2%) 52 files
other22509 LOC (16%) 231 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hcl
tpl
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 743 files match defined criteria (97,608 LOC, 100.0% vs. main code):
    • 115 *.yaml files (31,736 LOC)
    • 375 *.tf files (26,368 LOC)
    • 79 *.py files (16,271 LOC)
    • 2 *.js files (8,647 LOC)
    • 50 *.go files (6,183 LOC)
    • 83 *.html files (5,401 LOC)
    • 13 *.hcl files (1,444 LOC)
    • 15 *.tpl files (1,247 LOC)
    • 1 *.ipynb files (125 LOC)
    • 5 *.tfvars files (122 LOC)
    • 1 *.pl files (26 LOC)
    • 1 *.css files (25 LOC)
    • 2 *.cfg files (9 LOC)
    • 1 *.ps1 files (4 LOC)
  • " *.yaml" is biggest, containing 32.51% of LOC.
  • " *.ps1" is smallest, containing 0% of LOC.


*.yaml31736 LOC (32%) 115 files
*.tf26368 LOC (27%) 375 files
*.py16271 LOC (16%) 79 files
*.js8647 LOC (8%) 2 files
*.go6183 LOC (6%) 50 files
*.html5401 LOC (5%) 83 files
*.hcl1444 LOC (1%) 13 files
*.tpl1247 LOC (1%) 15 files
*.ipynb125 LOC (<1%) 1 file
*.tfvars122 LOC (<1%) 5 files
*.pl26 LOC (<1%) 1 file
*.css25 LOC (<1%) 1 file
*.cfg9 LOC (<1%) 2 files
*.ps14 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 ".*[-]tests/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 158 files match defined criteria (10,899 LOC, 11.2% vs. main code):
    • 109 *.yaml files (4,999 LOC)
    • 29 *.go files (4,264 LOC)
    • 15 *.py files (1,534 LOC)
    • 5 *.tf files (102 LOC)
  • " *.yaml" is biggest, containing 45.87% of LOC.
  • " *.tf" is smallest, containing 0.94% of LOC.


*.yaml4999 LOC (45%) 109 files
*.go4264 LOC (39%) 29 files
*.py1534 LOC (14%) 15 files
*.tf102 LOC (<1%) 5 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".
  • 52 files match defined criteria (3,277 LOC, 3.4% vs. main code). All matches are in *.sh files.


*.sh3277 LOC (100%) 52 files
Other Code
txt
mod
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/go[.]mod".
  • 231 files match defined criteria (22,509 LOC, 23.1% vs. main code):
    • 77 *.yaml files (10,337 LOC)
    • 110 *.md files (10,207 LOC)
    • 26 *.sh files (1,033 LOC)
    • 1 *.json files (347 LOC)
    • 13 *.txt files (259 LOC)
    • 3 *.py files (211 LOC)
    • 1 *.mod files (115 LOC)
  • " *.yaml" is biggest, containing 45.92% of LOC.
  • " *.mod" is smallest, containing 0.51% of LOC.


*.yaml10337 LOC (45%) 77 files
*.md10207 LOC (45%) 110 files
*.sh1033 LOC (4%) 26 files
*.json347 LOC (1%) 1 file
*.txt259 LOC (1%) 13 files
*.py211 LOC (<1%) 3 files
*.mod115 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:42