GoogleCloudPlatform / microservices-demo
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
mod
in
csproj
gitattributes
editorconfig
properties
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.

main26534 LOC (54%) 166 files
test892 LOC (1%) 10 files
generated9246 LOC (18%) 2 files
build and deployment322 LOC (<1%) 15 files
other12095 LOC (24%) 58 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 166 files match defined criteria (26,534 LOC, 100.0% vs. main code):
    • 24 *.go files (14,409 LOC)
    • 81 *.yaml files (6,756 LOC)
    • 11 *.py files (1,594 LOC)
    • 8 *.proto files (953 LOC)
    • 4 *.css files (767 LOC)
    • 11 *.html files (740 LOC)
    • 8 *.cs files (524 LOC)
    • 6 *.js files (347 LOC)
    • 2 *.java files (255 LOC)
    • 5 *.tf files (125 LOC)
    • 4 *.in files (28 LOC)
    • 1 *.xml files (21 LOC)
    • 1 *.tfvars files (15 LOC)
  • " *.go" is biggest, containing 54.3% of LOC.
  • " *.tfvars" is smallest, containing 0.06% of LOC.


*.go14409 LOC (54%) 24 files
*.yaml6756 LOC (25%) 81 files
*.py1594 LOC (6%) 11 files
*.proto953 LOC (3%) 8 files
*.css767 LOC (2%) 4 files
*.html740 LOC (2%) 11 files
*.cs524 LOC (1%) 8 files
*.js347 LOC (1%) 6 files
*.java255 LOC (<1%) 2 files
*.tf125 LOC (<1%) 5 files
*.in28 LOC (<1%) 4 files
*.xml21 LOC (<1%) 1 file
*.tfvars15 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
  • 10 files match defined criteria (892 LOC, 3.4% vs. main code):
    • 5 *.go files (739 LOC)
    • 1 *.cs files (110 LOC)
    • 3 *.yaml files (27 LOC)
    • 1 *.csproj files (16 LOC)
  • " *.go" is biggest, containing 82.85% of LOC.
  • " *.csproj" is smallest, containing 1.79% of LOC.


*.go739 LOC (82%) 5 files
*.cs110 LOC (12%) 1 file
*.yaml27 LOC (3%) 3 files
*.csproj16 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 (9,246 LOC, 34.8% vs. main code). All matches are in *.json files.


*.json9246 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 ".*[.]sh".
    • 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/[.]gitattributes".
  • 15 files match defined criteria (322 LOC, 1.2% vs. main code):
    • 11 *.sh files (137 LOC)
    • 2 *.gradle files (96 LOC)
    • 1 *.bat files (73 LOC)
    • 1 *.csproj files (16 LOC)
  • " *.sh" is biggest, containing 42.55% of LOC.
  • " *.csproj" is smallest, containing 4.97% of LOC.


*.sh137 LOC (42%) 11 files
*.gradle96 LOC (29%) 2 files
*.bat73 LOC (22%) 1 file
*.csproj16 LOC (4%) 1 file
Other Code
txt
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]editorconfig".
  • 58 files match defined criteria (12,095 LOC, 45.6% vs. main code):
    • 7 *.json files (9,462 LOC)
    • 26 *.md files (1,357 LOC)
    • 6 *.txt files (601 LOC)
    • 15 *.svg files (474 LOC)
    • 4 *.mod files (201 LOC)
  • " *.json" is biggest, containing 78.23% of LOC.
  • " *.mod" is smallest, containing 1.66% of LOC.


*.json9462 LOC (78%) 7 files
*.md1357 LOC (11%) 26 files
*.txt601 LOC (4%) 6 files
*.svg474 LOC (3%) 15 files
*.mod201 LOC (1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:42