GoogleCloudPlatform / terraform-genai-knowledge-base
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
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.

main1379 LOC (60%) 11 files
test248 LOC (10%) 8 files
generated0 LOC (0%) 0 files
build and deployment135 LOC (5%) 2 files
other515 LOC (22%) 12 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 11 files match defined criteria (1,379 LOC, 100.0% vs. main code):
    • 1 *.ipynb files (512 LOC)
    • 4 *.tf files (389 LOC)
    • 1 *.py files (256 LOC)
    • 4 *.yaml files (214 LOC)
    • 1 *.toml files (8 LOC)
  • " *.ipynb" is biggest, containing 37.13% of LOC.
  • " *.toml" is smallest, containing 0.58% of LOC.


*.ipynb512 LOC (37%) 1 file
*.tf389 LOC (28%) 4 files
*.py256 LOC (18%) 1 file
*.yaml214 LOC (15%) 4 files
*.toml8 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 ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 8 files match defined criteria (248 LOC, 18.0% vs. main code):
    • 5 *.tf files (152 LOC)
    • 1 *.py files (75 LOC)
    • 2 *.go files (21 LOC)
  • " *.tf" is biggest, containing 61.29% of LOC.
  • " *.go" is smallest, containing 8.47% of LOC.


*.tf152 LOC (61%) 5 files
*.py75 LOC (30%) 1 file
*.go21 LOC (8%) 2 files
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 (135 LOC, 9.8% vs. main code). All matches are in *.sh files.


*.sh135 LOC (100%) 2 files
Other Code
mod
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
  • 12 files match defined criteria (515 LOC, 37.3% vs. main code):
    • 6 *.md files (342 LOC)
    • 1 *.mod files (87 LOC)
    • 3 *.txt files (44 LOC)
    • 2 *.tf files (42 LOC)
  • " *.md" is biggest, containing 66.41% of LOC.
  • " *.tf" is smallest, containing 8.16% of LOC.


*.md342 LOC (66%) 6 files
*.mod87 LOC (16%) 1 file
*.txt44 LOC (8%) 3 files
*.tf42 LOC (8%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:59