awslabs / smithy-kotlin
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
properties
txt
editorconfig
  • 14 extensions are included in analyses: kt, kts, md, json, gradle, yml, svg, properties, css, gitignore, txt, bat, sh, editorconfig
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (12 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 ".*[.]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.

main14290 LOC (14%) 245 files
test19399 LOC (19%) 145 files
generated0 LOC (0%) 0 files
build and deployment278 LOC (<1%) 6 files
other66409 LOC (66%) 14 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 245 files match defined criteria (14,290 lines of code, 100.0% vs. main code):
    • 226 *.kt files (13,623 lines of code)
    • 19 *.kts files (667 lines of code)
  • " *.kt" is biggest, containing 95.33% of code.
  • " *.kts" is smallest, containing 4.67% of code.


*.kt13623 LOC (95%) 226 files
*.kts667 LOC (4%) 19 files
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 ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[-]tests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 145 files match defined criteria (19,399 lines of code, 135.8% vs. main code):
    • 141 *.kt files (19,211 lines of code)
    • 4 *.kts files (188 lines of code)
  • " *.kt" is biggest, containing 99.03% of code.
  • " *.kts" is smallest, containing 0.97% of code.


*.kt19211 LOC (99%) 141 files
*.kts188 LOC (<1%) 4 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 ".*[.]sh".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (278 lines of code, 1.9% vs. main code):
    • 5 *.gradle files (210 lines of code)
    • 1 *.bat files (68 lines of code)
  • " *.gradle" is biggest, containing 75.54% of code.
  • " *.bat" is smallest, containing 24.46% of code.


*.gradle210 LOC (75%) 5 files
*.bat68 LOC (24%) 1 files
Other Code
properties
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 ".*[.]properties".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
  • 14 files match defined criteria (66,409 lines of code, 464.7% vs. main code):
    • 5 *.json files (66,038 lines of code)
    • 8 *.md files (338 lines of code)
    • 1 *.properties files (33 lines of code)
  • " *.json" is biggest, containing 99.44% of code.
  • " *.properties" is smallest, containing 0.05% of code.


*.json66038 LOC (99%) 5 files
*.md338 LOC (<1%) 8 files
*.properties33 LOC (<1%) 1 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)
  • *.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)


2022-01-31 19:30