GoogleCloudPlatform / cortex-data-foundation
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
ini
txt
in
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.

main247768 LOC (97%) 2,174 files
test280 LOC (<1%) 11 files
generated0 LOC (0%) 0 files
build and deployment2238 LOC (<1%) 32 files
other4676 LOC (1%) 81 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2174 files match defined criteria (247,768 LOC, 100.0% vs. main code):
    • 1,189 *.yaml files (158,901 LOC)
    • 560 *.sql files (44,902 LOC)
    • 415 *.py files (42,123 LOC)
    • 1 *.ipynb files (1,159 LOC)
    • 7 *.jinja files (665 LOC)
    • 2 *.in files (18 LOC)
  • " *.yaml" is biggest, containing 64.13% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.yaml158901 LOC (64%) 1,189 files
*.sql44902 LOC (18%) 560 files
*.py42123 LOC (17%) 415 files
*.ipynb1159 LOC (<1%) 1 file
*.jinja665 LOC (<1%) 7 files
*.in18 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_.*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
  • 11 files match defined criteria (280 LOC, 0.1% vs. main code):
    • 7 *.py files (224 LOC)
    • 4 *.yaml files (56 LOC)
  • " *.py" is biggest, containing 80% of LOC.
  • " *.yaml" is smallest, containing 20% of LOC.


*.py224 LOC (80%) 7 files
*.yaml56 LOC (20%) 4 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".
  • 32 files match defined criteria (2,238 LOC, 0.9% vs. main code). All matches are in *.sh files.


*.sh2238 LOC (100%) 32 files
Other Code
txt
ini
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 ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
  • 81 files match defined criteria (4,676 LOC, 1.9% vs. main code):
    • 39 *.sql files (2,486 LOC)
    • 10 *.txt files (1,043 LOC)
    • 9 *.json files (909 LOC)
    • 14 *.ini files (128 LOC)
    • 9 *.md files (110 LOC)
  • " *.sql" is biggest, containing 53.17% of LOC.
  • " *.md" is smallest, containing 2.35% of LOC.


*.sql2486 LOC (53%) 39 files
*.txt1043 LOC (22%) 10 files
*.json909 LOC (19%) 9 files
*.ini128 LOC (2%) 14 files
*.md110 LOC (2%) 9 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:45