elastic / terraform-provider-ec
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
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.

main16251 LOC (27%) 206 files
test30797 LOC (51%) 132 files
generated8810 LOC (14%) 9 files
build and deployment112 LOC (<1%) 7 files
other3499 LOC (5%) 68 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 ".*".
  • 206 files match defined criteria (16,251 LOC, 100.0% vs. main code):
    • 202 *.go files (16,136 LOC)
    • 3 *.yaml files (109 LOC)
    • 1 *.asciidoc files (6 LOC)
  • " *.go" is biggest, containing 99.29% of LOC.
  • " *.asciidoc" is smallest, containing 0.04% of LOC.


*.go16136 LOC (99%) 202 files
*.yaml109 LOC (<1%) 3 files
*.asciidoc6 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 ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/test_.*".
  • 132 files match defined criteria (30,797 LOC, 189.5% vs. main code). All matches are in *.go files.


*.go30797 LOC (100%) 132 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".
    • files with any line of content like "//[ ]*Generated by .*".
  • 9 files match defined criteria (8,810 LOC, 54.2% vs. main code). All matches are in *.go files.


*.go8810 LOC (100%) 9 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".
  • 7 files match defined criteria (112 LOC, 0.7% vs. main code). All matches are in *.sh files.


*.sh112 LOC (100%) 7 files
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
  • 68 files match defined criteria (3,499 LOC, 21.5% vs. main code):
    • 6 *.json files (1,900 LOC)
    • 42 *.tf files (828 LOC)
    • 10 *.md files (616 LOC)
    • 1 *.mod files (123 LOC)
    • 8 *.sh files (31 LOC)
    • 1 *.yaml files (1 LOC)
  • " *.json" is biggest, containing 54.3% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.json1900 LOC (54%) 6 files
*.tf828 LOC (23%) 42 files
*.md616 LOC (17%) 10 files
*.mod123 LOC (3%) 1 file
*.sh31 LOC (<1%) 8 files
*.yaml1 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:51