GoogleCloudPlatform / professional-services
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
properties
mod
tpl
ini
xsd
rego
hcl
proto
cfg
gitattributes
handlebars
editorconfig
in
csproj
cmd
eslintignore
feature
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.

main81934 LOC (24%) 1,139 files
test12283 LOC (3%) 170 files
generated9556 LOC (2%) 4 files
build and deployment4466 LOC (1%) 71 files
other220229 LOC (67%) 3,030 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
proto
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1139 files match defined criteria (81,934 LOC, 100.0% vs. main code):
    • 463 *.py files (37,218 LOC)
    • 47 *.go files (9,962 LOC)
    • 111 *.tf files (7,145 LOC)
    • 240 *.yaml files (5,268 LOC)
    • 68 *.java files (3,746 LOC)
    • 30 *.sql files (3,324 LOC)
    • 5 *.ipynb files (2,481 LOC)
    • 11 *.cs files (2,294 LOC)
    • 29 *.ts files (2,125 LOC)
    • 21 *.js files (1,844 LOC)
    • 15 *.scala files (1,639 LOC)
    • 9 *.rs files (1,326 LOC)
    • 18 *.html files (758 LOC)
    • 18 *.css files (533 LOC)
    • 14 *.tpl files (509 LOC)
    • 12 *.tfvars files (290 LOC)
    • 4 *.toml files (261 LOC)
    • 6 *.xml files (256 LOC)
    • 1 *.ps1 files (214 LOC)
    • 2 *.jinja files (202 LOC)
    • 5 *.tsx files (191 LOC)
    • 1 *.proto files (146 LOC)
    • 1 *.bash files (111 LOC)
    • 1 *.avsc files (36 LOC)
    • 2 *.sbt files (30 LOC)
    • 4 *.cfg files (24 LOC)
    • 1 *.in files (1 LOC)
  • " *.py" is biggest, containing 45.42% of LOC.
  • " *.in" is smallest, containing 0% of LOC.


*.py37218 LOC (45%) 463 files
*.go9962 LOC (12%) 47 files
*.tf7145 LOC (8%) 111 files
*.yaml5268 LOC (6%) 240 files
*.java3746 LOC (4%) 68 files
*.sql3324 LOC (4%) 30 files
*.ipynb2481 LOC (3%) 5 files
*.cs2294 LOC (2%) 11 files
*.ts2125 LOC (2%) 29 files
*.js1844 LOC (2%) 21 files
*.scala1639 LOC (2%) 15 files
*.rs1326 LOC (1%) 9 files
*.html758 LOC (<1%) 18 files
*.css533 LOC (<1%) 18 files
*.tpl509 LOC (<1%) 14 files
*.tfvars290 LOC (<1%) 12 files
*.toml261 LOC (<1%) 4 files
*.xml256 LOC (<1%) 6 files
*.ps1214 LOC (<1%) 1 file
*.jinja202 LOC (<1%) 2 files
*.tsx191 LOC (<1%) 5 files
*.proto146 LOC (<1%) 1 file
*.bash111 LOC (<1%) 1 file
*.avsc36 LOC (<1%) 1 file
*.sbt30 LOC (<1%) 2 files
*.cfg24 LOC (<1%) 4 files
*.in1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
xsd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*[.]spec[.]ts".
  • 170 files match defined criteria (12,283 LOC, 15.0% vs. main code):
    • 91 *.py files (8,154 LOC)
    • 22 *.ts files (1,089 LOC)
    • 16 *.java files (983 LOC)
    • 4 *.go files (663 LOC)
    • 10 *.yaml files (474 LOC)
    • 4 *.scala files (359 LOC)
    • 11 *.sh files (218 LOC)
    • 6 *.xsd files (153 LOC)
    • 2 *.sql files (67 LOC)
    • 1 *.tf files (51 LOC)
    • 1 *.js files (32 LOC)
    • 1 *.xml files (25 LOC)
    • 1 *.tsx files (15 LOC)
  • " *.py" is biggest, containing 66.38% of LOC.
  • " *.tsx" is smallest, containing 0.12% of LOC.


*.py8154 LOC (66%) 91 files
*.ts1089 LOC (8%) 22 files
*.java983 LOC (8%) 16 files
*.go663 LOC (5%) 4 files
*.yaml474 LOC (3%) 10 files
*.scala359 LOC (2%) 4 files
*.sh218 LOC (1%) 11 files
*.xsd153 LOC (1%) 6 files
*.sql67 LOC (<1%) 2 files
*.tf51 LOC (<1%) 1 file
*.js32 LOC (<1%) 1 file
*.xml25 LOC (<1%) 1 file
*.tsx15 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".
  • 4 files match defined criteria (9,556 LOC, 11.7% vs. main code). All matches are in *.json files.


*.json9556 LOC (100%) 4 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yaml".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]bat".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]csproj".
  • 71 files match defined criteria (4,466 LOC, 5.5% vs. main code):
    • 60 *.sh files (2,715 LOC)
    • 10 *.xml files (1,722 LOC)
    • 1 *.csproj files (29 LOC)
  • " *.sh" is biggest, containing 60.79% of LOC.
  • " *.csproj" is smallest, containing 0.65% of LOC.


*.sh2715 LOC (60%) 60 files
*.xml1722 LOC (38%) 10 files
*.csproj29 LOC (<1%) 1 file
Other Code
txt
rego
mod
ini
proto
xsd
properties
hcl
tpl
handlebars
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/config/checkstyle/.*".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 3030 files match defined criteria (220,229 LOC, 268.8% vs. main code):
    • 272 *.json files (71,527 LOC)
    • 447 *.md files (36,846 LOC)
    • 488 *.py files (31,827 LOC)
    • 18 *.ipynb files (16,473 LOC)
    • 329 *.tf files (15,306 LOC)
    • 237 *.java files (13,132 LOC)
    • 625 *.yaml files (9,331 LOC)
    • 62 *.xml files (7,271 LOC)
    • 205 *.txt files (3,201 LOC)
    • 99 *.sh files (3,174 LOC)
    • 35 *.js files (1,809 LOC)
    • 37 *.sql files (1,610 LOC)
    • 5 *.jsx files (1,284 LOC)
    • 16 *.html files (1,281 LOC)
    • 13 *.go files (983 LOC)
    • 9 *.rego files (760 LOC)
    • 15 *.ts files (724 LOC)
    • 14 *.css files (580 LOC)
    • 20 *.mod files (459 LOC)
    • 16 *.tfvars files (396 LOC)
    • 8 *.jinja files (345 LOC)
    • 6 *.scala files (277 LOC)
    • 2 *.svg files (224 LOC)
    • 2 *.bat files (220 LOC)
    • 10 *.ini files (211 LOC)
    • 4 *.proto files (200 LOC)
    • 3 *.xsd files (189 LOC)
    • 14 *.properties files (150 LOC)
    • 3 *.hcl files (105 LOC)
    • 4 *.tpl files (63 LOC)
    • 2 *.handlebars files (61 LOC)
    • 1 *.feature files (59 LOC)
    • 2 *.kts files (58 LOC)
    • 2 *.mustache files (39 LOC)
    • 2 *.sbt files (33 LOC)
    • 2 *.avsc files (18 LOC)
    • 1 *.toml files (3 LOC)
  • " *.json" is biggest, containing 32.48% of LOC.
  • " *.toml" is smallest, containing 0% of LOC.


*.json71527 LOC (32%) 272 files
*.md36846 LOC (16%) 447 files
*.py31827 LOC (14%) 488 files
*.ipynb16473 LOC (7%) 18 files
*.tf15306 LOC (6%) 329 files
*.java13132 LOC (5%) 237 files
*.yaml9331 LOC (4%) 625 files
*.xml7271 LOC (3%) 62 files
*.txt3201 LOC (1%) 205 files
*.sh3174 LOC (1%) 99 files
*.js1809 LOC (<1%) 35 files
*.sql1610 LOC (<1%) 37 files
*.jsx1284 LOC (<1%) 5 files
*.html1281 LOC (<1%) 16 files
*.go983 LOC (<1%) 13 files
*.rego760 LOC (<1%) 9 files
*.ts724 LOC (<1%) 15 files
*.css580 LOC (<1%) 14 files
*.mod459 LOC (<1%) 20 files
*.tfvars396 LOC (<1%) 16 files
*.jinja345 LOC (<1%) 8 files
*.scala277 LOC (<1%) 6 files
*.svg224 LOC (<1%) 2 files
*.bat220 LOC (<1%) 2 files
*.ini211 LOC (<1%) 10 files
*.proto200 LOC (<1%) 4 files
*.xsd189 LOC (<1%) 3 files
*.properties150 LOC (<1%) 14 files
*.hcl105 LOC (<1%) 3 files
*.tpl63 LOC (<1%) 4 files
*.handlebars61 LOC (<1%) 2 files
*.feature59 LOC (<1%) 1 file
*.kts58 LOC (<1%) 2 files
*.mustache39 LOC (<1%) 2 files
*.sbt33 LOC (<1%) 2 files
*.avsc18 LOC (<1%) 2 files
*.toml3 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:30