firebase / quickstart-ios
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
clang-format
txt
  • 17 extensions are included in analyses: swift, json, m, plist, h, md, storyboard, sh, yml, clang-format, xib, rb, mm, gitignore, txt, html, yaml
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (31 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) (0 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.

main16774 LOC (54%) 349 files
test185 LOC (<1%) 6 files
generated0 LOC (0%) 0 files
build and deployment353 LOC (1%) 23 files
other13523 LOC (43%) 303 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 ".*".
  • 349 files match defined criteria (16,774 lines of code, 100.0% vs. main code):
    • 186 *.swift files (11,553 lines of code)
    • 99 *.m files (4,716 lines of code)
    • 60 *.h files (271 lines of code)
    • 1 *.html files (119 lines of code)
    • 2 *.rb files (79 lines of code)
    • 1 *.mm files (36 lines of code)
  • " *.swift" is biggest, containing 68.87% of code.
  • " *.mm" is smallest, containing 0.21% of code.


*.swift11553 LOC (68%) 186 files
*.m4716 LOC (28%) 99 files
*.h271 LOC (1%) 60 files
*.html119 LOC (<1%) 1 files
*.rb79 LOC (<1%) 2 files
*.mm36 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 any line of content like ".*/simpletest/.*".
    • files with paths like ".*TestUtils/.*".
    • files with paths like ".*/mock[-].*".
  • 6 files match defined criteria (185 lines of code, 1.1% vs. main code):
    • 2 *.m files (126 lines of code)
    • 3 *.h files (32 lines of code)
    • 1 *.sh files (27 lines of code)
  • " *.m" is biggest, containing 68.11% of code.
  • " *.sh" is smallest, containing 14.59% of code.


*.m126 LOC (68%) 2 files
*.h32 LOC (17%) 3 files
*.sh27 LOC (14%) 1 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 23 files match defined criteria (353 lines of code, 2.1% vs. main code). All matches are in *.sh files.


*.sh353 LOC (100%) 23 files
Other Code
storyboard
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 303 files match defined criteria (13,523 lines of code, 80.6% vs. main code):
    • 133 *.json files (3,726 lines of code)
    • 28 *.storyboard files (3,560 lines of code)
    • 101 *.plist files (3,425 lines of code)
    • 38 *.md files (2,634 lines of code)
    • 3 *.xib files (178 lines of code)
  • " *.json" is biggest, containing 27.55% of code.
  • " *.xib" is smallest, containing 1.32% of code.


*.json3726 LOC (27%) 133 files
*.storyboard3560 LOC (26%) 28 files
*.plist3425 LOC (25%) 101 files
*.md2634 LOC (19%) 38 files
*.xib178 LOC (1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.mm 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-03 05:34