elastic / elasticsearch-labs
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
razor
in
mod
jsonl
npmrc
csproj
hbs
properties
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.

main62298 LOC (75%) 297 files
test106 LOC (<1%) 8 files
generated6644 LOC (8%) 1 file
build and deployment27 LOC (<1%) 3 files
other13644 LOC (16%) 153 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
jsonl
razor
hbs
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 297 files match defined criteria (62,298 LOC, 100.0% vs. main code):
    • 90 *.ipynb files (49,988 LOC)
    • 66 *.py files (5,486 LOC)
    • 39 *.tsx files (1,938 LOC)
    • 37 *.js files (1,706 LOC)
    • 1 *.jsonl files (1,000 LOC)
    • 11 *.css files (565 LOC)
    • 16 *.html files (448 LOC)
    • 9 *.razor files (294 LOC)
    • 4 *.cs files (289 LOC)
    • 13 *.ts files (270 LOC)
    • 2 *.go files (97 LOC)
    • 1 *.hbs files (95 LOC)
    • 1 *.toml files (58 LOC)
    • 6 *.in files (43 LOC)
    • 1 *.yaml files (21 LOC)
  • " *.ipynb" is biggest, containing 80.24% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.ipynb49988 LOC (80%) 90 files
*.py5486 LOC (8%) 66 files
*.tsx1938 LOC (3%) 39 files
*.js1706 LOC (2%) 37 files
*.jsonl1000 LOC (1%) 1 file
*.css565 LOC (<1%) 11 files
*.html448 LOC (<1%) 16 files
*.razor294 LOC (<1%) 9 files
*.cs289 LOC (<1%) 4 files
*.ts270 LOC (<1%) 13 files
*.go97 LOC (<1%) 2 files
*.hbs95 LOC (<1%) 1 file
*.toml58 LOC (<1%) 1 file
*.in43 LOC (<1%) 6 files
*.yaml21 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 ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 8 files match defined criteria (106 LOC, 0.2% vs. main code):
    • 6 *.py files (94 LOC)
    • 1 *.tsx files (7 LOC)
    • 1 *.js files (5 LOC)
  • " *.py" is biggest, containing 88.68% of LOC.
  • " *.js" is smallest, containing 4.72% of LOC.


*.py94 LOC (88%) 6 files
*.tsx7 LOC (6%) 1 file
*.js5 LOC (4%) 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 (6,644 LOC, 10.7% vs. main code). All matches are in *.json files.


*.json6644 LOC (100%) 1 file
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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (27 LOC, 0.0% vs. main code):
    • 2 *.sh files (17 LOC)
    • 1 *.csproj files (10 LOC)
  • " *.sh" is biggest, containing 62.96% of LOC.
  • " *.csproj" is smallest, containing 37.04% of LOC.


*.sh17 LOC (62%) 2 files
*.csproj10 LOC (37%) 1 file
Other Code
txt
mod
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]properties".
  • 153 files match defined criteria (13,644 LOC, 21.9% vs. main code):
    • 51 *.json files (9,395 LOC)
    • 52 *.md files (2,108 LOC)
    • 37 *.txt files (2,073 LOC)
    • 11 *.svg files (47 LOC)
    • 1 *.mod files (12 LOC)
    • 1 *.properties files (9 LOC)
  • " *.json" is biggest, containing 68.86% of LOC.
  • " *.properties" is smallest, containing 0.07% of LOC.


*.json9395 LOC (68%) 51 files
*.md2108 LOC (15%) 52 files
*.txt2073 LOC (15%) 37 files
*.svg47 LOC (<1%) 11 files
*.mod12 LOC (<1%) 1 file
*.properties9 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:03