GoogleCloudPlatform / cloud-builders
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
in
csproj
properties
slim
ash
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.

main12029 LOC (50%) 269 files
test5997 LOC (25%) 51 files
generated1344 LOC (5%) 1 file
build and deployment107 LOC (<1%) 9 files
other4342 LOC (18%) 123 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
slim
ash
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 269 files match defined criteria (12,029 LOC, 100.0% vs. main code):
    • 226 *.yaml files (7,596 LOC)
    • 35 *.go files (4,265 LOC)
    • 2 *.bash files (57 LOC)
    • 1 *.inc files (46 LOC)
    • 1 *.slim files (29 LOC)
    • 1 *.ash files (26 LOC)
    • 1 *.py files (7 LOC)
    • 2 *.in files (3 LOC)
  • " *.yaml" is biggest, containing 63.15% of LOC.
  • " *.in" is smallest, containing 0.02% of LOC.


*.yaml7596 LOC (63%) 226 files
*.go4265 LOC (35%) 35 files
*.bash57 LOC (<1%) 2 files
*.inc46 LOC (<1%) 1 file
*.slim29 LOC (<1%) 1 file
*.ash26 LOC (<1%) 1 file
*.py7 LOC (<1%) 1 file
*.in3 LOC (<1%) 2 files
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 ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
  • 51 files match defined criteria (5,997 LOC, 49.9% vs. main code):
    • 12 *.go files (5,011 LOC)
    • 26 *.yaml files (565 LOC)
    • 13 *.sh files (421 LOC)
  • " *.go" is biggest, containing 83.56% of LOC.
  • " *.sh" is smallest, containing 7.02% of LOC.


*.go5011 LOC (83%) 12 files
*.yaml565 LOC (9%) 26 files
*.sh421 LOC (7%) 13 files
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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (1,344 LOC, 11.2% vs. main code). All matches are in *.json files.


*.json1344 LOC (100%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
  • 9 files match defined criteria (107 LOC, 0.9% vs. main code). All matches are in *.sh files.


*.sh107 LOC (100%) 9 files
Other Code
txt
mod
csproj
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
  • 123 files match defined criteria (4,342 LOC, 36.1% vs. main code):
    • 10 *.json files (1,452 LOC)
    • 36 *.md files (1,422 LOC)
    • 5 *.txt files (391 LOC)
    • 20 *.yaml files (203 LOC)
    • 6 *.cs files (180 LOC)
    • 5 *.xml files (154 LOC)
    • 16 *.go files (147 LOC)
    • 8 *.java files (100 LOC)
    • 4 *.mod files (99 LOC)
    • 2 *.gradle files (60 LOC)
    • 4 *.js files (52 LOC)
    • 1 *.html files (36 LOC)
    • 2 *.csproj files (31 LOC)
    • 2 *.properties files (13 LOC)
    • 1 *.sh files (1 LOC)
    • 1 *.bash files (1 LOC)
  • " *.json" is biggest, containing 33.44% of LOC.
  • " *.bash" is smallest, containing 0.02% of LOC.


*.json1452 LOC (33%) 10 files
*.md1422 LOC (32%) 36 files
*.txt391 LOC (9%) 5 files
*.yaml203 LOC (4%) 20 files
*.cs180 LOC (4%) 6 files
*.xml154 LOC (3%) 5 files
*.go147 LOC (3%) 16 files
*.java100 LOC (2%) 8 files
*.mod99 LOC (2%) 4 files
*.gradle60 LOC (1%) 2 files
*.js52 LOC (1%) 4 files
*.html36 LOC (<1%) 1 file
*.csproj31 LOC (<1%) 2 files
*.properties13 LOC (<1%) 2 files
*.sh1 LOC (<1%) 1 file
*.bash1 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:28