elastic / kibana
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
mdx
jsonc
snap
txt
hbs
njk
mjs
ejs
handlebars
pt
http
sig
gyp
npmignore
patch
npmrc
asc
editorconfig
eslintignore
gitattributes
stylelintignore
cfg
gn
properties
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.

main3301814 LOC (41%) 49,133 files
test2994868 LOC (37%) 23,189 files
generated39165 LOC (<1%) 604 files
build and deployment4822 LOC (<1%) 196 files
other1545593 LOC (19%) 8,315 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
jsonc
njk
mjs
hbs
handlebars
ejs
http
gn
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 49133 files match defined criteria (3,301,814 LOC, 100.0% vs. main code):
    • 31,893 *.ts files (1,811,346 LOC)
    • 13,687 *.tsx files (1,311,955 LOC)
    • 1,775 *.js files (107,462 LOC)
    • 330 *.yaml files (32,979 LOC)
    • 923 *.jsonc files (12,833 LOC)
    • 6 *.css files (9,030 LOC)
    • 340 *.scss files (7,214 LOC)
    • 45 *.njk files (2,642 LOC)
    • 35 *.mjs files (2,144 LOC)
    • 20 *.g4 files (1,266 LOC)
    • 16 *.hbs files (762 LOC)
    • 8 *.handlebars files (525 LOC)
    • 19 *.ejs files (415 LOC)
    • 4 *.http files (317 LOC)
    • 8 *.html files (306 LOC)
    • 14 *.asciidoc files (205 LOC)
    • 2 *.pl files (191 LOC)
    • 3 *.py files (130 LOC)
    • 3 *.bzl files (47 LOC)
    • 1 *.cjs files (27 LOC)
    • 1 *.gn files (18 LOC)
  • " *.ts" is biggest, containing 54.86% of LOC.
  • " *.gn" is smallest, containing 0% of LOC.


*.ts1811346 LOC (54%) 31,893 files
*.tsx1311955 LOC (39%) 13,687 files
*.js107462 LOC (3%) 1,775 files
*.yaml32979 LOC (<1%) 330 files
*.jsonc12833 LOC (<1%) 923 files
*.css9030 LOC (<1%) 6 files
*.scss7214 LOC (<1%) 340 files
*.njk2642 LOC (<1%) 45 files
*.mjs2144 LOC (<1%) 35 files
*.g41266 LOC (<1%) 20 files
*.hbs762 LOC (<1%) 16 files
*.handlebars525 LOC (<1%) 8 files
*.ejs415 LOC (<1%) 19 files
*.http317 LOC (<1%) 4 files
*.html306 LOC (<1%) 8 files
*.asciidoc205 LOC (<1%) 14 files
*.pl191 LOC (<1%) 2 files
*.py130 LOC (<1%) 3 files
*.bzl47 LOC (<1%) 3 files
*.cjs27 LOC (<1%) 1 file
*.gn18 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
jsonc
hbs
asc
sig
pt
ejs
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/__mock[a-zA-Z0-9_\- ]+/.*".
    • 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 ".*/tests_.*".
    • files with paths like ".*__test__.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
    • files with paths like ".*/test[-]helpers/.*".
  • 23189 files match defined criteria (2,994,868 LOC, 90.7% vs. main code):
    • 15,785 *.ts files (2,173,725 LOC)
    • 4,411 *.tsx files (524,101 LOC)
    • 862 *.snap files (209,314 LOC)
    • 1,939 *.js files (84,893 LOC)
    • 116 *.jsonc files (1,536 LOC)
    • 13 *.yaml files (422 LOC)
    • 11 *.xml files (358 LOC)
    • 28 *.hbs files (175 LOC)
    • 1 *.html files (77 LOC)
    • 2 *.asc files (68 LOC)
    • 5 *.sh files (64 LOC)
    • 4 *.sig files (60 LOC)
    • 6 *.pt files (42 LOC)
    • 4 *.scss files (26 LOC)
    • 1 *.ejs files (5 LOC)
    • 1 *.cfg files (2 LOC)
  • " *.ts" is biggest, containing 72.58% of LOC.
  • " *.cfg" is smallest, containing 0% of LOC.


*.ts2173725 LOC (72%) 15,785 files
*.tsx524101 LOC (17%) 4,411 files
*.snap209314 LOC (6%) 862 files
*.js84893 LOC (2%) 1,939 files
*.jsonc1536 LOC (<1%) 116 files
*.yaml422 LOC (<1%) 13 files
*.xml358 LOC (<1%) 11 files
*.hbs175 LOC (<1%) 28 files
*.html77 LOC (<1%) 1 file
*.asc68 LOC (<1%) 2 files
*.sh64 LOC (<1%) 5 files
*.sig60 LOC (<1%) 4 files
*.pt42 LOC (<1%) 6 files
*.scss26 LOC (<1%) 4 files
*.ejs5 LOC (<1%) 1 file
*.cfg2 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".
    • files with paths like ".*/generated/.*".
    • files with paths like ".*_generated[.][a-z]+".
  • 604 files match defined criteria (39,165 LOC, 1.2% vs. main code):
    • 577 *.json files (22,480 LOC)
    • 22 *.ts files (12,034 LOC)
    • 4 *.tsx files (4,632 LOC)
    • 1 *.md files (19 LOC)
  • " *.json" is biggest, containing 57.4% of LOC.
  • " *.md" is smallest, containing 0.05% of LOC.


*.json22480 LOC (57%) 577 files
*.ts12034 LOC (30%) 22 files
*.tsx4632 LOC (11%) 4 files
*.md19 LOC (<1%) 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 ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]bat".
  • 196 files match defined criteria (4,822 LOC, 0.1% vs. main code):
    • 188 *.sh files (3,779 LOC)
    • 4 *.js files (562 LOC)
    • 3 *.ts files (454 LOC)
    • 1 *.dockerfile files (27 LOC)
  • " *.sh" is biggest, containing 78.37% of LOC.
  • " *.dockerfile" is smallest, containing 0.56% of LOC.


*.sh3779 LOC (78%) 188 files
*.js562 LOC (11%) 4 files
*.ts454 LOC (9%) 3 files
*.dockerfile27 LOC (<1%) 1 file
Other Code
mdx
txt
jsonc
snap
patch
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]mdx".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]stylelintignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]prettierignore".
  • 8315 files match defined criteria (1,545,593 LOC, 46.8% vs. main code):
    • 4,736 *.json files (1,390,369 LOC)
    • 1,288 *.md files (67,951 LOC)
    • 1,086 *.mdx files (39,707 LOC)
    • 298 *.tsx files (22,325 LOC)
    • 368 *.ts files (10,670 LOC)
    • 202 *.txt files (6,424 LOC)
    • 202 *.svg files (5,158 LOC)
    • 63 *.yaml files (1,387 LOC)
    • 51 *.jsonc files (915 LOC)
    • 3 *.snap files (335 LOC)
    • 7 *.asciidoc files (115 LOC)
    • 5 *.js files (90 LOC)
    • 2 *.patch files (82 LOC)
    • 1 *.properties files (55 LOC)
    • 3 *.scss files (10 LOC)
  • " *.json" is biggest, containing 89.96% of LOC.
  • " *.scss" is smallest, containing 0% of LOC.


*.json1390369 LOC (89%) 4,736 files
*.md67951 LOC (4%) 1,288 files
*.mdx39707 LOC (2%) 1,086 files
*.tsx22325 LOC (1%) 298 files
*.ts10670 LOC (<1%) 368 files
*.txt6424 LOC (<1%) 202 files
*.svg5158 LOC (<1%) 202 files
*.yaml1387 LOC (<1%) 63 files
*.jsonc915 LOC (<1%) 51 files
*.snap335 LOC (<1%) 3 files
*.asciidoc115 LOC (<1%) 7 files
*.js90 LOC (<1%) 5 files
*.patch82 LOC (<1%) 2 files
*.properties55 LOC (<1%) 1 file
*.scss10 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:15