uber / kubernetes
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
pb
proto
mod
s
txt
mo
po
in
gitattributes
sed
editorconfig
jsonl
mk
mdown
clang-format
gitmodules
cfg
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.

main991085 LOC (45%) 7,027 files
test1051576 LOC (48%) 3,574 files
generated8656 LOC (<1%) 183 files
build and deployment33925 LOC (1%) 223 files
other101329 LOC (4%) 647 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
mo
in
sed
jsonl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 7027 files match defined criteria (991,085 LOC, 100.0% vs. main code):
    • 6,741 *.go files (927,198 LOC)
    • 164 *.yaml files (27,669 LOC)
    • 89 *.proto files (26,847 LOC)
    • 10 *.mo files (4,315 LOC)
    • 4 *.psm1 files (3,294 LOC)
    • 3 *.in files (632 LOC)
    • 6 *.sed files (449 LOC)
    • 4 *.py files (388 LOC)
    • 1 *.ps1 files (186 LOC)
    • 3 *.c files (89 LOC)
    • 2 *.jsonl files (18 LOC)
  • " *.go" is biggest, containing 93.55% of LOC.
  • " *.jsonl" is smallest, containing 0% of LOC.


*.go927198 LOC (93%) 6,741 files
*.yaml27669 LOC (2%) 164 files
*.proto26847 LOC (2%) 89 files
*.mo4315 LOC (<1%) 10 files
*.psm13294 LOC (<1%) 4 files
*.in632 LOC (<1%) 3 files
*.sed449 LOC (<1%) 6 files
*.py388 LOC (<1%) 4 files
*.ps1186 LOC (<1%) 1 file
*.c89 LOC (<1%) 3 files
*.jsonl18 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
mo
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[-]tests/.*".
  • 3574 files match defined criteria (1,051,576 LOC, 106.1% vs. main code):
    • 3,156 *.go files (1,025,060 LOC)
    • 303 *.yaml files (16,810 LOC)
    • 86 *.sh files (9,140 LOC)
    • 20 *.in files (448 LOC)
    • 1 *.ps1 files (65 LOC)
    • 2 *.mo files (26 LOC)
    • 3 *.py files (24 LOC)
    • 3 *.html files (3 LOC)
  • " *.go" is biggest, containing 97.48% of LOC.
  • " *.html" is smallest, containing 0% of LOC.


*.go1025060 LOC (97%) 3,156 files
*.yaml16810 LOC (1%) 303 files
*.sh9140 LOC (<1%) 86 files
*.in448 LOC (<1%) 20 files
*.ps165 LOC (<1%) 1 file
*.mo26 LOC (<1%) 2 files
*.py24 LOC (<1%) 3 files
*.html3 LOC (<1%) 3 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_generated[.][a-z]+".
    • files with any line of content like "// This file was generated .*".
    • files with paths like ".*/generated/.*".
    • files with paths like ".*/gen/.*[.]go".
  • 183 files match defined criteria (8,656 LOC, 0.9% vs. main code):
    • 179 *.go files (8,371 LOC)
    • 4 *.sh files (285 LOC)
  • " *.go" is biggest, containing 96.71% of LOC.
  • " *.sh" is smallest, containing 3.29% of LOC.


*.go8371 LOC (96%) 179 files
*.sh285 LOC (3%) 4 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 ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/glide[.]yaml".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]mk".
  • 223 files match defined criteria (33,925 LOC, 3.4% vs. main code):
    • 222 *.sh files (33,906 LOC)
    • 1 *.bat files (19 LOC)
  • " *.sh" is biggest, containing 99.94% of LOC.
  • " *.bat" is smallest, containing 0.06% of LOC.


*.sh33906 LOC (99%) 222 files
*.bat19 LOC (<1%) 1 file
Other Code
po
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 ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]po".
    • files with paths like ".*[.]pb".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]mdown".
    • files with paths like ".*/[Dd]ocumentation/.*".
  • 647 files match defined criteria (101,329 LOC, 10.2% vs. main code):
    • 224 *.md files (47,078 LOC)
    • 12 *.po files (24,637 LOC)
    • 246 *.go files (12,151 LOC)
    • 107 *.json files (9,637 LOC)
    • 4 *.yaml files (4,855 LOC)
    • 34 *.mod files (2,639 LOC)
    • 16 *.txt files (211 LOC)
    • 4 *.sh files (121 LOC)
  • " *.md" is biggest, containing 46.46% of LOC.
  • " *.sh" is smallest, containing 0.12% of LOC.


*.md47078 LOC (46%) 224 files
*.po24637 LOC (24%) 12 files
*.go12151 LOC (11%) 246 files
*.json9637 LOC (9%) 107 files
*.yaml4855 LOC (4%) 4 files
*.mod2639 LOC (2%) 34 files
*.txt211 LOC (<1%) 16 files
*.sh121 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.


2026-04-18 13:11