GoogleCloudPlatform / bq-pii-classifier
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
tpl
txt
proto
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.

main7173 LOC (66%) 139 files
test268 LOC (2%) 7 files
generated1673 LOC (15%) 7 files
build and deployment550 LOC (5%) 22 files
other1073 LOC (9%) 6 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
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 139 files match defined criteria (7,173 LOC, 100.0% vs. main code):
    • 60 *.java files (3,326 LOC)
    • 55 *.tf files (2,760 LOC)
    • 15 *.tpl files (550 LOC)
    • 2 *.tfvars files (289 LOC)
    • 3 *.py files (137 LOC)
    • 1 *.proto files (62 LOC)
    • 2 *.yaml files (32 LOC)
    • 1 *.xml files (17 LOC)
  • " *.java" is biggest, containing 46.37% of LOC.
  • " *.xml" is smallest, containing 0.24% of LOC.


*.java3326 LOC (46%) 60 files
*.tf2760 LOC (38%) 55 files
*.tpl550 LOC (7%) 15 files
*.tfvars289 LOC (4%) 2 files
*.py137 LOC (1%) 3 files
*.proto62 LOC (<1%) 1 file
*.yaml32 LOC (<1%) 2 files
*.xml17 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 ".*_test[.].*".
  • 7 files match defined criteria (268 LOC, 3.7% vs. main code):
    • 6 *.java files (256 LOC)
    • 1 *.sh files (12 LOC)
  • " *.java" is biggest, containing 95.52% of LOC.
  • " *.sh" is smallest, containing 4.48% of LOC.


*.java256 LOC (95%) 6 files
*.sh12 LOC (4%) 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 any line of content like "//[ ]*Generated by .*".
    • files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 7 files match defined criteria (1,673 LOC, 23.3% vs. main code). All matches are in *.java files.


*.java1673 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 ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 22 files match defined criteria (550 LOC, 7.7% vs. main code):
    • 6 *.xml files (365 LOC)
    • 16 *.sh files (185 LOC)
  • " *.xml" is biggest, containing 66.36% of LOC.
  • " *.sh" is smallest, containing 33.64% of LOC.


*.xml365 LOC (66%) 6 files
*.sh185 LOC (33%) 16 files
Other Code
txt
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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 6 files match defined criteria (1,073 LOC, 15.0% vs. main code):
    • 2 *.json files (967 LOC)
    • 2 *.md files (99 LOC)
    • 2 *.txt files (7 LOC)
  • " *.json" is biggest, containing 90.12% of LOC.
  • " *.txt" is smallest, containing 0.65% of LOC.


*.json967 LOC (90%) 2 files
*.md99 LOC (9%) 2 files
*.txt7 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:44