apache / pulsar-test-infra
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
snap
gitattributes
eslintignore
prettierignore
editorconfig
mod
csproj
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.

main5045 LOC (9%) 70 files
test25268 LOC (47%) 59 files
generated8343 LOC (15%) 4 files
build and deployment289 LOC (<1%) 6 files
other13908 LOC (26%) 48 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 ".*".
  • 70 files match defined criteria (5,045 LOC, 100.0% vs. main code):
    • 40 *.ts files (3,309 LOC)
    • 5 *.go files (709 LOC)
    • 13 *.js files (642 LOC)
    • 7 *.yml files (304 LOC)
    • 2 *.cs files (69 LOC)
    • 2 *.yaml files (9 LOC)
    • 1 *.dart files (3 LOC)
  • " *.ts" is biggest, containing 65.59% of LOC.
  • " *.dart" is smallest, containing 0.06% of LOC.


*.ts3309 LOC (65%) 40 files
*.go709 LOC (14%) 5 files
*.js642 LOC (12%) 13 files
*.yml304 LOC (6%) 7 files
*.cs69 LOC (1%) 2 files
*.yaml9 LOC (<1%) 2 files
*.dart3 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
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 ".*__tests__.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.]snap".
  • 59 files match defined criteria (25,268 LOC, 500.9% vs. main code):
    • 4 *.snap files (22,774 LOC)
    • 12 *.ts files (1,225 LOC)
    • 20 *.xml files (456 LOC)
    • 2 *.go files (341 LOC)
    • 7 *.java files (211 LOC)
    • 7 *.js files (168 LOC)
    • 2 *.dart files (33 LOC)
    • 1 *.kt files (28 LOC)
    • 2 *.sh files (22 LOC)
    • 2 *.py files (10 LOC)
  • " *.snap" is biggest, containing 90.13% of LOC.
  • " *.py" is smallest, containing 0.04% of LOC.


*.snap22774 LOC (90%) 4 files
*.ts1225 LOC (4%) 12 files
*.xml456 LOC (1%) 20 files
*.go341 LOC (1%) 2 files
*.java211 LOC (<1%) 7 files
*.js168 LOC (<1%) 7 files
*.dart33 LOC (<1%) 2 files
*.kt28 LOC (<1%) 1 file
*.sh22 LOC (<1%) 2 files
*.py10 LOC (<1%) 2 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 ".*/package[-]lock[.]json".
    • files with any line of content like "\<\!\-\-[ ]*Generated by .*".
  • 4 files match defined criteria (8,343 LOC, 165.4% vs. main code). All matches are in *.json files.


*.json8343 LOC (100%) 4 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]csproj".
  • 6 files match defined criteria (289 LOC, 5.7% vs. main code):
    • 4 *.sh files (269 LOC)
    • 2 *.csproj files (20 LOC)
  • " *.sh" is biggest, containing 93.08% of LOC.
  • " *.csproj" is smallest, containing 6.92% of LOC.


*.sh269 LOC (93%) 4 files
*.csproj20 LOC (6%) 2 files
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
  • 48 files match defined criteria (13,908 LOC, 275.7% vs. main code):
    • 21 *.json files (9,016 LOC)
    • 25 *.md files (4,871 LOC)
    • 2 *.mod files (21 LOC)
  • " *.json" is biggest, containing 64.83% of LOC.
  • " *.mod" is smallest, containing 0.15% of LOC.


*.json9016 LOC (64%) 21 files
*.md4871 LOC (35%) 25 files
*.mod21 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 23:35