GoogleCloudPlatform / bigquery-utils
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
proto
vscodeignore
patch
ini
gitattributes
hcl
cfg
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.

main16901 LOC (28%) 277 files
test10026 LOC (16%) 82 files
generated10227 LOC (16%) 3 files
build and deployment1054 LOC (1%) 22 files
other22146 LOC (36%) 150 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 277 files match defined criteria (16,901 LOC, 100.0% vs. main code):
    • 110 *.java files (5,898 LOC)
    • 59 *.sql files (4,161 LOC)
    • 32 *.py files (2,052 LOC)
    • 16 *.kt files (1,013 LOC)
    • 1 *.ipynb files (986 LOC)
    • 12 *.ts files (800 LOC)
    • 10 *.tf files (550 LOC)
    • 9 *.cc files (537 LOC)
    • 9 *.yaml files (293 LOC)
    • 8 *.h files (185 LOC)
    • 4 *.proto files (152 LOC)
    • 3 *.js files (113 LOC)
    • 2 *.kts files (87 LOC)
    • 1 *.go files (68 LOC)
    • 1 *.tfvars files (6 LOC)
  • " *.java" is biggest, containing 34.9% of LOC.
  • " *.tfvars" is smallest, containing 0.04% of LOC.


*.java5898 LOC (34%) 110 files
*.sql4161 LOC (24%) 59 files
*.py2052 LOC (12%) 32 files
*.kt1013 LOC (5%) 16 files
*.ipynb986 LOC (5%) 1 file
*.ts800 LOC (4%) 12 files
*.tf550 LOC (3%) 10 files
*.cc537 LOC (3%) 9 files
*.yaml293 LOC (1%) 9 files
*.h185 LOC (1%) 8 files
*.proto152 LOC (<1%) 4 files
*.js113 LOC (<1%) 3 files
*.kts87 LOC (<1%) 2 files
*.go68 LOC (<1%) 1 file
*.tfvars6 LOC (<1%) 1 file
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]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*_tests[.].*".
  • 82 files match defined criteria (10,026 LOC, 59.3% vs. main code):
    • 8 *.js files (4,238 LOC)
    • 18 *.py files (2,314 LOC)
    • 28 *.java files (1,984 LOC)
    • 8 *.kt files (808 LOC)
    • 2 *.sh files (184 LOC)
    • 3 *.cc files (162 LOC)
    • 9 *.ts files (152 LOC)
    • 1 *.cpp files (83 LOC)
    • 2 *.html files (44 LOC)
    • 1 *.tf files (32 LOC)
    • 1 *.yaml files (24 LOC)
    • 1 *.sql files (1 LOC)
  • " *.js" is biggest, containing 42.27% of LOC.
  • " *.sql" is smallest, containing 0.01% of LOC.


*.js4238 LOC (42%) 8 files
*.py2314 LOC (23%) 18 files
*.java1984 LOC (19%) 28 files
*.kt808 LOC (8%) 8 files
*.sh184 LOC (1%) 2 files
*.cc162 LOC (1%) 3 files
*.ts152 LOC (1%) 9 files
*.cpp83 LOC (<1%) 1 file
*.html44 LOC (<1%) 2 files
*.tf32 LOC (<1%) 1 file
*.yaml24 LOC (<1%) 1 file
*.sql1 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".
  • 3 files match defined criteria (10,227 LOC, 60.5% vs. main code). All matches are in *.json files.


*.json10227 LOC (100%) 3 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 22 files match defined criteria (1,054 LOC, 6.2% vs. main code):
    • 5 *.xml files (506 LOC)
    • 12 *.sh files (330 LOC)
    • 2 *.bat files (152 LOC)
    • 2 *.gradle files (48 LOC)
    • 1 *.js files (18 LOC)
  • " *.xml" is biggest, containing 48.01% of LOC.
  • " *.js" is smallest, containing 1.71% of LOC.


*.xml506 LOC (48%) 5 files
*.sh330 LOC (31%) 12 files
*.bat152 LOC (14%) 2 files
*.gradle48 LOC (4%) 2 files
*.js18 LOC (1%) 1 file
Other Code
txt
properties
patch
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]patch".
  • 150 files match defined criteria (22,146 LOC, 131.0% vs. main code):
    • 39 *.json files (11,274 LOC)
    • 53 *.md files (6,382 LOC)
    • 12 *.js files (4,012 LOC)
    • 20 *.txt files (167 LOC)
    • 3 *.sh files (80 LOC)
    • 6 *.java files (58 LOC)
    • 4 *.properties files (56 LOC)
    • 4 *.sql files (46 LOC)
    • 2 *.py files (33 LOC)
    • 2 *.patch files (18 LOC)
    • 1 *.ini files (16 LOC)
    • 4 *.svg files (4 LOC)
  • " *.json" is biggest, containing 50.91% of LOC.
  • " *.svg" is smallest, containing 0.02% of LOC.


*.json11274 LOC (50%) 39 files
*.md6382 LOC (28%) 53 files
*.js4012 LOC (18%) 12 files
*.txt167 LOC (<1%) 20 files
*.sh80 LOC (<1%) 3 files
*.java58 LOC (<1%) 6 files
*.properties56 LOC (<1%) 4 files
*.sql46 LOC (<1%) 4 files
*.py33 LOC (<1%) 2 files
*.patch18 LOC (<1%) 2 files
*.ini16 LOC (<1%) 1 file
*.svg4 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:14