GoogleCloudPlatform / gcpdiag
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
tpl
cfg
jinja2
spec
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.

main44545 LOC (18%) 675 files
test12392 LOC (5%) 285 files
generated0 LOC (0%) 0 files
build and deployment92 LOC (<1%) 6 files
other179870 LOC (75%) 1,664 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
jinja2
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 675 files match defined criteria (44,545 LOC, 100.0% vs. main code):
    • 610 *.py files (40,627 LOC)
    • 54 *.jinja files (3,563 LOC)
    • 5 *.html files (138 LOC)
    • 2 *.toml files (99 LOC)
    • 1 *.scss files (53 LOC)
    • 1 *.spec files (35 LOC)
    • 2 *.jinja2 files (30 LOC)
  • " *.py" is biggest, containing 91.2% of LOC.
  • " *.jinja2" is smallest, containing 0.07% of LOC.


*.py40627 LOC (91%) 610 files
*.jinja3563 LOC (7%) 54 files
*.html138 LOC (<1%) 5 files
*.toml99 LOC (<1%) 2 files
*.scss53 LOC (<1%) 1 file
*.spec35 LOC (<1%) 1 file
*.jinja230 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*[-]test[-].*".
  • 285 files match defined criteria (12,392 LOC, 27.8% vs. main code):
    • 153 *.tf files (6,705 LOC)
    • 126 *.py files (5,465 LOC)
    • 1 *.inc files (173 LOC)
    • 4 *.tpl files (27 LOC)
    • 1 *.yaml files (22 LOC)
  • " *.tf" is biggest, containing 54.11% of LOC.
  • " *.yaml" is smallest, containing 0.18% of LOC.


*.tf6705 LOC (54%) 153 files
*.py5465 LOC (44%) 126 files
*.inc173 LOC (1%) 1 file
*.tpl27 LOC (<1%) 4 files
*.yaml22 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (92 LOC, 0.2% vs. main code). All matches are in *.sh files.


*.sh92 LOC (100%) 6 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
  • 1664 files match defined criteria (179,870 LOC, 403.8% vs. main code):
    • 602 *.json files (156,134 LOC)
    • 693 *.md files (17,122 LOC)
    • 369 *.txt files (6,614 LOC)
  • " *.json" is biggest, containing 86.8% of LOC.
  • " *.txt" is smallest, containing 3.68% of LOC.


*.json156134 LOC (86%) 602 files
*.md17122 LOC (9%) 693 files
*.txt6614 LOC (3%) 369 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:40