GoogleCloudPlatform / solutions-workshops
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
properties
mod
txt
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.

main5770 LOC (52%) 159 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment659 LOC (6%) 10 files
other4462 LOC (40%) 67 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 ".*".
  • 159 files match defined criteria (5,770 LOC, 100.0% vs. main code):
    • 68 *.go files (3,376 LOC)
    • 91 *.yaml files (2,394 LOC)
  • " *.go" is biggest, containing 58.51% of LOC.
  • " *.yaml" is smallest, containing 41.49% of LOC.


*.go3376 LOC (58%) 68 files
*.yaml2394 LOC (41%) 91 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 ".*[.]gradle".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
  • 10 files match defined criteria (659 LOC, 11.4% vs. main code):
    • 4 *.gradle files (440 LOC)
    • 5 *.sh files (158 LOC)
    • 1 *.bat files (61 LOC)
  • " *.gradle" is biggest, containing 66.77% of LOC.
  • " *.bat" is smallest, containing 9.26% of LOC.


*.gradle440 LOC (66%) 4 files
*.sh158 LOC (23%) 5 files
*.bat61 LOC (9%) 1 file
Other Code
properties
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 ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
  • 67 files match defined criteria (4,462 LOC, 77.3% vs. main code):
    • 53 *.java files (3,692 LOC)
    • 6 *.md files (450 LOC)
    • 5 *.properties files (156 LOC)
    • 2 *.mod files (135 LOC)
    • 1 *.json files (29 LOC)
  • " *.java" is biggest, containing 82.74% of LOC.
  • " *.json" is smallest, containing 0.65% of LOC.


*.java3692 LOC (82%) 53 files
*.md450 LOC (10%) 6 files
*.properties156 LOC (3%) 5 files
*.mod135 LOC (3%) 2 files
*.json29 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:59