elastic / docs
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
pcss
txt
patch
mk
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.

main30843 LOC (86%) 301 files
test1879 LOC (5%) 21 files
generated0 LOC (0%) 0 files
build and deployment163 LOC (<1%) 5 files
other2580 LOC (7%) 80 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pcss
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 301 files match defined criteria (30,843 LOC, 100.0% vs. main code):
    • 103 *.rb files (13,950 LOC)
    • 103 *.asciidoc files (3,857 LOC)
    • 25 *.js files (2,877 LOC)
    • 3 *.yaml files (2,586 LOC)
    • 32 *.pcss files (2,260 LOC)
    • 11 *.pm files (2,073 LOC)
    • 9 *.html files (1,416 LOC)
    • 1 *.pl files (920 LOC)
    • 4 *.jsx files (626 LOC)
    • 3 *.css files (230 LOC)
    • 3 *.dockerignore files (16 LOC)
    • 2 *.java files (14 LOC)
    • 1 *.cs files (11 LOC)
    • 1 *.py files (7 LOC)
  • " *.rb" is biggest, containing 45.23% of LOC.
  • " *.py" is smallest, containing 0.02% of LOC.


*.rb13950 LOC (45%) 103 files
*.asciidoc3857 LOC (12%) 103 files
*.js2877 LOC (9%) 25 files
*.yaml2586 LOC (8%) 3 files
*.pcss2260 LOC (7%) 32 files
*.pm2073 LOC (6%) 11 files
*.html1416 LOC (4%) 9 files
*.pl920 LOC (2%) 1 file
*.jsx626 LOC (2%) 4 files
*.css230 LOC (<1%) 3 files
*.dockerignore16 LOC (<1%) 3 files
*.java14 LOC (<1%) 2 files
*.cs11 LOC (<1%) 1 file
*.py7 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 ".*/test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__test__.*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/[Tt]est/.*".
  • 21 files match defined criteria (1,879 LOC, 6.1% vs. main code):
    • 16 *.js files (1,694 LOC)
    • 1 *.jsx files (124 LOC)
    • 2 *.sh files (31 LOC)
    • 2 *.rb files (30 LOC)
  • " *.js" is biggest, containing 90.15% of LOC.
  • " *.rb" is smallest, containing 1.6% of LOC.


*.js1694 LOC (90%) 16 files
*.jsx124 LOC (6%) 1 file
*.sh31 LOC (1%) 2 files
*.rb30 LOC (1%) 2 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 ".*/package[.]json".
  • 5 files match defined criteria (163 LOC, 0.5% vs. main code):
    • 4 *.sh files (160 LOC)
    • 1 *.mk files (3 LOC)
  • " *.sh" is biggest, containing 98.16% of LOC.
  • " *.mk" is smallest, containing 1.84% of LOC.


*.sh160 LOC (98%) 4 files
*.mk3 LOC (1%) 1 file
Other Code
txt
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 ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]adoc".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 80 files match defined criteria (2,580 LOC, 8.4% vs. main code):
    • 1 *.asciidoc files (1,497 LOC)
    • 39 *.svg files (522 LOC)
    • 4 *.txt files (336 LOC)
    • 33 *.adoc files (145 LOC)
    • 3 *.json files (80 LOC)
  • " *.asciidoc" is biggest, containing 58.02% of LOC.
  • " *.json" is smallest, containing 3.1% of LOC.


*.asciidoc1497 LOC (58%) 1 file
*.svg522 LOC (20%) 39 files
*.txt336 LOC (13%) 4 files
*.adoc145 LOC (5%) 33 files
*.json80 LOC (3%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:39