GoogleCloudPlatform / service-extensions
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
mod
patch
clang-format
proto
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.

main3139 LOC (29%) 51 files
test3003 LOC (27%) 26 files
generated0 LOC (0%) 0 files
build and deployment219 LOC (2%) 1 file
other4418 LOC (40%) 83 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 ".*".
  • 51 files match defined criteria (3,139 LOC, 100.0% vs. main code):
    • 4 *.bzl files (1,153 LOC)
    • 32 *.py files (910 LOC)
    • 8 *.java files (704 LOC)
    • 3 *.go files (323 LOC)
    • 1 *.toml files (23 LOC)
    • 2 *.yaml files (18 LOC)
    • 1 *.cc files (8 LOC)
  • " *.bzl" is biggest, containing 36.73% of LOC.
  • " *.cc" is smallest, containing 0.25% of LOC.


*.bzl1153 LOC (36%) 4 files
*.py910 LOC (28%) 32 files
*.java704 LOC (22%) 8 files
*.go323 LOC (10%) 3 files
*.toml23 LOC (<1%) 1 file
*.yaml18 LOC (<1%) 2 files
*.cc8 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
  • 26 files match defined criteria (3,003 LOC, 95.7% vs. main code):
    • 3 *.cc files (973 LOC)
    • 6 *.java files (714 LOC)
    • 12 *.py files (666 LOC)
    • 2 *.h files (272 LOC)
    • 2 *.go files (235 LOC)
    • 1 *.proto files (143 LOC)
  • " *.cc" is biggest, containing 32.4% of LOC.
  • " *.proto" is smallest, containing 4.76% of LOC.


*.cc973 LOC (32%) 3 files
*.java714 LOC (23%) 6 files
*.py666 LOC (22%) 12 files
*.h272 LOC (9%) 2 files
*.go235 LOC (7%) 2 files
*.proto143 LOC (4%) 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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
  • 1 file matches defined criteria (219 LOC, 7.0% vs. main code). All matches are in *.xml files.


*.xml219 LOC (100%) 1 file
Other Code
mod
patch
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 ".*/[.]dockerignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]patch".
  • 83 files match defined criteria (4,418 LOC, 140.7% vs. main code):
    • 27 *.go files (1,948 LOC)
    • 10 *.md files (903 LOC)
    • 22 *.cc files (825 LOC)
    • 18 *.rs files (697 LOC)
    • 1 *.mod files (26 LOC)
    • 1 *.patch files (12 LOC)
    • 4 *.txt files (7 LOC)
  • " *.go" is biggest, containing 44.09% of LOC.
  • " *.txt" is smallest, containing 0.16% of LOC.


*.go1948 LOC (44%) 27 files
*.md903 LOC (20%) 10 files
*.cc825 LOC (18%) 22 files
*.rs697 LOC (15%) 18 files
*.mod26 LOC (<1%) 1 file
*.patch12 LOC (<1%) 1 file
*.txt7 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:54