apache / apisix-ingress-controller
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
mdx
gitattributes
rego
gitmodules
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.

main27199 LOC (36%) 211 files
test27862 LOC (37%) 159 files
generated64 LOC (<1%) 2 files
build and deployment248 LOC (<1%) 8 files
other19345 LOC (25%) 36 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rego
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 211 files match defined criteria (27,199 LOC, 100.0% vs. main code):
    • 198 *.go files (26,660 LOC)
    • 10 *.toml files (433 LOC)
    • 2 *.yaml files (61 LOC)
    • 1 *.rego files (45 LOC)
  • " *.go" is biggest, containing 98.02% of LOC.
  • " *.rego" is smallest, containing 0.17% of LOC.


*.go26660 LOC (98%) 198 files
*.toml433 LOC (1%) 10 files
*.yaml61 LOC (<1%) 2 files
*.rego45 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 ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/test_.*".
  • 159 files match defined criteria (27,862 LOC, 102.4% vs. main code). All matches are in *.go files.


*.go27862 LOC (100%) 159 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]+".
  • 2 files match defined criteria (64 LOC, 0.2% vs. main code). All matches are in *.go files.


*.go64 LOC (100%) 2 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".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 8 files match defined criteria (248 LOC, 0.9% vs. main code). All matches are in *.sh files.


*.sh248 LOC (100%) 8 files
Other Code
mod
txt
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
  • 36 files match defined criteria (19,345 LOC, 71.1% vs. main code):
    • 24 *.yaml files (16,902 LOC)
    • 6 *.md files (2,121 LOC)
    • 4 *.mod files (276 LOC)
    • 1 *.json files (32 LOC)
    • 1 *.txt files (14 LOC)
  • " *.yaml" is biggest, containing 87.37% of LOC.
  • " *.txt" is smallest, containing 0.07% of LOC.


*.yaml16902 LOC (87%) 24 files
*.md2121 LOC (10%) 6 files
*.mod276 LOC (1%) 4 files
*.json32 LOC (<1%) 1 file
*.txt14 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:02