apache / apisix
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
t
lua
mod
proto
properties
rego
txt
editorconfig
pb
rockspec
gitattributes
ld
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.

main62682 LOC (84%) 874 files
test4203 LOC (5%) 50 files
generated52 LOC (<1%) 1 file
build and deployment4076 LOC (5%) 41 files
other3293 LOC (4%) 35 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
lua
t
proto
rego
rockspec
ld
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 874 files match defined criteria (62,682 LOC, 100.0% vs. main code):
    • 303 *.lua files (44,501 LOC)
    • 500 *.t files (11,519 LOC)
    • 26 *.go files (3,507 LOC)
    • 1 *.pm files (775 LOC)
    • 1 *.sql files (411 LOC)
    • 6 *.py files (407 LOC)
    • 4 *.js files (362 LOC)
    • 7 *.proto files (345 LOC)
    • 10 *.yaml files (289 LOC)
    • 7 *.java files (229 LOC)
    • 1 *.toml files (96 LOC)
    • 3 *.rego files (88 LOC)
    • 1 *.rockspec files (86 LOC)
    • 1 *.h files (32 LOC)
    • 2 *.xml files (24 LOC)
    • 1 *.ld files (11 LOC)
  • " *.lua" is biggest, containing 70.99% of LOC.
  • " *.ld" is smallest, containing 0.02% of LOC.


*.lua44501 LOC (70%) 303 files
*.t11519 LOC (18%) 500 files
*.go3507 LOC (5%) 26 files
*.pm775 LOC (1%) 1 file
*.sql411 LOC (<1%) 1 file
*.py407 LOC (<1%) 6 files
*.js362 LOC (<1%) 4 files
*.proto345 LOC (<1%) 7 files
*.yaml289 LOC (<1%) 10 files
*.java229 LOC (<1%) 7 files
*.toml96 LOC (<1%) 1 file
*.rego88 LOC (<1%) 3 files
*.rockspec86 LOC (<1%) 1 file
*.h32 LOC (<1%) 1 file
*.xml24 LOC (<1%) 2 files
*.ld11 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
lua
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
  • 50 files match defined criteria (4,203 LOC, 6.7% vs. main code):
    • 41 *.sh files (3,690 LOC)
    • 3 *.lua files (243 LOC)
    • 3 *.py files (201 LOC)
    • 2 *.ts files (58 LOC)
    • 1 *.go files (11 LOC)
  • " *.sh" is biggest, containing 87.79% of LOC.
  • " *.go" is smallest, containing 0.26% of LOC.


*.sh3690 LOC (87%) 41 files
*.lua243 LOC (5%) 3 files
*.py201 LOC (4%) 3 files
*.ts58 LOC (1%) 2 files
*.go11 LOC (<1%) 1 file
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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (52 LOC, 0.1% vs. main code). All matches are in *.json files.


*.json52 LOC (100%) 1 file
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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/pnpm.*[.]ya?ml".
    • files with paths like ".*/pom[.]xml".
    • 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 ".*[.]dockerfile".
  • 41 files match defined criteria (4,076 LOC, 6.5% vs. main code):
    • 1 *.yaml files (2,562 LOC)
    • 33 *.sh files (1,116 LOC)
    • 6 *.xml files (372 LOC)
    • 1 *.dockerfile files (26 LOC)
  • " *.yaml" is biggest, containing 62.86% of LOC.
  • " *.dockerfile" is smallest, containing 0.64% of LOC.


*.yaml2562 LOC (62%) 1 file
*.sh1116 LOC (27%) 33 files
*.xml372 LOC (9%) 6 files
*.dockerfile26 LOC (<1%) 1 file
Other Code
mod
properties
pb
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]pb".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 35 files match defined criteria (3,293 LOC, 5.3% vs. main code):
    • 9 *.md files (2,346 LOC)
    • 10 *.json files (685 LOC)
    • 8 *.mod files (131 LOC)
    • 4 *.properties files (80 LOC)
    • 2 *.pb files (43 LOC)
    • 2 *.txt files (8 LOC)
  • " *.md" is biggest, containing 71.24% of LOC.
  • " *.txt" is smallest, containing 0.24% of LOC.


*.md2346 LOC (71%) 9 files
*.json685 LOC (20%) 10 files
*.mod131 LOC (3%) 8 files
*.properties80 LOC (2%) 4 files
*.pb43 LOC (1%) 2 files
*.txt8 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 19:51