flutter / cocoon
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
proto
storyboard
properties
cmake
mod
  • 25 extensions are included in analyses: dart, yaml, plist, sh, gitignore, xml, go, md, json, h, txt, proto, swift, gradle, cc, cpp, storyboard, properties, kt, cmake, xib, bat, yml, html, mod
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (12 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (19 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (2 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) (8 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.

main21379 LOC (41%) 274 files
test26737 LOC (51%) 159 files
generated659 LOC (1%) 10 files
build and deployment387 LOC (<1%) 18 files
other2303 LOC (4%) 60 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 274 files match defined criteria (21,379 lines of code, 100.0% vs. main code):
    • 206 *.dart files (19,301 lines of code)
    • 16 *.yaml files (511 lines of code)
    • 7 *.go files (496 lines of code)
    • 5 *.cpp files (365 lines of code)
    • 9 *.proto files (213 lines of code)
    • 5 *.cc files (165 lines of code)
    • 10 *.h files (131 lines of code)
    • 8 *.swift files (95 lines of code)
    • 2 *.html files (51 lines of code)
    • 3 *.cmake files (39 lines of code)
    • 3 *.kt files (12 lines of code)
  • " *.dart" is biggest, containing 90.28% of code.
  • " *.kt" is smallest, containing 0.06% of code.


*.dart19301 LOC (90%) 206 files
*.yaml511 LOC (2%) 16 files
*.go496 LOC (2%) 7 files
*.cpp365 LOC (1%) 5 files
*.proto213 LOC (<1%) 9 files
*.cc165 LOC (<1%) 5 files
*.h131 LOC (<1%) 10 files
*.swift95 LOC (<1%) 8 files
*.html51 LOC (<1%) 2 files
*.cmake39 LOC (<1%) 3 files
*.kt12 LOC (<1%) 3 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 any line of content like ".*/simpletest/.*".
  • 159 files match defined criteria (26,737 lines of code, 125.1% vs. main code):
    • 153 *.dart files (26,482 lines of code)
    • 5 *.go files (245 lines of code)
    • 1 *.yaml files (10 lines of code)
  • " *.dart" is biggest, containing 99.05% of code.
  • " *.yaml" is smallest, containing 0.04% of code.


*.dart26482 LOC (99%) 153 files
*.go245 LOC (<1%) 5 files
*.yaml10 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.*".
  • 10 files match defined criteria (659 lines of code, 3.1% vs. main code). All matches are in *.dart files.


*.dart659 LOC (100%) 10 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 ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
  • 18 files match defined criteria (387 lines of code, 1.8% vs. main code):
    • 11 *.sh files (192 lines of code)
    • 6 *.gradle files (165 lines of code)
    • 1 *.bat files (30 lines of code)
  • " *.sh" is biggest, containing 49.61% of code.
  • " *.bat" is smallest, containing 7.75% of code.


*.sh192 LOC (49%) 11 files
*.gradle165 LOC (42%) 6 files
*.bat30 LOC (7%) 1 files
Other Code
plist
storyboard
mod
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 ".*[.]json".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 60 files match defined criteria (2,303 lines of code, 10.8% vs. main code):
    • 2 *.xib files (678 lines of code)
    • 11 *.md files (553 lines of code)
    • 9 *.json files (473 lines of code)
    • 17 *.plist files (331 lines of code)
    • 14 *.xml files (128 lines of code)
    • 4 *.storyboard files (122 lines of code)
    • 1 *.mod files (12 lines of code)
    • 2 *.properties files (6 lines of code)
  • " *.xib" is biggest, containing 29.44% of code.
  • " *.properties" is smallest, containing 0.26% of code.


*.xib678 LOC (29%) 2 files
*.md553 LOC (24%) 11 files
*.json473 LOC (20%) 9 files
*.plist331 LOC (14%) 17 files
*.xml128 LOC (5%) 14 files
*.storyboard122 LOC (5%) 4 files
*.mod12 LOC (<1%) 1 files
*.properties6 LOC (<1%) 2 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
  • *.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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.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
  • *.proto 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
  • *.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
  • *.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
  • *.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
  • *.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)


2022-02-03 01:21