alibaba / higress
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
mk
patch
tpl
proto
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.

main103432 LOC (53%) 672 files
test40889 LOC (21%) 249 files
generated211 LOC (<1%) 3 files
build and deployment1660 LOC (<1%) 31 files
other45851 LOC (23%) 357 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 672 files match defined criteria (103,432 LOC, 100.0% vs. main code):
    • 465 *.go files (68,158 LOC)
    • 122 *.yaml files (21,992 LOC)
    • 19 *.rs files (4,594 LOC)
    • 16 *.cc files (4,229 LOC)
    • 21 *.h files (1,767 LOC)
    • 9 *.ts files (978 LOC)
    • 1 *.c files (599 LOC)
    • 3 *.tpl files (454 LOC)
    • 3 *.proto files (308 LOC)
    • 3 *.py files (124 LOC)
    • 8 *.toml files (119 LOC)
    • 2 *.bzl files (110 LOC)
  • " *.go" is biggest, containing 65.9% of LOC.
  • " *.bzl" is smallest, containing 0.11% of LOC.


*.go68158 LOC (65%) 465 files
*.yaml21992 LOC (21%) 122 files
*.rs4594 LOC (4%) 19 files
*.cc4229 LOC (4%) 16 files
*.h1767 LOC (1%) 21 files
*.ts978 LOC (<1%) 9 files
*.c599 LOC (<1%) 1 file
*.tpl454 LOC (<1%) 3 files
*.proto308 LOC (<1%) 3 files
*.py124 LOC (<1%) 3 files
*.toml119 LOC (<1%) 8 files
*.bzl110 LOC (<1%) 2 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 ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 249 files match defined criteria (40,889 LOC, 39.5% vs. main code):
    • 166 *.go files (31,538 LOC)
    • 70 *.yaml files (5,117 LOC)
    • 12 *.cc files (4,190 LOC)
    • 1 *.py files (44 LOC)
  • " *.go" is biggest, containing 77.13% of LOC.
  • " *.py" is smallest, containing 0.11% of LOC.


*.go31538 LOC (77%) 166 files
*.yaml5117 LOC (12%) 70 files
*.cc4190 LOC (10%) 12 files
*.py44 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".
  • 3 files match defined criteria (211 LOC, 0.2% vs. main code). All matches are in *.json files.


*.json211 LOC (100%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/docker[-]compose[.]yaml".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 31 files match defined criteria (1,660 LOC, 1.6% vs. main code):
    • 20 *.sh files (1,027 LOC)
    • 5 *.mk files (479 LOC)
    • 6 *.yaml files (154 LOC)
  • " *.sh" is biggest, containing 61.87% of LOC.
  • " *.yaml" is smallest, containing 9.28% of LOC.


*.sh1027 LOC (61%) 20 files
*.mk479 LOC (28%) 5 files
*.yaml154 LOC (9%) 6 files
Other Code
mod
patch
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 ".*[.]patch".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]dockerignore".
  • 357 files match defined criteria (45,851 LOC, 44.3% vs. main code):
    • 50 *.json files (21,631 LOC)
    • 226 *.md files (21,610 LOC)
    • 61 *.mod files (1,999 LOC)
    • 10 *.yaml files (385 LOC)
    • 4 *.patch files (162 LOC)
    • 1 *.go files (41 LOC)
    • 5 *.txt files (23 LOC)
  • " *.json" is biggest, containing 47.18% of LOC.
  • " *.txt" is smallest, containing 0.05% of LOC.


*.json21631 LOC (47%) 50 files
*.md21610 LOC (47%) 226 files
*.mod1999 LOC (4%) 61 files
*.yaml385 LOC (<1%) 10 files
*.patch162 LOC (<1%) 4 files
*.go41 LOC (<1%) 1 file
*.txt23 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-14 18:56