flutter / packages
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
txt
storyboard
properties
cmake
project
prefs
classpath
gitattributes
pri
clang-format
pro
  • 32 extensions are included in analyses: dart, md, xml, gitignore, plist, h, yaml, json, gradle, txt, cpp, m, storyboard, properties, sh, swift, kt, java, cc, cmake, html, xib, yml, project, prefs, bat, classpath, css, gitattributes, pri, clang-format, pro
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (108 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (6 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (12 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (5 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (33 files).
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.

main26336 LOC (39%) 337 files
test28835 LOC (42%) 134 files
generated0 LOC (0%) 0 files
build and deployment1177 LOC (1%) 49 files
other10761 LOC (16%) 314 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 ".*".
  • 337 files match defined criteria (26,336 lines of code, 100.0% vs. main code):
    • 145 *.dart files (21,146 lines of code)
    • 27 *.cpp files (1,900 lines of code)
    • 20 *.m files (683 lines of code)
    • 39 *.yaml files (677 lines of code)
    • 48 *.h files (635 lines of code)
    • 8 *.html files (463 lines of code)
    • 11 *.cc files (445 lines of code)
    • 20 *.swift files (216 lines of code)
    • 11 *.cmake files (133 lines of code)
    • 6 *.kt files (32 lines of code)
    • 2 *.java files (6 lines of code)
  • " *.dart" is biggest, containing 80.29% of code.
  • " *.java" is smallest, containing 0.02% of code.


*.dart21146 LOC (80%) 145 files
*.cpp1900 LOC (7%) 27 files
*.m683 LOC (2%) 20 files
*.yaml677 LOC (2%) 39 files
*.h635 LOC (2%) 48 files
*.html463 LOC (1%) 8 files
*.cc445 LOC (1%) 11 files
*.swift216 LOC (<1%) 20 files
*.cmake133 LOC (<1%) 11 files
*.kt32 LOC (<1%) 6 files
*.java6 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 ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/tests_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 134 files match defined criteria (28,835 lines of code, 109.5% vs. main code):
    • 99 *.dart files (27,356 lines of code)
    • 9 *.java files (769 lines of code)
    • 5 *.sh files (404 lines of code)
    • 3 *.gradle files (92 lines of code)
    • 6 *.m files (59 lines of code)
    • 4 *.yaml files (46 lines of code)
    • 1 *.cpp files (38 lines of code)
    • 1 *.html files (25 lines of code)
    • 2 *.kt files (24 lines of code)
    • 4 *.h files (22 lines of code)
  • " *.dart" is biggest, containing 94.87% of code.
  • " *.h" is smallest, containing 0.08% of code.


*.dart27356 LOC (94%) 99 files
*.java769 LOC (2%) 9 files
*.sh404 LOC (1%) 5 files
*.gradle92 LOC (<1%) 3 files
*.m59 LOC (<1%) 6 files
*.yaml46 LOC (<1%) 4 files
*.cpp38 LOC (<1%) 1 files
*.html25 LOC (<1%) 1 files
*.kt24 LOC (<1%) 2 files
*.h22 LOC (<1%) 4 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*/[.]gitattributes".
  • 49 files match defined criteria (1,177 lines of code, 4.5% vs. main code):
    • 33 *.gradle files (901 lines of code)
    • 3 *.bat files (141 lines of code)
    • 13 *.sh files (135 lines of code)
  • " *.gradle" is biggest, containing 76.55% of code.
  • " *.sh" is smallest, containing 11.47% of code.


*.gradle901 LOC (76%) 33 files
*.bat141 LOC (11%) 3 files
*.sh135 LOC (11%) 13 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 ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 314 files match defined criteria (10,761 lines of code, 40.9% vs. main code):
    • 42 *.json files (2,695 lines of code)
    • 77 *.md files (2,175 lines of code)
    • 6 *.xib files (2,034 lines of code)
    • 64 *.plist files (1,391 lines of code)
    • 78 *.xml files (870 lines of code)
    • 7 *.dart files (783 lines of code)
    • 24 *.storyboard files (739 lines of code)
    • 12 *.properties files (58 lines of code)
    • 4 *.kt files (16 lines of code)
  • " *.json" is biggest, containing 25.04% of code.
  • " *.kt" is smallest, containing 0.15% of code.


*.json2695 LOC (25%) 42 files
*.md2175 LOC (20%) 77 files
*.xib2034 LOC (18%) 6 files
*.plist1391 LOC (12%) 64 files
*.xml870 LOC (8%) 78 files
*.dart783 LOC (7%) 7 files
*.storyboard739 LOC (6%) 24 files
*.properties58 LOC (<1%) 12 files
*.kt16 LOC (<1%) 4 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.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)


2022-02-03 01:22