GoogleCloudPlatform / buildpack-samples
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
txt
mod
cmd
ru
gitattributes
csproj
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.

main281 LOC (3%) 34 files
test0 LOC (0%) 0 files
generated3381 LOC (41%) 2 files
build and deployment579 LOC (7%) 7 files
other3949 LOC (48%) 39 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ru
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 34 files match defined criteria (281 LOC, 100.0% vs. main code):
    • 3 *.java files (54 LOC)
    • 2 *.cs files (49 LOC)
    • 3 *.go files (43 LOC)
    • 3 *.kts files (34 LOC)
    • 4 *.js files (24 LOC)
    • 8 *.toml files (23 LOC)
    • 2 *.cc files (17 LOC)
    • 2 *.rb files (14 LOC)
    • 2 *.py files (9 LOC)
    • 3 *.php files (6 LOC)
    • 1 *.ts files (6 LOC)
    • 1 *.ru files (2 LOC)
  • " *.java" is biggest, containing 19.22% of LOC.
  • " *.ru" is smallest, containing 0.71% of LOC.


*.java54 LOC (19%) 3 files
*.cs49 LOC (17%) 2 files
*.go43 LOC (15%) 3 files
*.kts34 LOC (12%) 3 files
*.js24 LOC (8%) 4 files
*.toml23 LOC (8%) 8 files
*.cc17 LOC (6%) 2 files
*.rb14 LOC (4%) 2 files
*.py9 LOC (3%) 2 files
*.php6 LOC (2%) 3 files
*.ts6 LOC (2%) 1 file
*.ru2 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 ".*/package[-]lock[.]json".
  • 2 files match defined criteria (3,381 LOC, 1203.2% vs. main code). All matches are in *.json files.


*.json3381 LOC (100%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/pnpm.*[.]ya?ml".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/[.]gitattributes".
  • 7 files match defined criteria (579 LOC, 206.0% vs. main code):
    • 1 *.yaml files (357 LOC)
    • 2 *.bat files (139 LOC)
    • 2 *.xml files (76 LOC)
    • 1 *.csproj files (6 LOC)
    • 1 *.gradle files (1 LOC)
  • " *.yaml" is biggest, containing 61.66% of LOC.
  • " *.gradle" is smallest, containing 0.17% of LOC.


*.yaml357 LOC (61%) 1 file
*.bat139 LOC (24%) 2 files
*.xml76 LOC (13%) 2 files
*.csproj6 LOC (1%) 1 file
*.gradle1 LOC (<1%) 1 file
Other Code
txt
mod
properties
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 ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
  • 39 files match defined criteria (3,949 LOC, 1405.3% vs. main code):
    • 9 *.json files (3,472 LOC)
    • 22 *.md files (421 LOC)
    • 3 *.txt files (30 LOC)
    • 1 *.java files (16 LOC)
    • 2 *.mod files (8 LOC)
    • 2 *.properties files (2 LOC)
  • " *.json" is biggest, containing 87.92% of LOC.
  • " *.properties" is smallest, containing 0.05% of LOC.


*.json3472 LOC (87%) 9 files
*.md421 LOC (10%) 22 files
*.txt30 LOC (<1%) 3 files
*.java16 LOC (<1%) 1 file
*.mod8 LOC (<1%) 2 files
*.properties2 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:15