flutter / samples
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
properties
txt
cmake
pro
podspec
gitattributes
gitmodules
  • 30 extensions are included in analyses: dart, xml, plist, gitignore, json, yaml, md, swift, gradle, h, storyboard, properties, kt, txt, cpp, html, cc, xib, cmake, sh, bat, yml, pro, js, java, podspec, m, scss, gitattributes, gitmodules
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (141 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (27 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (2 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (3 files).
    • exclude files with path like ".*[.]txt" (Text files) (31 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.

main48634 LOC (21%) 840 files
test3963 LOC (1%) 90 files
generated3289 LOC (1%) 25 files
build and deployment2844 LOC (1%) 98 files
other165569 LOC (73%) 645 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 840 files match defined criteria (48,634 lines of code, 100.0% vs. main code):
    • 451 *.dart files (38,889 lines of code)
    • 28 *.cpp files (2,091 lines of code)
    • 94 *.yaml files (1,642 lines of code)
    • 90 *.swift files (1,378 lines of code)
    • 42 *.kt files (1,162 lines of code)
    • 26 *.html files (1,145 lines of code)
    • 71 *.h files (756 lines of code)
    • 21 *.cc files (476 lines of code)
    • 1 *.scss files (456 lines of code)
    • 2 *.m files (260 lines of code)
    • 1 *.java files (214 lines of code)
    • 11 *.cmake files (145 lines of code)
    • 2 *.js files (20 lines of code)
  • " *.dart" is biggest, containing 79.96% of code.
  • " *.js" is smallest, containing 0.04% of code.


*.dart38889 LOC (79%) 451 files
*.cpp2091 LOC (4%) 28 files
*.yaml1642 LOC (3%) 94 files
*.swift1378 LOC (2%) 90 files
*.kt1162 LOC (2%) 42 files
*.html1145 LOC (2%) 26 files
*.h756 LOC (1%) 71 files
*.cc476 LOC (<1%) 21 files
*.scss456 LOC (<1%) 1 files
*.m260 LOC (<1%) 2 files
*.java214 LOC (<1%) 1 files
*.cmake145 LOC (<1%) 11 files
*.js20 LOC (<1%) 2 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 90 files match defined criteria (3,963 lines of code, 8.1% vs. main code):
    • 80 *.dart files (3,787 lines of code)
    • 7 *.kt files (114 lines of code)
    • 2 *.yaml files (52 lines of code)
    • 1 *.java files (10 lines of code)
  • " *.dart" is biggest, containing 95.56% of code.
  • " *.java" is smallest, containing 0.25% of code.


*.dart3787 LOC (95%) 80 files
*.kt114 LOC (2%) 7 files
*.yaml52 LOC (1%) 2 files
*.java10 LOC (<1%) 1 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 ".*[.]dart" AND any line of content like ".*GENERATED CODE.*DO NOT MODIFY.*".
  • 25 files match defined criteria (3,289 lines of code, 6.8% vs. main code). All matches are in *.dart files.


*.dart3289 LOC (100%) 25 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]podspec".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitattributes".
  • 98 files match defined criteria (2,844 lines of code, 5.8% vs. main code):
    • 83 *.gradle files (2,220 lines of code)
    • 6 *.bat files (366 lines of code)
    • 7 *.sh files (224 lines of code)
    • 2 *.podspec files (34 lines of code)
  • " *.gradle" is biggest, containing 78.06% of code.
  • " *.podspec" is smallest, containing 1.2% of code.


*.gradle2220 LOC (78%) 83 files
*.bat366 LOC (12%) 6 files
*.sh224 LOC (7%) 7 files
*.podspec34 LOC (1%) 2 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 ".*[.]plist".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 645 files match defined criteria (165,569 lines of code, 340.4% vs. main code):
    • 100 *.json files (149,812 lines of code)
    • 15 *.xib files (4,814 lines of code)
    • 152 *.plist files (3,367 lines of code)
    • 200 *.xml files (3,276 lines of code)
    • 93 *.md files (2,134 lines of code)
    • 58 *.storyboard files (1,970 lines of code)
    • 27 *.properties files (196 lines of code)
  • " *.json" is biggest, containing 90.48% of code.
  • " *.properties" is smallest, containing 0.12% of code.


*.json149812 LOC (90%) 100 files
*.xib4814 LOC (2%) 15 files
*.plist3367 LOC (2%) 152 files
*.xml3276 LOC (1%) 200 files
*.md2134 LOC (1%) 93 files
*.storyboard1970 LOC (1%) 58 files
*.properties196 LOC (<1%) 27 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
  • *.cpp 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
  • *.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
  • *.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)
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.cc 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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.cmake 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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


2022-02-02 22:31