GoogleCloudPlatform / serverless-production-readiness-java-gcp
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
st
cmd
ini
hcl
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.

main15450 LOC (7%) 352 files
test6992 LOC (3%) 139 files
generated745 LOC (<1%) 1 file
build and deployment6799 LOC (3%) 168 files
other173897 LOC (85%) 193 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
st
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 352 files match defined criteria (15,450 LOC, 100.0% vs. main code):
    • 237 *.java files (10,650 LOC)
    • 44 *.yaml files (2,577 LOC)
    • 14 *.xml files (992 LOC)
    • 20 *.sql files (399 LOC)
    • 2 *.tf files (361 LOC)
    • 8 *.tsx files (296 LOC)
    • 12 *.st files (69 LOC)
    • 4 *.html files (68 LOC)
    • 4 *.ts files (20 LOC)
    • 3 *.js files (12 LOC)
    • 4 *.css files (6 LOC)
  • " *.java" is biggest, containing 68.93% of LOC.
  • " *.css" is smallest, containing 0.04% of LOC.


*.java10650 LOC (68%) 237 files
*.yaml2577 LOC (16%) 44 files
*.xml992 LOC (6%) 14 files
*.sql399 LOC (2%) 20 files
*.tf361 LOC (2%) 2 files
*.tsx296 LOC (1%) 8 files
*.st69 LOC (<1%) 12 files
*.html68 LOC (<1%) 4 files
*.ts20 LOC (<1%) 4 files
*.js12 LOC (<1%) 3 files
*.css6 LOC (<1%) 4 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
st
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 139 files match defined criteria (6,992 LOC, 45.3% vs. main code):
    • 95 *.java files (6,738 LOC)
    • 37 *.st files (173 LOC)
    • 5 *.sh files (79 LOC)
    • 2 *.tf files (2 LOC)
  • " *.java" is biggest, containing 96.37% of LOC.
  • " *.tf" is smallest, containing 0.03% of LOC.


*.java6738 LOC (96%) 95 files
*.st173 LOC (2%) 37 files
*.sh79 LOC (1%) 5 files
*.tf2 LOC (<1%) 2 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 ".*[.]generated[.][a-zA-Z]+".
  • 1 file matches defined criteria (745 LOC, 4.8% vs. main code). All matches are in *.ts files.


*.ts745 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 ".*[.]sh".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 168 files match defined criteria (6,799 LOC, 44.0% vs. main code):
    • 29 *.xml files (4,947 LOC)
    • 137 *.sh files (1,652 LOC)
    • 2 *.yaml files (200 LOC)
  • " *.xml" is biggest, containing 72.76% of LOC.
  • " *.yaml" is smallest, containing 2.94% of LOC.


*.xml4947 LOC (72%) 29 files
*.sh1652 LOC (24%) 137 files
*.yaml200 LOC (2%) 2 files
Other Code
txt
properties
ini
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 ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Dd]emos?/.*".
  • 193 files match defined criteria (173,897 LOC, 1125.5% vs. main code):
    • 55 *.txt files (146,599 LOC)
    • 26 *.json files (20,082 LOC)
    • 68 *.md files (6,788 LOC)
    • 42 *.properties files (412 LOC)
    • 2 *.ini files (16 LOC)
  • " *.txt" is biggest, containing 84.3% of LOC.
  • " *.ini" is smallest, containing 0.01% of LOC.


*.txt146599 LOC (84%) 55 files
*.json20082 LOC (11%) 26 files
*.md6788 LOC (3%) 68 files
*.properties412 LOC (<1%) 42 files
*.ini16 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:57