GoogleCloudPlatform / generative-ai
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
plist
mjs
properties
ini
editorconfig
storyboard
htmlhintrc
cmd
eslintignore
gs
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.

main238628 LOC (82%) 652 files
test721 LOC (<1%) 13 files
generated17951 LOC (6%) 4 files
build and deployment1481 LOC (<1%) 41 files
other30820 LOC (10%) 162 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
gs
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 652 files match defined criteria (238,628 LOC, 100.0% vs. main code):
    • 216 *.ipynb files (203,594 LOC)
    • 185 *.py files (20,190 LOC)
    • 29 *.html files (2,813 LOC)
    • 43 *.ts files (2,765 LOC)
    • 43 *.tf files (1,666 LOC)
    • 22 *.tsx files (1,485 LOC)
    • 14 *.js files (1,211 LOC)
    • 14 *.dart files (1,027 LOC)
    • 9 *.css files (841 LOC)
    • 13 *.yaml files (555 LOC)
    • 7 *.toml files (490 LOC)
    • 8 *.sql files (487 LOC)
    • 4 *.cpp files (343 LOC)
    • 1 *.gs files (287 LOC)
    • 11 *.scss files (239 LOC)
    • 4 *.java files (190 LOC)
    • 4 *.cc files (116 LOC)
    • 8 *.h files (103 LOC)
    • 4 *.mjs files (94 LOC)
    • 6 *.swift files (60 LOC)
    • 2 *.cmake files (43 LOC)
    • 4 *.xml files (26 LOC)
    • 1 *.kt files (3 LOC)
  • " *.ipynb" is biggest, containing 85.32% of LOC.
  • " *.kt" is smallest, containing 0% of LOC.


*.ipynb203594 LOC (85%) 216 files
*.py20190 LOC (8%) 185 files
*.html2813 LOC (1%) 29 files
*.ts2765 LOC (1%) 43 files
*.tf1666 LOC (<1%) 43 files
*.tsx1485 LOC (<1%) 22 files
*.js1211 LOC (<1%) 14 files
*.dart1027 LOC (<1%) 14 files
*.css841 LOC (<1%) 9 files
*.yaml555 LOC (<1%) 13 files
*.toml490 LOC (<1%) 7 files
*.sql487 LOC (<1%) 8 files
*.cpp343 LOC (<1%) 4 files
*.gs287 LOC (<1%) 1 file
*.scss239 LOC (<1%) 11 files
*.java190 LOC (<1%) 4 files
*.cc116 LOC (<1%) 4 files
*.h103 LOC (<1%) 8 files
*.mjs94 LOC (<1%) 4 files
*.swift60 LOC (<1%) 6 files
*.cmake43 LOC (<1%) 2 files
*.xml26 LOC (<1%) 4 files
*.kt3 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]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 13 files match defined criteria (721 LOC, 0.3% vs. main code):
    • 10 *.py files (536 LOC)
    • 1 *.ipynb files (163 LOC)
    • 1 *.dart files (14 LOC)
    • 1 *.java files (8 LOC)
  • " *.py" is biggest, containing 74.34% of LOC.
  • " *.java" is smallest, containing 1.11% of LOC.


*.py536 LOC (74%) 10 files
*.ipynb163 LOC (22%) 1 file
*.dart14 LOC (1%) 1 file
*.java8 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".
  • 4 files match defined criteria (17,951 LOC, 7.5% vs. main code). All matches are in *.json files.


*.json17951 LOC (100%) 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 ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]gradle".
  • 41 files match defined criteria (1,481 LOC, 0.6% vs. main code):
    • 34 *.sh files (1,270 LOC)
    • 4 *.xml files (130 LOC)
    • 3 *.gradle files (81 LOC)
  • " *.sh" is biggest, containing 85.75% of LOC.
  • " *.gradle" is smallest, containing 5.47% of LOC.


*.sh1270 LOC (85%) 34 files
*.xml130 LOC (8%) 4 files
*.gradle81 LOC (5%) 3 files
Other Code
txt
plist
storyboard
ini
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]eslintignore".
  • 162 files match defined criteria (30,820 LOC, 12.9% vs. main code):
    • 32 *.json files (19,144 LOC)
    • 70 *.md files (5,666 LOC)
    • 6 *.ipynb files (4,792 LOC)
    • 40 *.txt files (651 LOC)
    • 1 *.xib files (343 LOC)
    • 7 *.plist files (143 LOC)
    • 2 *.storyboard files (61 LOC)
    • 2 *.ini files (14 LOC)
    • 2 *.properties files (6 LOC)
  • " *.json" is biggest, containing 62.12% of LOC.
  • " *.properties" is smallest, containing 0.02% of LOC.


*.json19144 LOC (62%) 32 files
*.md5666 LOC (18%) 70 files
*.ipynb4792 LOC (15%) 6 files
*.txt651 LOC (2%) 40 files
*.xib343 LOC (1%) 1 file
*.plist143 LOC (<1%) 7 files
*.storyboard61 LOC (<1%) 2 files
*.ini14 LOC (<1%) 2 files
*.properties6 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:56