GoogleCloudPlatform / document-ai-samples
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
mod
gs
htmlhintrc
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.

main74552 LOC (88%) 284 files
test3171 LOC (3%) 17 files
generated0 LOC (0%) 0 files
build and deployment755 LOC (<1%) 22 files
other5837 LOC (6%) 150 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
gs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 284 files match defined criteria (74,552 LOC, 100.0% vs. main code):
    • 110 *.ipynb files (57,728 LOC)
    • 97 *.py files (10,975 LOC)
    • 21 *.js files (1,897 LOC)
    • 14 *.ts files (831 LOC)
    • 7 *.yaml files (771 LOC)
    • 12 *.html files (710 LOC)
    • 6 *.java files (534 LOC)
    • 11 *.css files (446 LOC)
    • 2 *.tf files (384 LOC)
    • 1 *.gs files (98 LOC)
    • 1 *.go files (86 LOC)
    • 1 *.cs files (77 LOC)
    • 1 *.scss files (15 LOC)
  • " *.ipynb" is biggest, containing 77.43% of LOC.
  • " *.scss" is smallest, containing 0.02% of LOC.


*.ipynb57728 LOC (77%) 110 files
*.py10975 LOC (14%) 97 files
*.js1897 LOC (2%) 21 files
*.ts831 LOC (1%) 14 files
*.yaml771 LOC (1%) 7 files
*.html710 LOC (<1%) 12 files
*.java534 LOC (<1%) 6 files
*.css446 LOC (<1%) 11 files
*.tf384 LOC (<1%) 2 files
*.gs98 LOC (<1%) 1 file
*.go86 LOC (<1%) 1 file
*.cs77 LOC (<1%) 1 file
*.scss15 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
  • 17 files match defined criteria (3,171 LOC, 4.3% vs. main code):
    • 2 *.ipynb files (2,280 LOC)
    • 4 *.py files (440 LOC)
    • 9 *.ts files (412 LOC)
    • 2 *.js files (39 LOC)
  • " *.ipynb" is biggest, containing 71.9% of LOC.
  • " *.js" is smallest, containing 1.23% of LOC.


*.ipynb2280 LOC (71%) 2 files
*.py440 LOC (13%) 4 files
*.ts412 LOC (12%) 9 files
*.js39 LOC (1%) 2 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 ".*/pom[.]xml".
    • files with paths like ".*/package[.]json".
  • 22 files match defined criteria (755 LOC, 1.0% vs. main code):
    • 21 *.sh files (719 LOC)
    • 1 *.xml files (36 LOC)
  • " *.sh" is biggest, containing 95.23% of LOC.
  • " *.xml" is smallest, containing 4.77% of LOC.


*.sh719 LOC (95%) 21 files
*.xml36 LOC (4%) 1 file
Other Code
txt
mod
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 150 files match defined criteria (5,837 LOC, 7.8% vs. main code):
    • 102 *.md files (4,990 LOC)
    • 20 *.json files (643 LOC)
    • 26 *.txt files (159 LOC)
    • 1 *.mod files (33 LOC)
    • 1 *.tfvars files (12 LOC)
  • " *.md" is biggest, containing 85.49% of LOC.
  • " *.tfvars" is smallest, containing 0.21% of LOC.


*.md4990 LOC (85%) 102 files
*.json643 LOC (11%) 20 files
*.txt159 LOC (2%) 26 files
*.mod33 LOC (<1%) 1 file
*.tfvars12 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:45