Ktor
Source Code Overview

Source Code Analysis Scope
Files includes and excluded from analyses
  • 12 extensions are included in analyses: kt, gradle, kts, txt, xml, md, json, html, properties, js, bat, yml
  • 1 criterion is used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (0 files).
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.

main70140 LOC (58%) 996 files
test39830 LOC (33%) 370 files
other7403 LOC (6%) 6 files
build and deployment1765 LOC (1%) 53 files
generated0 LOC (0%) 0 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 996 files match defined criteria (70,140 lines of code, 100.0% vs. main code):
    • 957 *.kt files (60,388 lines of code)
    • 3 *.json files (8,982 lines of code)
    • 28 *.kts files (655 lines of code)
    • 3 *.properties files (70 lines of code)
    • 1 *.js files (24 lines of code)
    • 2 *.xml files (18 lines of code)
    • 2 *.html files (3 lines of code)
  • " *.kt" is biggest, containing 86.1% of code.
  • " *.html" is smallest, containing 0% of code.


*.kt60388 LOC (86%) 957 files
*.json8982 LOC (12%) 3 files
*.kts655 LOC (<1%) 28 files
*.properties70 LOC (<1%) 3 files
*.js24 LOC (<1%) 1 files
*.xml18 LOC (<1%) 2 files
*.html3 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*/test/.*".
    • files with paths like ".*/tests/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[-]tests[-].*".
  • 370 files match defined criteria (39,830 lines of code, 56.8% vs. main code):
    • 364 *.kt files (39,601 lines of code)
    • 3 *.kts files (164 lines of code)
    • 3 *.gradle files (65 lines of code)
  • " *.kt" is biggest, containing 99.43% of code.
  • " *.gradle" is smallest, containing 0.16% of code.


*.kt39601 LOC (99%) 364 files
*.kts164 LOC (<1%) 3 files
*.gradle65 LOC (<1%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
  • The following criteria are used to filter files:
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
  • 53 files match defined criteria (1,765 lines of code, 2.5% vs. main code):
    • 52 *.gradle files (1,689 lines of code)
    • 1 *.bat files (76 lines of code)
  • " *.gradle" is biggest, containing 95.69% of code.
  • " *.bat" is smallest, containing 4.31% of code.


*.gradle1689 LOC (95%) 52 files
*.bat76 LOC (4%) 1 files
Other Code
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
  • 6 files match defined criteria (7,403 lines of code, 10.6% vs. main code):
    • 1 *.txt files (6,554 lines of code)
    • 5 *.md files (849 lines of code)
  • " *.txt" is biggest, containing 88.53% of code.
  • " *.md" is smallest, containing 11.47% of code.


*.txt6554 LOC (88%) 1 files
*.md849 LOC (11%) 5 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.json files are analyzed with JsonAnalyzer:
    • 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
  • *.kts 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)
  • *.properties 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.xml 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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


2020-09-12 21:41