GoogleCloudPlatform / terraform-google-secured-data-warehouse
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
rego
mod
hcl
tpl
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.

main10059 LOC (64%) 187 files
test2127 LOC (13%) 38 files
generated0 LOC (0%) 0 files
build and deployment69 LOC (<1%) 2 files
other3354 LOC (21%) 55 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 187 files match defined criteria (10,059 LOC, 100.0% vs. main code):
    • 130 *.yaml files (5,588 LOC)
    • 51 *.tf files (3,565 LOC)
    • 3 *.py files (666 LOC)
    • 1 *.go files (169 LOC)
    • 2 *.rego files (71 LOC)
  • " *.yaml" is biggest, containing 55.55% of LOC.
  • " *.rego" is smallest, containing 0.71% of LOC.


*.yaml5588 LOC (55%) 130 files
*.tf3565 LOC (35%) 51 files
*.py666 LOC (6%) 3 files
*.go169 LOC (1%) 1 file
*.rego71 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
rego
hcl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 38 files match defined criteria (2,127 LOC, 21.1% vs. main code):
    • 28 *.tf files (1,546 LOC)
    • 4 *.rb files (294 LOC)
    • 2 *.go files (137 LOC)
    • 2 *.sh files (73 LOC)
    • 1 *.rego files (44 LOC)
    • 1 *.hcl files (33 LOC)
  • " *.tf" is biggest, containing 72.68% of LOC.
  • " *.hcl" is smallest, containing 1.55% of LOC.


*.tf1546 LOC (72%) 28 files
*.rb294 LOC (13%) 4 files
*.go137 LOC (6%) 2 files
*.sh73 LOC (3%) 2 files
*.rego44 LOC (2%) 1 file
*.hcl33 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".
  • 2 files match defined criteria (69 LOC, 0.7% vs. main code). All matches are in *.sh files.


*.sh69 LOC (100%) 2 files
Other Code
mod
tpl
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
  • 55 files match defined criteria (3,354 LOC, 33.3% vs. main code):
    • 26 *.tf files (1,925 LOC)
    • 17 *.md files (1,095 LOC)
    • 3 *.json files (148 LOC)
    • 2 *.mod files (77 LOC)
    • 2 *.tfvars files (52 LOC)
    • 1 *.tpl files (31 LOC)
    • 4 *.txt files (26 LOC)
  • " *.tf" is biggest, containing 57.39% of LOC.
  • " *.txt" is smallest, containing 0.78% of LOC.


*.tf1925 LOC (57%) 26 files
*.md1095 LOC (32%) 17 files
*.json148 LOC (4%) 3 files
*.mod77 LOC (2%) 2 files
*.tfvars52 LOC (1%) 2 files
*.tpl31 LOC (<1%) 1 file
*.txt26 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:37