aws-amplify / amplify-flutter
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
properties
storyboard
podspec
project
classpath
prefs
txt
pro
  • 25 extensions are included in analyses: dart, kt, swift, json, gitignore, xml, md, gradle, yaml, plist, properties, storyboard, h, sh, podspec, m, project, rb, yml, graphql, classpath, prefs, txt, js, pro
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (82 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 ".*/gradle/wrapper/.*" (Gradle) (16 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (17 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (2 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.

main45623 LOC (55%) 768 files
test23755 LOC (28%) 195 files
generated1254 LOC (1%) 10 files
build and deployment3630 LOC (4%) 65 files
other7868 LOC (9%) 260 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 ".*".
  • 768 files match defined criteria (45,623 lines of code, 100.0% vs. main code):
    • 456 *.dart files (29,725 lines of code)
    • 131 *.swift files (9,292 lines of code)
    • 109 *.kt files (5,243 lines of code)
    • 43 *.yaml files (902 lines of code)
    • 1 *.graphql files (194 lines of code)
    • 5 *.rb files (160 lines of code)
    • 7 *.m files (77 lines of code)
    • 16 *.h files (30 lines of code)
  • " *.dart" is biggest, containing 65.15% of code.
  • " *.h" is smallest, containing 0.07% of code.


*.dart29725 LOC (65%) 456 files
*.swift9292 LOC (20%) 131 files
*.kt5243 LOC (11%) 109 files
*.yaml902 LOC (1%) 43 files
*.graphql194 LOC (<1%) 1 files
*.rb160 LOC (<1%) 5 files
*.m77 LOC (<1%) 7 files
*.h30 LOC (<1%) 16 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 ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 195 files match defined criteria (23,755 lines of code, 52.1% vs. main code):
    • 162 *.dart files (15,699 lines of code)
    • 27 *.kt files (5,762 lines of code)
    • 4 *.swift files (2,218 lines of code)
    • 2 *.graphql files (76 lines of code)
  • " *.dart" is biggest, containing 66.09% of code.
  • " *.graphql" is smallest, containing 0.32% of code.


*.dart15699 LOC (66%) 162 files
*.kt5762 LOC (24%) 27 files
*.swift2218 LOC (9%) 4 files
*.graphql76 LOC (<1%) 2 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/generated/.*".
  • 10 files match defined criteria (1,254 lines of code, 2.7% vs. main code). All matches are in *.dart files.


*.dart1254 LOC (100%) 10 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]podspec".
  • 65 files match defined criteria (3,630 lines of code, 8.0% vs. main code):
    • 50 *.gradle files (1,818 lines of code)
    • 8 *.sh files (1,657 lines of code)
    • 7 *.podspec files (155 lines of code)
  • " *.gradle" is biggest, containing 50.08% of code.
  • " *.podspec" is smallest, containing 4.27% of code.


*.gradle1818 LOC (50%) 50 files
*.sh1657 LOC (45%) 8 files
*.podspec155 LOC (4%) 7 files
Other Code
plist
storyboard
properties
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 ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 260 files match defined criteria (7,868 lines of code, 17.2% vs. main code):
    • 81 *.json files (3,649 lines of code)
    • 50 *.md files (2,143 lines of code)
    • 41 *.plist files (916 lines of code)
    • 18 *.storyboard files (549 lines of code)
    • 54 *.xml files (542 lines of code)
    • 16 *.properties files (69 lines of code)
  • " *.json" is biggest, containing 46.38% of code.
  • " *.properties" is smallest, containing 0.88% of code.


*.json3649 LOC (46%) 81 files
*.md2143 LOC (27%) 50 files
*.plist916 LOC (11%) 41 files
*.storyboard549 LOC (6%) 18 files
*.xml542 LOC (6%) 54 files
*.properties69 LOC (<1%) 16 files
Analyzers
Info about analyzers used for source code examinations.
  • *.dart 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
  • *.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)
  • *.yaml files are analyzed with YamlAnalyzer:
    • 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
  • *.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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.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


2022-02-01 01:51