GoogleCloudPlatform / vertex-ai-samples
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
properties
patch
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.

main726096 LOC (98%) 800 files
test3578 LOC (<1%) 20 files
generated0 LOC (0%) 0 files
build and deployment461 LOC (<1%) 14 files
other7246 LOC (<1%) 107 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 ".*".
  • 800 files match defined criteria (726,096 LOC, 100.0% vs. main code):
    • 585 *.ipynb files (704,688 LOC)
    • 157 *.py files (15,981 LOC)
    • 58 *.yaml files (5,427 LOC)
  • " *.ipynb" is biggest, containing 97.05% of LOC.
  • " *.yaml" is smallest, containing 0.75% of LOC.


*.ipynb704688 LOC (97%) 585 files
*.py15981 LOC (2%) 157 files
*.yaml5427 LOC (<1%) 58 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
  • 20 files match defined criteria (3,578 LOC, 0.5% vs. main code). All matches are in *.py files.


*.py3578 LOC (100%) 20 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".
  • 14 files match defined criteria (461 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh461 LOC (100%) 14 files
Other Code
txt
patch
properties
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 ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
  • 107 files match defined criteria (7,246 LOC, 1.0% vs. main code):
    • 68 *.md files (5,127 LOC)
    • 18 *.txt files (1,092 LOC)
    • 1 *.patch files (746 LOC)
    • 17 *.json files (234 LOC)
    • 3 *.properties files (47 LOC)
  • " *.md" is biggest, containing 70.76% of LOC.
  • " *.properties" is smallest, containing 0.65% of LOC.


*.md5127 LOC (70%) 68 files
*.txt1092 LOC (15%) 18 files
*.patch746 LOC (10%) 1 file
*.json234 LOC (3%) 17 files
*.properties47 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:39