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

main5199 LOC (3%) 155 files
test2777 LOC (1%) 48 files
generated0 LOC (0%) 0 files
build and deployment572 LOC (<1%) 7 files
other156692 LOC (94%) 62 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 ".*".
  • 155 files match defined criteria (5,199 lines of code, 100.0% vs. main code):
    • 73 *.kt files (2,804 lines of code)
    • 77 *.swift files (2,084 lines of code)
    • 5 *.kts files (311 lines of code)
  • " *.kt" is biggest, containing 53.93% of code.
  • " *.kts" is smallest, containing 5.98% of code.


*.kt2804 LOC (53%) 73 files
*.swift2084 LOC (40%) 77 files
*.kts311 LOC (5%) 5 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]ests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 48 files match defined criteria (2,777 lines of code, 53.4% vs. main code):
    • 18 *.kt files (1,588 lines of code)
    • 28 *.swift files (1,001 lines of code)
    • 2 *.kts files (188 lines of code)
  • " *.kt" is biggest, containing 57.18% of code.
  • " *.kts" is smallest, containing 6.77% of code.


*.kt1588 LOC (57%) 18 files
*.swift1001 LOC (36%) 28 files
*.kts188 LOC (6%) 2 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
  • 7 files match defined criteria (572 lines of code, 11.0% vs. main code):
    • 6 *.sh files (496 lines of code)
    • 1 *.bat files (76 lines of code)
  • " *.sh" is biggest, containing 86.71% of code.
  • " *.bat" is smallest, containing 13.29% of code.


*.sh496 LOC (86%) 6 files
*.bat76 LOC (13%) 1 files
Other Code
properties
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
  • 62 files match defined criteria (156,692 lines of code, 3013.9% vs. main code):
    • 56 *.json files (156,524 lines of code)
    • 3 *.md files (141 lines of code)
    • 2 *.properties files (17 lines of code)
    • 1 *.plist files (10 lines of code)
  • " *.json" is biggest, containing 99.89% of code.
  • " *.plist" is smallest, containing 0.01% of code.


*.json156524 LOC (99%) 56 files
*.md141 LOC (<1%) 3 files
*.properties17 LOC (<1%) 2 files
*.plist10 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)
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.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:27