elastic / elastic-stack-installers
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
csproj
gitattributes
resx
txt
editorconfig
shproj
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.

main3606 LOC (85%) 54 files
test333 LOC (7%) 2 files
generated38 LOC (<1%) 1 file
build and deployment109 LOC (2%) 3 files
other119 LOC (2%) 5 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
shproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 54 files match defined criteria (3,606 LOC, 100.0% vs. main code):
    • 48 *.cs files (2,290 LOC)
    • 3 *.ps1 files (1,091 LOC)
    • 2 *.yaml files (213 LOC)
    • 1 *.shproj files (12 LOC)
  • " *.cs" is biggest, containing 63.51% of LOC.
  • " *.shproj" is smallest, containing 0.33% of LOC.


*.cs2290 LOC (63%) 48 files
*.ps11091 LOC (30%) 3 files
*.yaml213 LOC (5%) 2 files
*.shproj12 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]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 2 files match defined criteria (333 LOC, 9.2% vs. main code):
    • 1 *.ps1 files (263 LOC)
    • 1 *.cs files (70 LOC)
  • " *.ps1" is biggest, containing 78.98% of LOC.
  • " *.cs" is smallest, containing 21.02% of LOC.


*.ps1263 LOC (78%) 1 file
*.cs70 LOC (21%) 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 1 file matches defined criteria (38 LOC, 1.1% vs. main code). All matches are in *.cs files.


*.cs38 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (109 LOC, 3.0% vs. main code). All matches are in *.csproj files.


*.csproj109 LOC (100%) 3 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 5 files match defined criteria (119 LOC, 3.3% vs. main code):
    • 3 *.json files (73 LOC)
    • 2 *.md files (46 LOC)
  • " *.json" is biggest, containing 61.34% of LOC.
  • " *.md" is smallest, containing 38.66% of LOC.


*.json73 LOC (61%) 3 files
*.md46 LOC (38%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis (based on namespace heuristics)
  • *.ps1 files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.shproj files are analyzed with XmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2025-05-13 19:48