GoogleCloudPlatform / genai-product-catalog
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
hcl
cfg
in
ini
eslintignore
prettierignore
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.

main11016 LOC (61%) 42 files
test490 LOC (2%) 11 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other6523 LOC (36%) 127 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 ".*".
  • 42 files match defined criteria (11,016 LOC, 100.0% vs. main code):
    • 9 *.ipynb files (9,851 LOC)
    • 29 *.py files (1,044 LOC)
    • 1 *.bzl files (56 LOC)
    • 1 *.toml files (35 LOC)
    • 1 *.in files (27 LOC)
    • 1 *.yaml files (3 LOC)
  • " *.ipynb" is biggest, containing 89.42% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.ipynb9851 LOC (89%) 9 files
*.py1044 LOC (9%) 29 files
*.bzl56 LOC (<1%) 1 file
*.toml35 LOC (<1%) 1 file
*.in27 LOC (<1%) 1 file
*.yaml3 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 ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/vitest[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*_test[.].*".
  • 11 files match defined criteria (490 LOC, 4.4% vs. main code). All matches are in *.py files.


*.py490 LOC (100%) 11 files
Other Code
txt
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 ".*/[.]prettierignore".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
  • 127 files match defined criteria (6,523 LOC, 59.2% vs. main code):
    • 27 *.tsx files (1,979 LOC)
    • 27 *.ts files (1,145 LOC)
    • 18 *.py files (852 LOC)
    • 2 *.txt files (791 LOC)
    • 21 *.json files (766 LOC)
    • 11 *.md files (429 LOC)
    • 11 *.tf files (272 LOC)
    • 1 *.ipynb files (149 LOC)
    • 3 *.yaml files (64 LOC)
    • 1 *.html files (28 LOC)
    • 2 *.js files (21 LOC)
    • 1 *.css files (15 LOC)
    • 1 *.sql files (9 LOC)
    • 1 *.ini files (3 LOC)
  • " *.tsx" is biggest, containing 30.34% of LOC.
  • " *.ini" is smallest, containing 0.05% of LOC.


*.tsx1979 LOC (30%) 27 files
*.ts1145 LOC (17%) 27 files
*.py852 LOC (13%) 18 files
*.txt791 LOC (12%) 2 files
*.json766 LOC (11%) 21 files
*.md429 LOC (6%) 11 files
*.tf272 LOC (4%) 11 files
*.ipynb149 LOC (2%) 1 file
*.yaml64 LOC (<1%) 3 files
*.html28 LOC (<1%) 1 file
*.js21 LOC (<1%) 2 files
*.css15 LOC (<1%) 1 file
*.sql9 LOC (<1%) 1 file
*.ini3 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 16:00