opensearch-project / notifications
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
snap
policy
prefs
editorconfig
babelrc
txt
properties
prettierignore
  • 21 extensions are included in analyses: kt, tsx, snap, ts, yml, js, md, json, gradle, xml, gitignore, java, policy, prefs, py, bat, editorconfig, babelrc, txt, properties, prettierignore
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (25 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main14702 LOC (37%) 188 files
test22786 LOC (58%) 152 files
generated0 LOC (0%) 0 files
build and deployment731 LOC (1%) 8 files
other698 LOC (1%) 13 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
policy
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 188 files match defined criteria (14,702 lines of code, 100.0% vs. main code):
    • 57 *.tsx files (7,085 lines of code)
    • 88 *.kt files (5,619 lines of code)
    • 33 *.ts files (1,644 lines of code)
    • 7 *.yml files (253 lines of code)
    • 2 *.policy files (70 lines of code)
    • 1 *.py files (31 lines of code)
  • " *.tsx" is biggest, containing 48.19% of code.
  • " *.py" is smallest, containing 0.21% of code.


*.tsx7085 LOC (48%) 57 files
*.kt5619 LOC (38%) 88 files
*.ts1644 LOC (11%) 33 files
*.yml253 LOC (1%) 7 files
*.policy70 LOC (<1%) 2 files
*.py31 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]snap".
    • files with any line of content like ".*/simpletest/.*".
  • 152 files match defined criteria (22,786 lines of code, 155.0% vs. main code):
    • 49 *.snap files (12,641 lines of code)
    • 34 *.kt files (6,265 lines of code)
    • 51 *.tsx files (2,936 lines of code)
    • 15 *.ts files (847 lines of code)
    • 2 *.java files (75 lines of code)
    • 1 *.js files (22 lines of code)
  • " *.snap" is biggest, containing 55.48% of code.
  • " *.js" is smallest, containing 0.1% of code.


*.snap12641 LOC (55%) 49 files
*.kt6265 LOC (27%) 34 files
*.tsx2936 LOC (12%) 51 files
*.ts847 LOC (3%) 15 files
*.java75 LOC (<1%) 2 files
*.js22 LOC (<1%) 1 files
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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
  • 8 files match defined criteria (731 lines of code, 5.0% vs. main code):
    • 7 *.gradle files (643 lines of code)
    • 1 *.bat files (88 lines of code)
  • " *.gradle" is biggest, containing 87.96% of code.
  • " *.bat" is smallest, containing 12.04% of code.


*.gradle643 LOC (87%) 7 files
*.bat88 LOC (12%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/config/checkstyle/.*".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 13 files match defined criteria (698 lines of code, 4.7% vs. main code):
    • 3 *.xml files (318 lines of code)
    • 5 *.md files (216 lines of code)
    • 5 *.json files (164 lines of code)
  • " *.xml" is biggest, containing 45.56% of code.
  • " *.json" is smallest, containing 23.5% of code.


*.xml318 LOC (45%) 3 files
*.md216 LOC (30%) 5 files
*.json164 LOC (23%) 5 files
Analyzers
Info about analyzers used for source code examinations.
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
    • No dependency analysis
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
    • No dependency analysis
  • *.yml 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
  • *.policy 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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic dependency analysis


2022-02-01 04:59