aws-amplify / aws-sdk-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
podspec
txt
storyboard
  • 18 extensions are included in analyses: h, m, plist, swift, podspec, json, md, py, sh, txt, storyboard, rb, html, gitignore, erb, markdown, yml, c
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 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) (7 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.

main324021 LOC (71%) 806 files
test113591 LOC (25%) 165 files
generated0 LOC (0%) 0 files
build and deployment1180 LOC (<1%) 56 files
other14543 LOC (3%) 192 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 ".*".
  • 806 files match defined criteria (324,021 lines of code, 100.0% vs. main code):
    • 304 *.m files (293,886 lines of code)
    • 410 *.h files (13,078 lines of code)
    • 77 *.swift files (11,907 lines of code)
    • 1 *.c files (4,494 lines of code)
    • 14 *.py files (656 lines of code)
  • " *.m" is biggest, containing 90.7% of code.
  • " *.py" is smallest, containing 0.2% of code.


*.m293886 LOC (90%) 304 files
*.h13078 LOC (4%) 410 files
*.swift11907 LOC (3%) 77 files
*.c4494 LOC (1%) 1 files
*.py656 LOC (<1%) 14 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 paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*UnitTests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 165 files match defined criteria (113,591 lines of code, 35.1% vs. main code):
    • 103 *.m files (107,321 lines of code)
    • 40 *.swift files (5,189 lines of code)
    • 7 *.rb files (654 lines of code)
    • 1 *.sh files (216 lines of code)
    • 13 *.h files (142 lines of code)
    • 1 *.erb files (69 lines of code)
  • " *.m" is biggest, containing 94.48% of code.
  • " *.erb" is smallest, containing 0.06% of code.


*.m107321 LOC (94%) 103 files
*.swift5189 LOC (4%) 40 files
*.rb654 LOC (<1%) 7 files
*.sh216 LOC (<1%) 1 files
*.h142 LOC (<1%) 13 files
*.erb69 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 ".*[.]podspec".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 56 files match defined criteria (1,180 lines of code, 0.4% vs. main code):
    • 48 *.podspec files (872 lines of code)
    • 8 *.sh files (308 lines of code)
  • " *.podspec" is biggest, containing 73.9% of code.
  • " *.sh" is smallest, containing 26.1% of code.


*.podspec872 LOC (73%) 48 files
*.sh308 LOC (26%) 8 files
Other Code
plist
storyboard
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]markdown".
  • 192 files match defined criteria (14,543 lines of code, 4.5% vs. main code):
    • 25 *.json files (6,137 lines of code)
    • 139 *.plist files (3,405 lines of code)
    • 18 *.md files (2,586 lines of code)
    • 7 *.storyboard files (2,186 lines of code)
    • 1 *.markdown files (213 lines of code)
    • 2 *.html files (16 lines of code)
  • " *.json" is biggest, containing 42.2% of code.
  • " *.html" is smallest, containing 0.11% of code.


*.json6137 LOC (42%) 25 files
*.plist3405 LOC (23%) 139 files
*.md2586 LOC (17%) 18 files
*.storyboard2186 LOC (15%) 7 files
*.markdown213 LOC (1%) 1 files
*.html16 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.m files are analyzed with CppAnalyzer:
    • 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
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.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 01:30