GoogleCloudPlatform / compute-image-import
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
mod
txt
reg
pyi
proto
cmd
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.

main19649 LOC (30%) 209 files
test30235 LOC (46%) 285 files
generated14 LOC (<1%) 1 file
build and deployment943 LOC (1%) 31 files
other14290 LOC (21%) 199 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
reg
pyi
proto
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 209 files match defined criteria (19,649 LOC, 100.0% vs. main code):
    • 136 *.go files (12,976 LOC)
    • 41 *.py files (3,024 LOC)
    • 8 *.ps1 files (1,681 LOC)
    • 3 *.reg files (507 LOC)
    • 4 *.tf files (477 LOC)
    • 8 *.yaml files (402 LOC)
    • 2 *.pyi files (220 LOC)
    • 2 *.proto files (168 LOC)
    • 2 *.cmd files (130 LOC)
    • 3 *.toml files (64 LOC)
  • " *.go" is biggest, containing 66.04% of LOC.
  • " *.toml" is smallest, containing 0.33% of LOC.


*.go12976 LOC (66%) 136 files
*.py3024 LOC (15%) 41 files
*.ps11681 LOC (8%) 8 files
*.reg507 LOC (2%) 3 files
*.tf477 LOC (2%) 4 files
*.yaml402 LOC (2%) 8 files
*.pyi220 LOC (1%) 2 files
*.proto168 LOC (<1%) 2 files
*.cmd130 LOC (<1%) 2 files
*.toml64 LOC (<1%) 3 files
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 ".*/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 ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*_tests[.].*".
  • 285 files match defined criteria (30,235 LOC, 153.9% vs. main code):
    • 150 *.go files (26,121 LOC)
    • 112 *.yaml files (2,557 LOC)
    • 5 *.ps1 files (786 LOC)
    • 6 *.sh files (418 LOC)
    • 12 *.py files (353 LOC)
  • " *.go" is biggest, containing 86.39% of LOC.
  • " *.py" is smallest, containing 1.17% of LOC.


*.go26121 LOC (86%) 150 files
*.yaml2557 LOC (8%) 112 files
*.ps1786 LOC (2%) 5 files
*.sh418 LOC (1%) 6 files
*.py353 LOC (1%) 12 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 (14 LOC, 0.1% vs. main code). All matches are in *.py files.


*.py14 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".
  • 31 files match defined criteria (943 LOC, 4.8% vs. main code):
    • 25 *.sh files (786 LOC)
    • 6 *.bat files (157 LOC)
  • " *.sh" is biggest, containing 83.35% of LOC.
  • " *.bat" is smallest, containing 16.65% of LOC.


*.sh786 LOC (83%) 25 files
*.bat157 LOC (16%) 6 files
Other Code
mod
ini
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 ".*/go[.]mod".
    • files with paths like ".*[.]ini".
  • 199 files match defined criteria (14,290 LOC, 72.7% vs. main code):
    • 160 *.json files (12,750 LOC)
    • 30 *.md files (1,333 LOC)
    • 5 *.mod files (197 LOC)
    • 1 *.ini files (7 LOC)
    • 3 *.txt files (3 LOC)
  • " *.json" is biggest, containing 89.22% of LOC.
  • " *.txt" is smallest, containing 0.02% of LOC.


*.json12750 LOC (89%) 160 files
*.md1333 LOC (9%) 30 files
*.mod197 LOC (1%) 5 files
*.ini7 LOC (<1%) 1 file
*.txt3 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:46