GoogleCloudPlatform / terraform-google-enterprise-datamesh
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
hcl
ini
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.

main50623 LOC (82%) 800 files
test88 LOC (<1%) 2 files
generated0 LOC (0%) 0 files
build and deployment1002 LOC (1%) 12 files
other9984 LOC (16%) 204 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 ".*".
  • 800 files match defined criteria (50,623 LOC, 100.0% vs. main code):
    • 346 *.tf files (20,183 LOC)
    • 253 *.yaml files (12,221 LOC)
    • 73 *.py files (10,829 LOC)
    • 38 *.html files (4,066 LOC)
    • 59 *.tfvars files (2,549 LOC)
    • 23 *.sql files (320 LOC)
    • 1 *.go files (169 LOC)
    • 4 *.rego files (142 LOC)
    • 1 *.css files (85 LOC)
    • 2 *.avsc files (59 LOC)
  • " *.tf" is biggest, containing 39.87% of LOC.
  • " *.avsc" is smallest, containing 0.12% of LOC.


*.tf20183 LOC (39%) 346 files
*.yaml12221 LOC (24%) 253 files
*.py10829 LOC (21%) 73 files
*.html4066 LOC (8%) 38 files
*.tfvars2549 LOC (5%) 59 files
*.sql320 LOC (<1%) 23 files
*.go169 LOC (<1%) 1 file
*.rego142 LOC (<1%) 4 files
*.css85 LOC (<1%) 1 file
*.avsc59 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
  • 2 files match defined criteria (88 LOC, 0.2% vs. main code). All matches are in *.rego files.


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


*.sh1002 LOC (100%) 12 files
Other Code
txt
ini
mod
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
  • 204 files match defined criteria (9,984 LOC, 19.7% vs. main code):
    • 44 *.md files (5,603 LOC)
    • 84 *.json files (2,770 LOC)
    • 19 *.py files (944 LOC)
    • 50 *.txt files (316 LOC)
    • 2 *.ini files (168 LOC)
    • 2 *.sh files (137 LOC)
    • 2 *.sql files (43 LOC)
    • 1 *.mod files (3 LOC)
  • " *.md" is biggest, containing 56.12% of LOC.
  • " *.mod" is smallest, containing 0.03% of LOC.


*.md5603 LOC (56%) 44 files
*.json2770 LOC (27%) 84 files
*.py944 LOC (9%) 19 files
*.txt316 LOC (3%) 50 files
*.ini168 LOC (1%) 2 files
*.sh137 LOC (1%) 2 files
*.sql43 LOC (<1%) 2 files
*.mod3 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 16:08