GoogleCloudPlatform / guest-agent
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
proto
txt
cmd
mod
cfg
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.

main11405 LOC (57%) 78 files
test7845 LOC (39%) 36 files
generated0 LOC (0%) 0 files
build and deployment79 LOC (<1%) 3 files
other665 LOC (3%) 7 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
proto
cmd
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 78 files match defined criteria (11,405 LOC, 100.0% vs. main code):
    • 67 *.go files (10,776 LOC)
    • 1 *.spec files (234 LOC)
    • 4 *.ps1 files (194 LOC)
    • 3 *.proto files (121 LOC)
    • 2 *.cmd files (44 LOC)
    • 1 *.cfg files (36 LOC)
  • " *.go" is biggest, containing 94.48% of LOC.
  • " *.cfg" is smallest, containing 0.32% of LOC.


*.go10776 LOC (94%) 67 files
*.spec234 LOC (2%) 1 file
*.ps1194 LOC (1%) 4 files
*.proto121 LOC (1%) 3 files
*.cmd44 LOC (<1%) 2 files
*.cfg36 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[.].*".
  • 36 files match defined criteria (7,845 LOC, 68.8% vs. main code). All matches are in *.go files.


*.go7845 LOC (100%) 36 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 3 files match defined criteria (79 LOC, 0.7% vs. main code). All matches are in *.sh files.


*.sh79 LOC (100%) 3 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 ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
  • 7 files match defined criteria (665 LOC, 5.8% vs. main code):
    • 5 *.md files (602 LOC)
    • 1 *.mod files (53 LOC)
    • 1 *.txt files (10 LOC)
  • " *.md" is biggest, containing 90.53% of LOC.
  • " *.txt" is smallest, containing 1.5% of LOC.


*.md602 LOC (90%) 5 files
*.mod53 LOC (7%) 1 file
*.txt10 LOC (1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:44