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

main13601 LOC (52%) 167 files
test677 LOC (2%) 8 files
generated0 LOC (0%) 0 files
build and deployment331 LOC (1%) 13 files
other11303 LOC (43%) 129 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 ".*".
  • 167 files match defined criteria (13,601 lines of code, 100.0% vs. main code):
    • 81 *.m files (11,655 lines of code)
    • 85 *.h files (1,713 lines of code)
    • 1 *.swift files (233 lines of code)
  • " *.m" is biggest, containing 85.69% of code.
  • " *.swift" is smallest, containing 1.71% of code.


*.m11655 LOC (85%) 81 files
*.h1713 LOC (12%) 85 files
*.swift233 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 ".*/UITests?/.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 8 files match defined criteria (677 lines of code, 5.0% vs. main code):
    • 5 *.m files (648 lines of code)
    • 1 *.sh files (22 lines of code)
    • 2 *.h files (7 lines of code)
  • " *.m" is biggest, containing 95.72% of code.
  • " *.h" is smallest, containing 1.03% of code.


*.m648 LOC (95%) 5 files
*.sh22 LOC (3%) 1 files
*.h7 LOC (1%) 2 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 ".*[.]podspec".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 13 files match defined criteria (331 lines of code, 2.4% vs. main code):
    • 11 *.podspec files (294 lines of code)
    • 2 *.sh files (37 lines of code)
  • " *.podspec" is biggest, containing 88.82% of code.
  • " *.sh" is smallest, containing 11.18% of code.


*.podspec294 LOC (88%) 11 files
*.sh37 LOC (11%) 2 files
Other Code
storyboard
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
  • 129 files match defined criteria (11,303 lines of code, 83.1% vs. main code):
    • 5 *.json files (3,544 lines of code)
    • 28 *.xib files (2,261 lines of code)
    • 7 *.storyboard files (1,675 lines of code)
    • 17 *.m files (1,076 lines of code)
    • 17 *.swift files (1,010 lines of code)
    • 29 *.plist files (879 lines of code)
    • 10 *.md files (787 lines of code)
    • 16 *.h files (71 lines of code)
  • " *.json" is biggest, containing 31.35% of code.
  • " *.h" is smallest, containing 0.63% of code.


*.json3544 LOC (31%) 5 files
*.xib2261 LOC (20%) 28 files
*.storyboard1675 LOC (14%) 7 files
*.m1076 LOC (9%) 17 files
*.swift1010 LOC (8%) 17 files
*.plist879 LOC (7%) 29 files
*.md787 LOC (6%) 10 files
*.h71 LOC (<1%) 16 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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


2022-02-03 05:34