GoogleCloudPlatform / kms-integrations
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
cfg
proto
patch
wxs
mod
gitattributes
clang-format
txt
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.

main15193 LOC (40%) 171 files
test21692 LOC (58%) 122 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other299 LOC (<1%) 7 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
wxs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 171 files match defined criteria (15,193 LOC, 100.0% vs. main code):
    • 66 *.cc files (9,097 LOC)
    • 69 *.h files (2,062 LOC)
    • 20 *.go files (1,778 LOC)
    • 5 *.bzl files (1,766 LOC)
    • 7 *.proto files (275 LOC)
    • 1 *.c files (116 LOC)
    • 2 *.java files (71 LOC)
    • 1 *.wxs files (28 LOC)
  • " *.cc" is biggest, containing 59.88% of LOC.
  • " *.wxs" is smallest, containing 0.18% of LOC.


*.cc9097 LOC (59%) 66 files
*.h2062 LOC (13%) 69 files
*.go1778 LOC (11%) 20 files
*.bzl1766 LOC (11%) 5 files
*.proto275 LOC (1%) 7 files
*.c116 LOC (<1%) 1 file
*.java71 LOC (<1%) 2 files
*.wxs28 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
wxs
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 ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
  • 122 files match defined criteria (21,692 LOC, 142.8% vs. main code):
    • 75 *.cc files (16,024 LOC)
    • 27 *.go files (4,738 LOC)
    • 4 *.java files (515 LOC)
    • 10 *.h files (274 LOC)
    • 5 *.proto files (122 LOC)
    • 1 *.wxs files (19 LOC)
  • " *.cc" is biggest, containing 73.87% of LOC.
  • " *.wxs" is smallest, containing 0.09% of LOC.


*.cc16024 LOC (73%) 75 files
*.go4738 LOC (21%) 27 files
*.java515 LOC (2%) 4 files
*.h274 LOC (1%) 10 files
*.proto122 LOC (<1%) 5 files
*.wxs19 LOC (<1%) 1 file
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]patch".
    • 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".
  • 7 files match defined criteria (299 LOC, 2.0% vs. main code):
    • 6 *.md files (268 LOC)
    • 1 *.mod files (31 LOC)
  • " *.md" is biggest, containing 89.63% of LOC.
  • " *.mod" is smallest, containing 10.37% of LOC.


*.md268 LOC (89%) 6 files
*.mod31 LOC (10%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:41