aws / eks-distro-build-tooling
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
patch
txt
mod
spec
tpl
mk
proto
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.

main17184 LOC (18%) 213 files
test11530 LOC (12%) 98 files
generated504 LOC (<1%) 1 file
build and deployment2880 LOC (3%) 85 files
other62565 LOC (66%) 344 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 213 files match defined criteria (17,184 LOC, 100.0% vs. main code):
    • 8 *.spec files (8,711 LOC)
    • 115 *.go files (5,810 LOC)
    • 87 *.yaml files (2,094 LOC)
    • 1 *.js files (471 LOC)
    • 2 *.tpl files (98 LOC)
  • " *.spec" is biggest, containing 50.69% of LOC.
  • " *.tpl" is smallest, containing 0.57% of LOC.


*.spec8711 LOC (50%) 8 files
*.go5810 LOC (33%) 115 files
*.yaml2094 LOC (12%) 87 files
*.js471 LOC (2%) 1 file
*.tpl98 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*[-]test[-].*".
  • 98 files match defined criteria (11,530 LOC, 67.1% vs. main code):
    • 88 *.go files (10,362 LOC)
    • 7 *.sh files (744 LOC)
    • 2 *.proto files (393 LOC)
    • 1 *.py files (31 LOC)
  • " *.go" is biggest, containing 89.87% of LOC.
  • " *.py" is smallest, containing 0.27% of LOC.


*.go10362 LOC (89%) 88 files
*.sh744 LOC (6%) 7 files
*.proto393 LOC (3%) 2 files
*.py31 LOC (<1%) 1 file
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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (504 LOC, 2.9% vs. main code). All matches are in *.json files.


*.json504 LOC (100%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
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 ".*[.]mk".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 85 files match defined criteria (2,880 LOC, 16.8% vs. main code):
    • 83 *.sh files (2,640 LOC)
    • 2 *.mk files (240 LOC)
  • " *.sh" is biggest, containing 91.67% of LOC.
  • " *.mk" is smallest, containing 8.33% of LOC.


*.sh2640 LOC (91%) 83 files
*.mk240 LOC (8%) 2 files
Other Code
patch
txt
mod
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 ".*/[.]dockerignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 344 files match defined criteria (62,565 LOC, 364.1% vs. main code):
    • 157 *.patch files (34,120 LOC)
    • 110 *.txt files (22,261 LOC)
    • 5 *.json files (4,049 LOC)
    • 58 *.md files (1,277 LOC)
    • 2 *.yaml files (639 LOC)
    • 12 *.mod files (219 LOC)
  • " *.patch" is biggest, containing 54.54% of LOC.
  • " *.mod" is smallest, containing 0.35% of LOC.


*.patch34120 LOC (54%) 157 files
*.txt22261 LOC (35%) 110 files
*.json4049 LOC (6%) 5 files
*.md1277 LOC (2%) 58 files
*.yaml639 LOC (1%) 2 files
*.mod219 LOC (<1%) 12 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 00:13