GoogleCloudPlatform / sapagent
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
proto
spec
mod
cfg
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.

main45411 LOC (34%) 191 files
test80283 LOC (61%) 149 files
generated0 LOC (0%) 0 files
build and deployment82 LOC (<1%) 2 files
other4440 LOC (3%) 70 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
spec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 191 files match defined criteria (45,411 LOC, 100.0% vs. main code):
    • 164 *.go files (43,012 LOC)
    • 16 *.proto files (1,195 LOC)
    • 4 *.yaml files (507 LOC)
    • 4 *.ps1 files (408 LOC)
    • 2 *.spec files (274 LOC)
    • 1 *.xml files (15 LOC)
  • " *.go" is biggest, containing 94.72% of LOC.
  • " *.xml" is smallest, containing 0.03% of LOC.


*.go43012 LOC (94%) 164 files
*.proto1195 LOC (2%) 16 files
*.yaml507 LOC (1%) 4 files
*.ps1408 LOC (<1%) 4 files
*.spec274 LOC (<1%) 2 files
*.xml15 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
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]est/.*".
  • 149 files match defined criteria (80,283 LOC, 176.8% vs. main code):
    • 137 *.go files (78,772 LOC)
    • 6 *.xml files (1,003 LOC)
    • 4 *.yaml files (503 LOC)
    • 2 *.cfg files (5 LOC)
  • " *.go" is biggest, containing 98.12% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.go78772 LOC (98%) 137 files
*.xml1003 LOC (1%) 6 files
*.yaml503 LOC (<1%) 4 files
*.cfg5 LOC (<1%) 2 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".
  • 2 files match defined criteria (82 LOC, 0.2% vs. main code). All matches are in *.sh files.


*.sh82 LOC (100%) 2 files
Other Code
mod
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 ".*[.]txt".
    • files with paths like ".*/go[.]mod".
  • 70 files match defined criteria (4,440 LOC, 9.8% vs. main code):
    • 57 *.json files (4,182 LOC)
    • 5 *.md files (110 LOC)
    • 1 *.mod files (103 LOC)
    • 7 *.txt files (45 LOC)
  • " *.json" is biggest, containing 94.19% of LOC.
  • " *.txt" is smallest, containing 1.01% of LOC.


*.json4182 LOC (94%) 57 files
*.md110 LOC (2%) 5 files
*.mod103 LOC (2%) 1 file
*.txt45 LOC (1%) 7 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:52