GoogleCloudPlatform / cloud-solutions
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
mdx
in
proto
hcl
properties
mod
ini
tpl
editorconfig
eslintignore
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.

main34893 LOC (35%) 512 files
test18591 LOC (18%) 118 files
generated6300 LOC (6%) 3 files
build and deployment1262 LOC (1%) 47 files
other37682 LOC (38%) 310 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 512 files match defined criteria (34,893 LOC, 100.0% vs. main code):
    • 76 *.py files (9,365 LOC)
    • 101 *.java files (5,870 LOC)
    • 70 *.ts files (5,049 LOC)
    • 96 *.tf files (4,241 LOC)
    • 41 *.go files (3,536 LOC)
    • 53 *.yaml files (1,788 LOC)
    • 6 *.ipynb files (1,563 LOC)
    • 20 *.tsx files (1,477 LOC)
    • 8 *.proto files (596 LOC)
    • 7 *.css files (393 LOC)
    • 2 *.html files (349 LOC)
    • 3 *.js files (223 LOC)
    • 10 *.kts files (170 LOC)
    • 5 *.toml files (135 LOC)
    • 11 *.in files (99 LOC)
    • 1 *.tfvars files (20 LOC)
    • 2 *.tpl files (19 LOC)
  • " *.py" is biggest, containing 26.84% of LOC.
  • " *.tpl" is smallest, containing 0.05% of LOC.


*.py9365 LOC (26%) 76 files
*.java5870 LOC (16%) 101 files
*.ts5049 LOC (14%) 70 files
*.tf4241 LOC (12%) 96 files
*.go3536 LOC (10%) 41 files
*.yaml1788 LOC (5%) 53 files
*.ipynb1563 LOC (4%) 6 files
*.tsx1477 LOC (4%) 20 files
*.proto596 LOC (1%) 8 files
*.css393 LOC (1%) 7 files
*.html349 LOC (1%) 2 files
*.js223 LOC (<1%) 3 files
*.kts170 LOC (<1%) 10 files
*.toml135 LOC (<1%) 5 files
*.in99 LOC (<1%) 11 files
*.tfvars20 LOC (<1%) 1 file
*.tpl19 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/test_.*".
    • 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 ".*[.]test[.].*".
    • files with paths like ".*/vitest[.].*".
  • 118 files match defined criteria (18,591 LOC, 53.3% vs. main code):
    • 44 *.ts files (6,201 LOC)
    • 28 *.py files (6,138 LOC)
    • 24 *.java files (4,309 LOC)
    • 3 *.go files (848 LOC)
    • 2 *.ipynb files (782 LOC)
    • 10 *.yaml files (193 LOC)
    • 5 *.sql files (92 LOC)
    • 1 *.proto files (25 LOC)
    • 1 *.kts files (3 LOC)
  • " *.ts" is biggest, containing 33.35% of LOC.
  • " *.kts" is smallest, containing 0.02% of LOC.


*.ts6201 LOC (33%) 44 files
*.py6138 LOC (33%) 28 files
*.java4309 LOC (23%) 24 files
*.go848 LOC (4%) 3 files
*.ipynb782 LOC (4%) 2 files
*.yaml193 LOC (1%) 10 files
*.sql92 LOC (<1%) 5 files
*.proto25 LOC (<1%) 1 file
*.kts3 LOC (<1%) 1 file
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 ".*/package[-]lock[.]json".
    • files with paths like ".*/gen/.*[.]go".
  • 3 files match defined criteria (6,300 LOC, 18.1% vs. main code):
    • 2 *.json files (6,295 LOC)
    • 1 *.go files (5 LOC)
  • " *.json" is biggest, containing 99.92% of LOC.
  • " *.go" is smallest, containing 0.08% of LOC.


*.json6295 LOC (99%) 2 files
*.go5 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 47 files match defined criteria (1,262 LOC, 3.6% vs. main code):
    • 15 *.gradle files (495 LOC)
    • 17 *.dockerfile files (381 LOC)
    • 3 *.bat files (216 LOC)
    • 12 *.sh files (170 LOC)
  • " *.gradle" is biggest, containing 39.22% of LOC.
  • " *.sh" is smallest, containing 13.47% of LOC.


*.gradle495 LOC (39%) 15 files
*.dockerfile381 LOC (30%) 17 files
*.bat216 LOC (17%) 3 files
*.sh170 LOC (13%) 12 files
Other Code
txt
mod
properties
proto
mdx
ini
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 ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/go[.]mod".
  • 310 files match defined criteria (37,682 LOC, 108.0% vs. main code):
    • 191 *.json files (19,092 LOC)
    • 25 *.txt files (14,511 LOC)
    • 54 *.md files (3,394 LOC)
    • 2 *.mod files (167 LOC)
    • 2 *.tf files (166 LOC)
    • 7 *.properties files (141 LOC)
    • 2 *.proto files (80 LOC)
    • 24 *.mdx files (78 LOC)
    • 1 *.sh files (39 LOC)
    • 2 *.ini files (14 LOC)
  • " *.json" is biggest, containing 50.67% of LOC.
  • " *.ini" is smallest, containing 0.04% of LOC.


*.json19092 LOC (50%) 191 files
*.txt14511 LOC (38%) 25 files
*.md3394 LOC (9%) 54 files
*.mod167 LOC (<1%) 2 files
*.tf166 LOC (<1%) 2 files
*.properties141 LOC (<1%) 7 files
*.proto80 LOC (<1%) 2 files
*.mdx78 LOC (<1%) 24 files
*.sh39 LOC (<1%) 1 file
*.ini14 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 16:00