GoogleCloudPlatform / cloud-foundation-fabric
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
ini
cfg
hcl
mod
gitattributes
pub
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.

main118373 LOC (59%) 1,392 files
test9966 LOC (5%) 310 files
generated4954 LOC (2%) 2 files
build and deployment296 LOC (<1%) 19 files
other63783 LOC (32%) 701 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
hcl
cfg
pub
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1392 files match defined criteria (118,373 LOC, 100.0% vs. main code):
    • 1,055 *.tf files (92,695 LOC)
    • 241 *.yaml files (18,742 LOC)
    • 45 *.py files (4,491 LOC)
    • 29 *.tpl files (1,372 LOC)
    • 6 *.ps1 files (391 LOC)
    • 5 *.js files (305 LOC)
    • 3 *.go files (245 LOC)
    • 2 *.hcl files (86 LOC)
    • 4 *.cfg files (27 LOC)
    • 1 *.xml files (18 LOC)
    • 1 *.pub files (1 LOC)
  • " *.tf" is biggest, containing 78.31% of LOC.
  • " *.pub" is smallest, containing 0% of LOC.


*.tf92695 LOC (78%) 1,055 files
*.yaml18742 LOC (15%) 241 files
*.py4491 LOC (3%) 45 files
*.tpl1372 LOC (1%) 29 files
*.ps1391 LOC (<1%) 6 files
*.js305 LOC (<1%) 5 files
*.go245 LOC (<1%) 3 files
*.hcl86 LOC (<1%) 2 files
*.cfg27 LOC (<1%) 4 files
*.xml18 LOC (<1%) 1 file
*.pub1 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
  • 310 files match defined criteria (9,966 LOC, 8.4% vs. main code):
    • 141 *.yaml files (5,227 LOC)
    • 94 *.tfvars files (3,089 LOC)
    • 28 *.tf files (972 LOC)
    • 46 *.py files (668 LOC)
    • 1 *.xml files (10 LOC)
  • " *.yaml" is biggest, containing 52.45% of LOC.
  • " *.xml" is smallest, containing 0.1% of LOC.


*.yaml5227 LOC (52%) 141 files
*.tfvars3089 LOC (30%) 94 files
*.tf972 LOC (9%) 28 files
*.py668 LOC (6%) 46 files
*.xml10 LOC (<1%) 1 file
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 ".*/package[-]lock[.]json".
  • 2 files match defined criteria (4,954 LOC, 4.2% vs. main code). All matches are in *.json files.


*.json4954 LOC (100%) 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".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/[.]gitattributes".
  • 19 files match defined criteria (296 LOC, 0.3% vs. main code). All matches are in *.sh files.


*.sh296 LOC (100%) 19 files
Other Code
txt
mod
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]svg".
  • 701 files match defined criteria (63,783 LOC, 53.9% vs. main code):
    • 380 *.yaml files (22,741 LOC)
    • 90 *.json files (20,406 LOC)
    • 176 *.md files (17,396 LOC)
    • 17 *.py files (1,602 LOC)
    • 3 *.svg files (668 LOC)
    • 1 *.ipynb files (464 LOC)
    • 5 *.tf files (305 LOC)
    • 18 *.txt files (96 LOC)
    • 2 *.mod files (38 LOC)
    • 3 *.js files (31 LOC)
    • 1 *.tfvars files (30 LOC)
    • 5 *.ini files (6 LOC)
  • " *.yaml" is biggest, containing 35.65% of LOC.
  • " *.ini" is smallest, containing 0.01% of LOC.


*.yaml22741 LOC (35%) 380 files
*.json20406 LOC (31%) 90 files
*.md17396 LOC (27%) 176 files
*.py1602 LOC (2%) 17 files
*.svg668 LOC (1%) 3 files
*.ipynb464 LOC (<1%) 1 file
*.tf305 LOC (<1%) 5 files
*.txt96 LOC (<1%) 18 files
*.mod38 LOC (<1%) 2 files
*.js31 LOC (<1%) 3 files
*.tfvars30 LOC (<1%) 1 file
*.ini6 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:52