GoogleCloudPlatform / esp-v2
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
proto
pb
txt
mod
clang-format
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.

main18214 LOC (19%) 191 files
test59746 LOC (63%) 242 files
generated4097 LOC (4%) 4 files
build and deployment1486 LOC (1%) 37 files
other10682 LOC (11%) 40 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 ".*".
  • 191 files match defined criteria (18,214 LOC, 100.0% vs. main code):
    • 93 *.go files (9,000 LOC)
    • 34 *.cc files (4,740 LOC)
    • 47 *.h files (2,227 LOC)
    • 3 *.py files (1,592 LOC)
    • 7 *.proto files (470 LOC)
    • 6 *.bzl files (168 LOC)
    • 1 *.yaml files (17 LOC)
  • " *.go" is biggest, containing 49.41% of LOC.
  • " *.yaml" is smallest, containing 0.09% of LOC.


*.go9000 LOC (49%) 93 files
*.cc4740 LOC (26%) 34 files
*.h2227 LOC (12%) 47 files
*.py1592 LOC (8%) 3 files
*.proto470 LOC (2%) 7 files
*.bzl168 LOC (<1%) 6 files
*.yaml17 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[-]test[-].*".
  • 242 files match defined criteria (59,746 LOC, 328.0% vs. main code):
    • 166 *.go files (47,437 LOC)
    • 35 *.cc files (7,725 LOC)
    • 12 *.py files (2,178 LOC)
    • 11 *.sh files (1,204 LOC)
    • 11 *.proto files (803 LOC)
    • 1 *.js files (301 LOC)
    • 5 *.yaml files (82 LOC)
    • 1 *.h files (16 LOC)
  • " *.go" is biggest, containing 79.4% of LOC.
  • " *.h" is smallest, containing 0.03% of LOC.


*.go47437 LOC (79%) 166 files
*.cc7725 LOC (12%) 35 files
*.py2178 LOC (3%) 12 files
*.sh1204 LOC (2%) 11 files
*.proto803 LOC (1%) 11 files
*.js301 LOC (<1%) 1 file
*.yaml82 LOC (<1%) 5 files
*.h16 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 ".*_generated[.][a-z]+".
    • files with paths like ".*/package[-]lock[.]json".
  • 4 files match defined criteria (4,097 LOC, 22.5% vs. main code). All matches are in *.json files.


*.json4097 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 ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 37 files match defined criteria (1,486 LOC, 8.2% vs. main code). All matches are in *.sh files.


*.sh1486 LOC (100%) 37 files
Other Code
pb
proto
mod
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]pb".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
  • 40 files match defined criteria (10,682 LOC, 58.6% vs. main code):
    • 13 *.json files (7,016 LOC)
    • 4 *.pb files (2,094 LOC)
    • 20 *.md files (1,169 LOC)
    • 1 *.proto files (333 LOC)
    • 1 *.mod files (45 LOC)
    • 1 *.yaml files (25 LOC)
  • " *.json" is biggest, containing 65.68% of LOC.
  • " *.yaml" is smallest, containing 0.23% of LOC.


*.json7016 LOC (65%) 13 files
*.pb2094 LOC (19%) 4 files
*.md1169 LOC (10%) 20 files
*.proto333 LOC (3%) 1 file
*.mod45 LOC (<1%) 1 file
*.yaml25 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:15