GoogleCloudPlatform / knfsd-cache-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
mod
hcl
txt
patch
bats
gitattributes
mk
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.

main10812 LOC (55%) 129 files
test2203 LOC (11%) 30 files
generated0 LOC (0%) 0 files
build and deployment776 LOC (3%) 11 files
other5736 LOC (29%) 79 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hcl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 129 files match defined criteria (10,812 LOC, 100.0% vs. main code):
    • 73 *.go files (7,237 LOC)
    • 34 *.tf files (2,571 LOC)
    • 16 *.yaml files (666 LOC)
    • 5 *.hcl files (332 LOC)
    • 1 *.sql files (6 LOC)
  • " *.go" is biggest, containing 66.93% of LOC.
  • " *.sql" is smallest, containing 0.06% of LOC.


*.go7237 LOC (66%) 73 files
*.tf2571 LOC (23%) 34 files
*.yaml666 LOC (6%) 16 files
*.hcl332 LOC (3%) 5 files
*.sql6 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
bats
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 30 files match defined criteria (2,203 LOC, 20.4% vs. main code):
    • 23 *.go files (1,883 LOC)
    • 3 *.tf files (147 LOC)
    • 2 *.bats files (101 LOC)
    • 1 *.sh files (54 LOC)
    • 1 *.bash files (18 LOC)
  • " *.go" is biggest, containing 85.47% of LOC.
  • " *.bash" is smallest, containing 0.82% of LOC.


*.go1883 LOC (85%) 23 files
*.tf147 LOC (6%) 3 files
*.bats101 LOC (4%) 2 files
*.sh54 LOC (2%) 1 file
*.bash18 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
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 ".*[.]mk".
    • files with paths like ".*/[.]gitattributes".
  • 11 files match defined criteria (776 LOC, 7.2% vs. main code):
    • 10 *.sh files (752 LOC)
    • 1 *.mk files (24 LOC)
  • " *.sh" is biggest, containing 96.91% of LOC.
  • " *.mk" is smallest, containing 3.09% of LOC.


*.sh752 LOC (96%) 10 files
*.mk24 LOC (3%) 1 file
Other Code
patch
mod
txt
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 ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]patch".
  • 79 files match defined criteria (5,736 LOC, 53.1% vs. main code):
    • 41 *.md files (2,473 LOC)
    • 1 *.json files (1,069 LOC)
    • 5 *.patch files (597 LOC)
    • 8 *.mod files (533 LOC)
    • 9 *.go files (403 LOC)
    • 9 *.tf files (363 LOC)
    • 6 *.txt files (298 LOC)
  • " *.md" is biggest, containing 43.11% of LOC.
  • " *.txt" is smallest, containing 5.2% of LOC.


*.md2473 LOC (43%) 41 files
*.json1069 LOC (18%) 1 file
*.patch597 LOC (10%) 5 files
*.mod533 LOC (9%) 8 files
*.go403 LOC (7%) 9 files
*.tf363 LOC (6%) 9 files
*.txt298 LOC (5%) 6 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:35