GoogleCloudPlatform / cpe-partner-solution-accelerators
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
jsonl
mod
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.

main11818 LOC (82%) 158 files
test44 LOC (<1%) 1 file
generated0 LOC (0%) 0 files
build and deployment609 LOC (4%) 13 files
other1925 LOC (13%) 24 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 158 files match defined criteria (11,818 LOC, 100.0% vs. main code):
    • 136 *.tf files (9,342 LOC)
    • 5 *.tfvars files (1,120 LOC)
    • 1 *.go files (451 LOC)
    • 12 *.tpl files (375 LOC)
    • 2 *.py files (336 LOC)
    • 2 *.ps1 files (194 LOC)
  • " *.tf" is biggest, containing 79.05% of LOC.
  • " *.ps1" is smallest, containing 1.64% of LOC.


*.tf9342 LOC (79%) 136 files
*.tfvars1120 LOC (9%) 5 files
*.go451 LOC (3%) 1 file
*.tpl375 LOC (3%) 12 files
*.py336 LOC (2%) 2 files
*.ps1194 LOC (1%) 2 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_.*".
  • 1 file matches defined criteria (44 LOC, 0.4% vs. main code). All matches are in *.sh files.


*.sh44 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 13 files match defined criteria (609 LOC, 5.2% vs. main code). All matches are in *.sh files.


*.sh609 LOC (100%) 13 files
Other Code
mod
txt
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 ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
  • 24 files match defined criteria (1,925 LOC, 16.3% vs. main code):
    • 14 *.json files (1,051 LOC)
    • 7 *.md files (789 LOC)
    • 1 *.mod files (50 LOC)
    • 2 *.txt files (35 LOC)
  • " *.json" is biggest, containing 54.6% of LOC.
  • " *.txt" is smallest, containing 1.82% of LOC.


*.json1051 LOC (54%) 14 files
*.md789 LOC (40%) 7 files
*.mod50 LOC (2%) 1 file
*.txt35 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 16:04