elastic / harp-plugins
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
mod
txt
gitattributes
proto
editorconfig
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.

main6077 LOC (25%) 109 files
test411 LOC (1%) 3 files
generated604 LOC (2%) 1 file
build and deployment0 LOC (0%) 0 files
other16453 LOC (69%) 24 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 109 files match defined criteria (6,077 LOC, 100.0% vs. main code):
    • 98 *.go files (5,380 LOC)
    • 5 *.asciidoc files (546 LOC)
    • 1 *.proto files (65 LOC)
    • 2 *.tf files (55 LOC)
    • 3 *.yaml files (31 LOC)
  • " *.go" is biggest, containing 88.53% of LOC.
  • " *.yaml" is smallest, containing 0.51% of LOC.


*.go5380 LOC (88%) 98 files
*.asciidoc546 LOC (8%) 5 files
*.proto65 LOC (1%) 1 file
*.tf55 LOC (<1%) 2 files
*.yaml31 LOC (<1%) 3 files
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 ".*/[Tt]est/.*".
  • 3 files match defined criteria (411 LOC, 6.8% vs. main code). All matches are in *.go files.


*.go411 LOC (100%) 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 ".*/gen/.*[.]go".
  • 1 file matches defined criteria (604 LOC, 9.9% vs. main code). All matches are in *.go files.


*.go604 LOC (100%) 1 file
Other Code
txt
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
  • 24 files match defined criteria (16,453 LOC, 270.7% vs. main code):
    • 3 *.txt files (14,663 LOC)
    • 9 *.md files (961 LOC)
    • 6 *.json files (420 LOC)
    • 6 *.mod files (409 LOC)
  • " *.txt" is biggest, containing 89.12% of LOC.
  • " *.mod" is smallest, containing 2.49% of LOC.


*.txt14663 LOC (89%) 3 files
*.md961 LOC (5%) 9 files
*.json420 LOC (2%) 6 files
*.mod409 LOC (2%) 6 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:54