elastic / elasticsearch-specification
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
gitattributes
prettierignore
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.

main41347 LOC (32%) 1,464 files
test512 LOC (<1%) 37 files
generated24867 LOC (19%) 4 files
build and deployment0 LOC (0%) 0 files
other60902 LOC (47%) 1,241 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 ".*".
  • 1464 files match defined criteria (41,347 LOC, 100.0% vs. main code):
    • 1,435 *.ts files (37,360 LOC)
    • 17 *.rs files (3,259 LOC)
    • 3 *.js files (377 LOC)
    • 1 *.py files (138 LOC)
    • 6 *.toml files (129 LOC)
    • 2 *.yaml files (84 LOC)
  • " *.ts" is biggest, containing 90.36% of LOC.
  • " *.yaml" is smallest, containing 0.2% of LOC.


*.ts37360 LOC (90%) 1,435 files
*.rs3259 LOC (7%) 17 files
*.js377 LOC (<1%) 3 files
*.py138 LOC (<1%) 1 file
*.toml129 LOC (<1%) 6 files
*.yaml84 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 ".*/[Tt]est/.*".
    • 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 ".*/[Tt]ests/.*".
  • 37 files match defined criteria (512 LOC, 1.2% vs. main code). All matches are in *.ts files.


*.ts512 LOC (100%) 37 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".
  • 4 files match defined criteria (24,867 LOC, 60.1% vs. main code). All matches are in *.json files.


*.json24867 LOC (100%) 4 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 1241 files match defined criteria (60,902 LOC, 147.3% vs. main code):
    • 600 *.json files (49,970 LOC)
    • 633 *.yaml files (10,194 LOC)
    • 8 *.md files (738 LOC)
  • " *.json" is biggest, containing 82.05% of LOC.
  • " *.md" is smallest, containing 1.21% of LOC.


*.json49970 LOC (82%) 600 files
*.yaml10194 LOC (16%) 633 files
*.md738 LOC (1%) 8 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:41