GoogleCloudPlatform / runtimes-common
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
htaccess
gypi
mk
npmrc
cfg
proto
gyp
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.

main8071 LOC (63%) 131 files
test3364 LOC (26%) 56 files
generated0 LOC (0%) 0 files
build and deployment48 LOC (<1%) 5 files
other1283 LOC (10%) 50 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 131 files match defined criteria (8,071 LOC, 100.0% vs. main code):
    • 66 *.py files (4,158 LOC)
    • 49 *.go files (3,366 LOC)
    • 1 *.proto files (305 LOC)
    • 14 *.yaml files (181 LOC)
    • 1 *.toml files (61 LOC)
  • " *.py" is biggest, containing 51.52% of LOC.
  • " *.toml" is smallest, containing 0.76% of LOC.


*.py4158 LOC (51%) 66 files
*.go3366 LOC (41%) 49 files
*.proto305 LOC (3%) 1 file
*.yaml181 LOC (2%) 14 files
*.toml61 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 ".*_tests[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 56 files match defined criteria (3,364 LOC, 41.7% vs. main code):
    • 18 *.go files (1,772 LOC)
    • 27 *.py files (1,408 LOC)
    • 10 *.yaml files (167 LOC)
    • 1 *.sh files (17 LOC)
  • " *.go" is biggest, containing 52.68% of LOC.
  • " *.sh" is smallest, containing 0.51% of LOC.


*.go1772 LOC (52%) 18 files
*.py1408 LOC (41%) 27 files
*.yaml167 LOC (4%) 10 files
*.sh17 LOC (<1%) 1 file
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".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]mk".
  • 5 files match defined criteria (48 LOC, 0.6% vs. main code). All matches are in *.sh files.


*.sh48 LOC (100%) 5 files
Other Code
txt
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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]htaccess".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]npmrc".
  • 50 files match defined criteria (1,283 LOC, 15.9% vs. main code):
    • 20 *.md files (650 LOC)
    • 14 *.json files (452 LOC)
    • 3 *.go files (63 LOC)
    • 9 *.txt files (59 LOC)
    • 4 *.yaml files (59 LOC)
  • " *.md" is biggest, containing 50.66% of LOC.
  • " *.yaml" is smallest, containing 4.6% of LOC.


*.md650 LOC (50%) 20 files
*.json452 LOC (35%) 14 files
*.go63 LOC (4%) 3 files
*.txt59 LOC (4%) 9 files
*.yaml59 LOC (4%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:29