GoogleCloudPlatform / osconfig
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
txt
spec
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.

main24408 LOC (61%) 103 files
test12305 LOC (31%) 54 files
generated0 LOC (0%) 0 files
build and deployment332 LOC (<1%) 5 files
other2365 LOC (6%) 69 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 103 files match defined criteria (24,408 LOC, 100.0% vs. main code):
    • 97 *.go files (24,249 LOC)
    • 1 *.spec files (80 LOC)
    • 2 *.ps1 files (57 LOC)
    • 3 *.yaml files (22 LOC)
  • " *.go" is biggest, containing 99.35% of LOC.
  • " *.yaml" is smallest, containing 0.09% of LOC.


*.go24249 LOC (99%) 97 files
*.spec80 LOC (<1%) 1 file
*.ps157 LOC (<1%) 2 files
*.yaml22 LOC (<1%) 3 files
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 ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/test_.*".
  • 54 files match defined criteria (12,305 LOC, 50.4% vs. main code):
    • 53 *.go files (12,265 LOC)
    • 1 *.sh files (40 LOC)
  • " *.go" is biggest, containing 99.67% of LOC.
  • " *.sh" is smallest, containing 0.33% of LOC.


*.go12265 LOC (99%) 53 files
*.sh40 LOC (<1%) 1 file
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".
  • 5 files match defined criteria (332 LOC, 1.4% vs. main code). All matches are in *.sh files.


*.sh332 LOC (100%) 5 files
Other Code
mod
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/go[.]mod".
  • 69 files match defined criteria (2,365 LOC, 9.7% vs. main code):
    • 24 *.yaml files (878 LOC)
    • 13 *.json files (699 LOC)
    • 12 *.tf files (340 LOC)
    • 11 *.md files (262 LOC)
    • 2 *.mod files (93 LOC)
    • 1 *.sh files (60 LOC)
    • 5 *.tfvars files (23 LOC)
    • 1 *.txt files (10 LOC)
  • " *.yaml" is biggest, containing 37.12% of LOC.
  • " *.txt" is smallest, containing 0.42% of LOC.


*.yaml878 LOC (37%) 24 files
*.json699 LOC (29%) 13 files
*.tf340 LOC (14%) 12 files
*.md262 LOC (11%) 11 files
*.mod93 LOC (3%) 2 files
*.sh60 LOC (2%) 1 file
*.tfvars23 LOC (<1%) 5 files
*.txt10 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:44