aws-amplify / aws-appsync-realtime-client-ios
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
plist
storyboard
txt
podspec
  • 14 extensions are included in analyses: swift, plist, json, h, m, md, sh, markdown, storyboard, yml, gitignore, txt, podspec, graphql
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 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.

main2602 LOC (24%) 62 files
test104 LOC (<1%) 2 files
generated4694 LOC (43%) 39 files
build and deployment107 LOC (<1%) 3 files
other3313 LOC (30%) 38 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 ".*".
  • 62 files match defined criteria (2,602 lines of code, 100.0% vs. main code):
    • 61 *.swift files (2,597 lines of code)
    • 1 *.graphql files (5 lines of code)
  • " *.swift" is biggest, containing 99.81% of code.
  • " *.graphql" is smallest, containing 0.19% of code.


*.swift2597 LOC (99%) 61 files
*.graphql5 LOC (<1%) 1 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 ".*/Mocks/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 2 files match defined criteria (104 lines of code, 4.0% vs. main code). All matches are in *.swift files.


*.swift104 LOC (100%) 2 files
Generated Code
Automatically generated files, not manually changed after generation.
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/Pods/.*".
  • 39 files match defined criteria (4,694 lines of code, 180.4% vs. main code):
    • 4 *.swift files (1,412 lines of code)
    • 11 *.plist files (1,153 lines of code)
    • 3 *.md files (820 lines of code)
    • 5 *.markdown files (763 lines of code)
    • 3 *.sh files (411 lines of code)
    • 6 *.h files (78 lines of code)
    • 6 *.m files (30 lines of code)
    • 1 *.json files (27 lines of code)
  • " *.swift" is biggest, containing 30.08% of code.
  • " *.json" is smallest, containing 0.58% of code.


*.swift1412 LOC (30%) 4 files
*.plist1153 LOC (24%) 11 files
*.md820 LOC (17%) 3 files
*.markdown763 LOC (16%) 5 files
*.sh411 LOC (8%) 3 files
*.h78 LOC (1%) 6 files
*.m30 LOC (<1%) 6 files
*.json27 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
podspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]podspec".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (107 lines of code, 4.1% vs. main code):
    • 2 *.sh files (92 lines of code)
    • 1 *.podspec files (15 lines of code)
  • " *.sh" is biggest, containing 85.98% of code.
  • " *.podspec" is smallest, containing 14.02% of code.


*.sh92 LOC (85%) 2 files
*.podspec15 LOC (14%) 1 files
Other Code
plist
storyboard
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 ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
  • 38 files match defined criteria (3,313 lines of code, 127.3% vs. main code):
    • 18 *.plist files (1,355 lines of code)
    • 6 *.md files (900 lines of code)
    • 5 *.markdown files (763 lines of code)
    • 7 *.json files (247 lines of code)
    • 2 *.storyboard files (48 lines of code)
  • " *.plist" is biggest, containing 40.9% of code.
  • " *.storyboard" is smallest, containing 1.45% of code.


*.plist1355 LOC (40%) 18 files
*.md900 LOC (27%) 6 files
*.markdown763 LOC (23%) 5 files
*.json247 LOC (7%) 7 files
*.storyboard48 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.graphql 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


2022-02-01 01:50