GoogleCloudPlatform / alertmanager
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
elm
libsonnet
proto
txt
mod
prettierignore
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.

main25399 LOC (43%) 201 files
test18885 LOC (32%) 70 files
generated8576 LOC (14%) 84 files
build and deployment202 LOC (<1%) 6 files
other4731 LOC (8%) 34 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
elm
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 201 files match defined criteria (25,399 LOC, 100.0% vs. main code):
    • 94 *.go files (18,005 LOC)
    • 88 *.elm files (5,935 LOC)
    • 1 *.yaml files (519 LOC)
    • 3 *.html files (397 LOC)
    • 5 *.tsx files (219 LOC)
    • 3 *.proto files (126 LOC)
    • 1 *.css files (113 LOC)
    • 3 *.ts files (66 LOC)
    • 1 *.js files (13 LOC)
    • 2 *.jsonnet files (6 LOC)
  • " *.go" is biggest, containing 70.89% of LOC.
  • " *.jsonnet" is smallest, containing 0.02% of LOC.


*.go18005 LOC (70%) 94 files
*.elm5935 LOC (23%) 88 files
*.yaml519 LOC (2%) 1 file
*.html397 LOC (1%) 3 files
*.tsx219 LOC (<1%) 5 files
*.proto126 LOC (<1%) 3 files
*.css113 LOC (<1%) 1 file
*.ts66 LOC (<1%) 3 files
*.js13 LOC (<1%) 1 file
*.jsonnet6 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
elm
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 ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/test_.*".
  • 70 files match defined criteria (18,885 LOC, 74.4% vs. main code):
    • 66 *.go files (18,721 LOC)
    • 4 *.elm files (164 LOC)
  • " *.go" is biggest, containing 99.13% of LOC.
  • " *.elm" is smallest, containing 0.87% of LOC.


*.go18721 LOC (99%) 66 files
*.elm164 LOC (<1%) 4 files
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 "// This file was generated .*".
  • 84 files match defined criteria (8,576 LOC, 33.8% vs. main code). All matches are in *.go files.


*.go8576 LOC (100%) 84 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[.]json".
  • 6 files match defined criteria (202 LOC, 0.8% vs. main code):
    • 3 *.ts files (137 LOC)
    • 3 *.sh files (65 LOC)
  • " *.ts" is biggest, containing 67.82% of LOC.
  • " *.sh" is smallest, containing 32.18% of LOC.


*.ts137 LOC (67%) 3 files
*.sh65 LOC (32%) 3 files
Other Code
libsonnet
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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]libsonnet".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/COPYRIGHT[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
  • 34 files match defined criteria (4,731 LOC, 18.6% vs. main code):
    • 1 *.svg files (2,671 LOC)
    • 14 *.md files (1,228 LOC)
    • 5 *.libsonnet files (356 LOC)
    • 10 *.json files (243 LOC)
    • 1 *.mod files (135 LOC)
    • 1 *.sh files (66 LOC)
    • 1 *.go files (22 LOC)
    • 1 *.txt files (10 LOC)
  • " *.svg" is biggest, containing 56.46% of LOC.
  • " *.txt" is smallest, containing 0.21% of LOC.


*.svg2671 LOC (56%) 1 file
*.md1228 LOC (25%) 14 files
*.libsonnet356 LOC (7%) 5 files
*.json243 LOC (5%) 10 files
*.mod135 LOC (2%) 1 file
*.sh66 LOC (1%) 1 file
*.go22 LOC (<1%) 1 file
*.txt10 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:48