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.

main25651 LOC (35%) 209 files
test26411 LOC (36%) 150 files
generated64 LOC (<1%) 2 files
build and deployment247 LOC (<1%) 8 files
other19395 LOC (27%) 33 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 ".*".
  • 209 files match defined criteria (25,651 LOC, 100.0% vs. main code):
    • 197 *.go files (25,160 LOC)
    • 9 *.toml files (390 LOC)
    • 2 *.yaml files (56 LOC)
    • 1 *.rego files (45 LOC)
  • " *.go" is biggest, containing 98.09% of LOC.
  • " *.rego" is smallest, containing 0.18% of LOC.


*.go25160 LOC (98%) 197 files
*.toml390 LOC (1%) 9 files
*.yaml56 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 ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
  • 150 files match defined criteria (26,411 LOC, 103.0% vs. main code). All matches are in *.go files.


*.go26411 LOC (100%) 150 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 ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 8 files match defined criteria (247 LOC, 1.0% vs. main code). All matches are in *.sh files.


*.sh247 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 ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]gitignore".
  • 33 files match defined criteria (19,395 LOC, 75.6% vs. main code):
    • 22 *.yaml files (17,311 LOC)
    • 6 *.md files (1,787 LOC)
    • 3 *.mod files (251 LOC)
    • 1 *.json files (32 LOC)
    • 1 *.txt files (14 LOC)
  • " *.yaml" is biggest, containing 89.25% of LOC.
  • " *.txt" is smallest, containing 0.07% of LOC.


*.yaml17311 LOC (89%) 22 files
*.md1787 LOC (9%) 6 files
*.mod251 LOC (1%) 3 files
*.json32 LOC (<1%) 1 file
*.txt14 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 22:26