elastic / autoscaler
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
s
txt
ini
mod
mkd
tpl
diff
gitattributes
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.

main918260 LOC (87%) 5,568 files
test97153 LOC (9%) 373 files
generated13693 LOC (1%) 14 files
build and deployment1360 LOC (<1%) 44 files
other22302 LOC (2%) 215 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 5568 files match defined criteria (918,260 LOC, 100.0% vs. main code):
    • 5,516 *.go files (912,852 LOC)
    • 43 *.yaml files (4,416 LOC)
    • 6 *.py files (547 LOC)
    • 2 *.proto files (299 LOC)
    • 1 *.tpl files (146 LOC)
  • " *.go" is biggest, containing 99.41% of LOC.
  • " *.tpl" is smallest, containing 0.02% of LOC.


*.go912852 LOC (99%) 5,516 files
*.yaml4416 LOC (<1%) 43 files
*.py547 LOC (<1%) 6 files
*.proto299 LOC (<1%) 2 files
*.tpl146 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[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*[-]tests/.*".
  • 373 files match defined criteria (97,153 LOC, 10.6% vs. main code):
    • 366 *.go files (96,007 LOC)
    • 7 *.yaml files (1,146 LOC)
  • " *.go" is biggest, containing 98.82% of LOC.
  • " *.yaml" is smallest, containing 1.18% of LOC.


*.go96007 LOC (98%) 366 files
*.yaml1146 LOC (1%) 7 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 .*".
  • 14 files match defined criteria (13,693 LOC, 1.5% vs. main code). All matches are in *.go files.


*.go13693 LOC (100%) 14 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".
    • files with paths like ".*/[.]gitattributes".
  • 44 files match defined criteria (1,360 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh1360 LOC (100%) 44 files
Other Code
txt
mod
tpl
mkd
ini
diff
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 ".*/vendor/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]mkd".
    • files with paths like ".*/[Ss]amples/.*".
  • 215 files match defined criteria (22,302 LOC, 2.4% vs. main code):
    • 91 *.md files (10,235 LOC)
    • 75 *.yaml files (7,429 LOC)
    • 16 *.txt files (1,523 LOC)
    • 13 *.json files (1,472 LOC)
    • 6 *.mod files (808 LOC)
    • 2 *.go files (427 LOC)
    • 1 *.tpl files (210 LOC)
    • 4 *.sh files (87 LOC)
    • 1 *.rb files (37 LOC)
    • 2 *.mkd files (32 LOC)
    • 3 *.ini files (24 LOC)
    • 1 *.diff files (18 LOC)
  • " *.md" is biggest, containing 45.89% of LOC.
  • " *.diff" is smallest, containing 0.08% of LOC.


*.md10235 LOC (45%) 91 files
*.yaml7429 LOC (33%) 75 files
*.txt1523 LOC (6%) 16 files
*.json1472 LOC (6%) 13 files
*.mod808 LOC (3%) 6 files
*.go427 LOC (1%) 2 files
*.tpl210 LOC (<1%) 1 file
*.sh87 LOC (<1%) 4 files
*.rb37 LOC (<1%) 1 file
*.mkd32 LOC (<1%) 2 files
*.ini24 LOC (<1%) 3 files
*.diff18 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:18