elastic / cloud-on-k8s
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
tpl
txt
mod
snap
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.

main95808 LOC (46%) 760 files
test106189 LOC (51%) 532 files
generated0 LOC (0%) 0 files
build and deployment738 LOC (<1%) 20 files
other4082 LOC (1%) 96 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 760 files match defined criteria (95,808 LOC, 100.0% vs. main code):
    • 601 *.go files (57,978 LOC)
    • 143 *.yaml files (36,897 LOC)
    • 16 *.tpl files (933 LOC)
  • " *.go" is biggest, containing 60.51% of LOC.
  • " *.tpl" is smallest, containing 0.97% of LOC.


*.go57978 LOC (60%) 601 files
*.yaml36897 LOC (38%) 143 files
*.tpl933 LOC (<1%) 16 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/test[.].*".
  • 532 files match defined criteria (106,189 LOC, 110.8% vs. main code):
    • 479 *.go files (96,209 LOC)
    • 4 *.snap files (5,173 LOC)
    • 43 *.yaml files (4,629 LOC)
    • 6 *.sh files (178 LOC)
  • " *.go" is biggest, containing 90.6% of LOC.
  • " *.sh" is smallest, containing 0.17% of LOC.


*.go96209 LOC (90%) 479 files
*.snap5173 LOC (4%) 4 files
*.yaml4629 LOC (4%) 43 files
*.sh178 LOC (<1%) 6 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".
  • 20 files match defined criteria (738 LOC, 0.8% vs. main code). All matches are in *.sh files.


*.sh738 LOC (100%) 20 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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[Ee]xamples/.*".
  • 96 files match defined criteria (4,082 LOC, 4.3% vs. main code):
    • 45 *.yaml files (2,112 LOC)
    • 7 *.mod files (742 LOC)
    • 20 *.md files (706 LOC)
    • 10 *.asciidoc files (392 LOC)
    • 12 *.txt files (106 LOC)
    • 2 *.json files (24 LOC)
  • " *.yaml" is biggest, containing 51.74% of LOC.
  • " *.json" is smallest, containing 0.59% of LOC.


*.yaml2112 LOC (51%) 45 files
*.mod742 LOC (18%) 7 files
*.md706 LOC (17%) 20 files
*.asciidoc392 LOC (9%) 10 files
*.txt106 LOC (2%) 12 files
*.json24 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:46