GoogleCloudPlatform / compute-image-tools
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
cfg
ini
mod
pyi
proto
asc
txt
cmd
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.

main21422 LOC (25%) 185 files
test13080 LOC (15%) 92 files
generated152 LOC (<1%) 1 file
build and deployment1213 LOC (1%) 35 files
other47907 LOC (57%) 634 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
pyi
proto
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 185 files match defined criteria (21,422 LOC, 100.0% vs. main code):
    • 83 *.go files (8,326 LOC)
    • 40 *.cfg files (6,562 LOC)
    • 19 *.ps1 files (3,460 LOC)
    • 23 *.py files (1,836 LOC)
    • 8 *.yaml files (381 LOC)
    • 2 *.pyi files (215 LOC)
    • 2 *.psm1 files (191 LOC)
    • 2 *.proto files (167 LOC)
    • 4 *.xml files (142 LOC)
    • 1 *.cmd files (122 LOC)
    • 1 *.toml files (20 LOC)
  • " *.go" is biggest, containing 38.87% of LOC.
  • " *.toml" is smallest, containing 0.09% of LOC.


*.go8326 LOC (38%) 83 files
*.cfg6562 LOC (30%) 40 files
*.ps13460 LOC (16%) 19 files
*.py1836 LOC (8%) 23 files
*.yaml381 LOC (1%) 8 files
*.pyi215 LOC (1%) 2 files
*.psm1191 LOC (<1%) 2 files
*.proto167 LOC (<1%) 2 files
*.xml142 LOC (<1%) 4 files
*.cmd122 LOC (<1%) 1 file
*.toml20 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 ".*[-]test[-].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/e2e/.*".
  • 92 files match defined criteria (13,080 LOC, 61.1% vs. main code):
    • 82 *.go files (12,374 LOC)
    • 3 *.ps1 files (500 LOC)
    • 4 *.py files (144 LOC)
    • 3 *.sh files (62 LOC)
  • " *.go" is biggest, containing 94.6% of LOC.
  • " *.sh" is smallest, containing 0.47% of LOC.


*.go12374 LOC (94%) 82 files
*.ps1500 LOC (3%) 3 files
*.py144 LOC (1%) 4 files
*.sh62 LOC (<1%) 3 files
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 ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 1 file matches defined criteria (152 LOC, 0.7% vs. main code). All matches are in *.py files.


*.py152 LOC (100%) 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 ".*[.]bat".
  • 35 files match defined criteria (1,213 LOC, 5.7% vs. main code):
    • 29 *.sh files (1,056 LOC)
    • 6 *.bat files (157 LOC)
  • " *.sh" is biggest, containing 87.06% of LOC.
  • " *.bat" is smallest, containing 12.94% of LOC.


*.sh1056 LOC (87%) 29 files
*.bat157 LOC (12%) 6 files
Other Code
ini
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 ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
  • 634 files match defined criteria (47,907 LOC, 223.6% vs. main code):
    • 595 *.json files (45,875 LOC)
    • 10 *.ini files (984 LOC)
    • 24 *.md files (913 LOC)
    • 5 *.mod files (135 LOC)
  • " *.json" is biggest, containing 95.76% of LOC.
  • " *.mod" is smallest, containing 0.28% of LOC.


*.json45875 LOC (95%) 595 files
*.ini984 LOC (2%) 10 files
*.md913 LOC (1%) 24 files
*.mod135 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:29