elastic / package-spec
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
txt
hbs
hcl
feature
mod
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.

main4766 LOC (18%) 64 files
test4862 LOC (19%) 116 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other15726 LOC (62%) 185 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 64 files match defined criteria (4,766 LOC, 100.0% vs. main code):
    • 63 *.go files (4,665 LOC)
    • 1 *.yaml files (101 LOC)
  • " *.go" is biggest, containing 97.88% of LOC.
  • " *.yaml" is smallest, containing 2.12% of LOC.


*.go4665 LOC (97%) 63 files
*.yaml101 LOC (2%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
hbs
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]feature".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
  • 116 files match defined criteria (4,862 LOC, 102.0% vs. main code):
    • 27 *.go files (4,212 LOC)
    • 53 *.hbs files (466 LOC)
    • 5 *.yaml files (80 LOC)
    • 6 *.feature files (66 LOC)
    • 19 *.tf files (32 LOC)
    • 6 *.sh files (6 LOC)
  • " *.go" is biggest, containing 86.63% of LOC.
  • " *.sh" is smallest, containing 0.12% of LOC.


*.go4212 LOC (86%) 27 files
*.hbs466 LOC (9%) 53 files
*.yaml80 LOC (1%) 5 files
*.feature66 LOC (1%) 6 files
*.tf32 LOC (<1%) 19 files
*.sh6 LOC (<1%) 6 files
Other Code
txt
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
  • 185 files match defined criteria (15,726 LOC, 330.0% vs. main code):
    • 122 *.json files (10,036 LOC)
    • 54 *.txt files (5,031 LOC)
    • 5 *.md files (233 LOC)
    • 2 *.mod files (226 LOC)
    • 2 *.svg files (200 LOC)
  • " *.json" is biggest, containing 63.82% of LOC.
  • " *.svg" is smallest, containing 1.27% of LOC.


*.json10036 LOC (63%) 122 files
*.txt5031 LOC (31%) 54 files
*.md233 LOC (1%) 5 files
*.mod226 LOC (1%) 2 files
*.svg200 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:52