flutter / plugins
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
txt
storyboard
podspec
cmake
gitattributes
clang-format
srt
vtt
  • 28 extensions are included in analyses: dart, java, md, yaml, h, m, plist, xml, gradle, properties, gitignore, cpp, json, txt, storyboard, swift, sh, html, podspec, cc, cmake, xib, yml, css, gitattributes, clang-format, srt, vtt
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (83 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (41 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (4 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (41 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.

main77267 LOC (46%) 1059 files
test66475 LOC (39%) 476 files
generated641 LOC (<1%) 10 files
build and deployment2915 LOC (1%) 109 files
other18930 LOC (11%) 507 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
srt
vtt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1059 files match defined criteria (77,267 lines of code, 100.0% vs. main code):
    • 404 *.dart files (39,711 lines of code)
    • 142 *.java files (15,610 lines of code)
    • 129 *.m files (12,906 lines of code)
    • 45 *.cpp files (3,059 lines of code)
    • 139 *.yaml files (2,668 lines of code)
    • 128 *.h files (1,878 lines of code)
    • 21 *.swift files (572 lines of code)
    • 13 *.cc files (345 lines of code)
    • 19 *.html files (324 lines of code)
    • 14 *.cmake files (174 lines of code)
    • 3 *.css files (9 lines of code)
    • 1 *.srt files (6 lines of code)
    • 1 *.vtt files (5 lines of code)
  • " *.dart" is biggest, containing 51.39% of code.
  • " *.vtt" is smallest, containing 0.01% of code.


*.dart39711 LOC (51%) 404 files
*.java15610 LOC (20%) 142 files
*.m12906 LOC (16%) 129 files
*.cpp3059 LOC (3%) 45 files
*.yaml2668 LOC (3%) 139 files
*.h1878 LOC (2%) 128 files
*.swift572 LOC (<1%) 21 files
*.cc345 LOC (<1%) 13 files
*.html324 LOC (<1%) 19 files
*.cmake174 LOC (<1%) 14 files
*.css9 LOC (<1%) 3 files
*.srt6 LOC (<1%) 1 files
*.vtt5 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 ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/tests_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 476 files match defined criteria (66,475 lines of code, 86.0% vs. main code):
    • 283 *.dart files (54,200 lines of code)
    • 177 *.java files (11,365 lines of code)
    • 5 *.cpp files (615 lines of code)
    • 8 *.sh files (114 lines of code)
    • 2 *.h files (113 lines of code)
    • 1 *.cc files (68 lines of code)
  • " *.dart" is biggest, containing 81.53% of code.
  • " *.cc" is smallest, containing 0.1% of code.


*.dart54200 LOC (81%) 283 files
*.java11365 LOC (17%) 177 files
*.cpp615 LOC (<1%) 5 files
*.sh114 LOC (<1%) 8 files
*.h113 LOC (<1%) 2 files
*.cc68 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.*".
    • files with paths like ".*/generated/.*".
  • 10 files match defined criteria (641 lines of code, 0.8% vs. main code). All matches are in *.dart files.


*.dart641 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 ".*[.]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 ".*/[.]gitattributes".
  • 109 files match defined criteria (2,915 lines of code, 3.8% vs. main code):
    • 89 *.gradle files (2,585 lines of code)
    • 16 *.podspec files (299 lines of code)
    • 4 *.sh files (31 lines of code)
  • " *.gradle" is biggest, containing 88.68% of code.
  • " *.sh" is smallest, containing 1.06% of code.


*.gradle2585 LOC (88%) 89 files
*.podspec299 LOC (10%) 16 files
*.sh31 LOC (1%) 4 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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • 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)".
  • 507 files match defined criteria (18,930 lines of code, 24.5% vs. main code):
    • 197 *.md files (8,014 lines of code)
    • 47 *.json files (3,502 lines of code)
    • 101 *.plist files (2,581 lines of code)
    • 6 *.xib files (2,034 lines of code)
    • 95 *.xml files (1,647 lines of code)
    • 38 *.storyboard files (1,059 lines of code)
    • 23 *.properties files (93 lines of code)
  • " *.md" is biggest, containing 42.33% of code.
  • " *.properties" is smallest, containing 0.49% of code.


*.md8014 LOC (42%) 197 files
*.json3502 LOC (18%) 47 files
*.plist2581 LOC (13%) 101 files
*.xib2034 LOC (10%) 6 files
*.xml1647 LOC (8%) 95 files
*.storyboard1059 LOC (5%) 38 files
*.properties93 LOC (<1%) 23 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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.srt 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
  • *.vtt 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-03 01:22