GoogleCloudPlatform / devrel-demos
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
in
mod
cmd
ru
mjs
cfg
me
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.

main41894 LOC (30%) 732 files
test1415 LOC (1%) 25 files
generated35860 LOC (26%) 7 files
build and deployment1890 LOC (1%) 35 files
other55616 LOC (40%) 471 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
mjs
ru
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 732 files match defined criteria (41,894 LOC, 100.0% vs. main code):
    • 166 *.py files (10,324 LOC)
    • 222 *.yaml files (6,545 LOC)
    • 8 *.ipynb files (6,106 LOC)
    • 94 *.tsx files (5,704 LOC)
    • 4 *.sql files (2,428 LOC)
    • 29 *.html files (2,243 LOC)
    • 40 *.css files (1,861 LOC)
    • 34 *.ts files (1,527 LOC)
    • 42 *.js files (1,488 LOC)
    • 40 *.tf files (1,417 LOC)
    • 7 *.go files (874 LOC)
    • 11 *.jsx files (595 LOC)
    • 8 *.in files (232 LOC)
    • 1 *.vue files (208 LOC)
    • 3 *.java files (118 LOC)
    • 6 *.xml files (102 LOC)
    • 7 *.rb files (54 LOC)
    • 2 *.toml files (40 LOC)
    • 3 *.mjs files (15 LOC)
    • 3 *.ru files (7 LOC)
    • 2 *.cfg files (6 LOC)
  • " *.py" is biggest, containing 24.64% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.py10324 LOC (24%) 166 files
*.yaml6545 LOC (15%) 222 files
*.ipynb6106 LOC (14%) 8 files
*.tsx5704 LOC (13%) 94 files
*.sql2428 LOC (5%) 4 files
*.html2243 LOC (5%) 29 files
*.css1861 LOC (4%) 40 files
*.ts1527 LOC (3%) 34 files
*.js1488 LOC (3%) 42 files
*.tf1417 LOC (3%) 40 files
*.go874 LOC (2%) 7 files
*.jsx595 LOC (1%) 11 files
*.in232 LOC (<1%) 8 files
*.vue208 LOC (<1%) 1 file
*.java118 LOC (<1%) 3 files
*.xml102 LOC (<1%) 6 files
*.rb54 LOC (<1%) 7 files
*.toml40 LOC (<1%) 2 files
*.mjs15 LOC (<1%) 3 files
*.ru7 LOC (<1%) 3 files
*.cfg6 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 25 files match defined criteria (1,415 LOC, 3.4% vs. main code):
    • 22 *.py files (1,316 LOC)
    • 2 *.sh files (61 LOC)
    • 1 *.java files (38 LOC)
  • " *.py" is biggest, containing 93% of LOC.
  • " *.java" is smallest, containing 2.69% of LOC.


*.py1316 LOC (93%) 22 files
*.sh61 LOC (4%) 2 files
*.java38 LOC (2%) 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".
  • 7 files match defined criteria (35,860 LOC, 85.6% vs. main code). All matches are in *.json files.


*.json35860 LOC (100%) 7 files
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 ".*/pom[.]xml".
    • 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".
  • 35 files match defined criteria (1,890 LOC, 4.5% vs. main code):
    • 6 *.xml files (1,212 LOC)
    • 26 *.sh files (567 LOC)
    • 1 *.bat files (68 LOC)
    • 2 *.gradle files (43 LOC)
  • " *.xml" is biggest, containing 64.13% of LOC.
  • " *.gradle" is smallest, containing 2.28% of LOC.


*.xml1212 LOC (64%) 6 files
*.sh567 LOC (30%) 26 files
*.bat68 LOC (3%) 1 file
*.gradle43 LOC (2%) 2 files
Other Code
txt
properties
mod
me
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 ".*[.]txt".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*/go[.]mod".
  • 471 files match defined criteria (55,616 LOC, 132.8% vs. main code):
    • 36 *.json files (39,734 LOC)
    • 154 *.md files (6,256 LOC)
    • 50 *.java files (4,402 LOC)
    • 60 *.txt files (2,781 LOC)
    • 152 *.svg files (1,694 LOC)
    • 6 *.xml files (402 LOC)
    • 6 *.properties files (174 LOC)
    • 6 *.mod files (165 LOC)
    • 1 *.me files (8 LOC)
  • " *.json" is biggest, containing 71.44% of LOC.
  • " *.me" is smallest, containing 0.01% of LOC.


*.json39734 LOC (71%) 36 files
*.md6256 LOC (11%) 154 files
*.java4402 LOC (7%) 50 files
*.txt2781 LOC (5%) 60 files
*.svg1694 LOC (3%) 152 files
*.xml402 LOC (<1%) 6 files
*.properties174 LOC (<1%) 6 files
*.mod165 LOC (<1%) 6 files
*.me8 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:48