firebase / firebase-cpp-sdk
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
txt
cmake
storyboard
plist
clang-format
pro
properties
patch
cfg
gitmodules
  • 28 extensions are included in analyses: cc, h, java, mm, xml, txt, gradle, cmake, py, storyboard, json, plist, sh, clang-format, bat, pro, properties, md, yml, m, swift, patch, cfg, kt, cpp, gitignore, rb, gitmodules
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (15 files).
    • exclude files with path like ".*/proguard[.]pro" (ProGuard) (13 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (34 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (35 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 ".*[.]txt" (Text files) (42 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main101331 LOC (57%) 1152 files
test50987 LOC (29%) 238 files
generated0 LOC (0%) 0 files
build and deployment5881 LOC (3%) 92 files
other16761 LOC (9%) 183 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
pro
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1152 files match defined criteria (101,331 lines of code, 100.0% vs. main code):
    • 367 *.cc files (51,683 lines of code)
    • 521 *.h files (26,499 lines of code)
    • 82 *.mm files (9,876 lines of code)
    • 33 *.py files (5,324 lines of code)
    • 108 *.java files (5,125 lines of code)
    • 25 *.cmake files (2,022 lines of code)
    • 1 *.cpp files (434 lines of code)
    • 4 *.swift files (141 lines of code)
    • 1 *.rb files (118 lines of code)
    • 1 *.kt files (48 lines of code)
    • 3 *.m files (31 lines of code)
    • 4 *.pro files (21 lines of code)
    • 2 *.cfg files (9 lines of code)
  • " *.cc" is biggest, containing 51% of code.
  • " *.cfg" is smallest, containing 0.01% of code.


*.cc51683 LOC (51%) 367 files
*.h26499 LOC (26%) 521 files
*.mm9876 LOC (9%) 82 files
*.py5324 LOC (5%) 33 files
*.java5125 LOC (5%) 108 files
*.cmake2022 LOC (1%) 25 files
*.cpp434 LOC (<1%) 1 files
*.swift141 LOC (<1%) 4 files
*.rb118 LOC (<1%) 1 files
*.kt48 LOC (<1%) 1 files
*.m31 LOC (<1%) 3 files
*.pro21 LOC (<1%) 4 files
*.cfg9 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 238 files match defined criteria (50,987 lines of code, 50.3% vs. main code):
    • 187 *.cc files (47,101 lines of code)
    • 20 *.h files (1,232 lines of code)
    • 9 *.py files (1,186 lines of code)
    • 7 *.mm files (955 lines of code)
    • 1 *.cmake files (155 lines of code)
    • 2 *.bat files (116 lines of code)
    • 2 *.java files (101 lines of code)
    • 1 *.kt files (38 lines of code)
    • 1 *.gradle files (35 lines of code)
    • 3 *.m files (35 lines of code)
    • 5 *.sh files (33 lines of code)
  • " *.cc" is biggest, containing 92.38% of code.
  • " *.sh" is smallest, containing 0.06% of code.


*.cc47101 LOC (92%) 187 files
*.h1232 LOC (2%) 20 files
*.py1186 LOC (2%) 9 files
*.mm955 LOC (1%) 7 files
*.cmake155 LOC (<1%) 1 files
*.bat116 LOC (<1%) 2 files
*.java101 LOC (<1%) 2 files
*.kt38 LOC (<1%) 1 files
*.gradle35 LOC (<1%) 1 files
*.m35 LOC (<1%) 3 files
*.sh33 LOC (<1%) 5 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 92 files match defined criteria (5,881 lines of code, 5.8% vs. main code):
    • 58 *.gradle files (3,065 lines of code)
    • 19 *.sh files (1,667 lines of code)
    • 15 *.bat files (1,149 lines of code)
  • " *.gradle" is biggest, containing 52.12% of code.
  • " *.bat" is smallest, containing 19.54% of code.


*.gradle3065 LOC (52%) 58 files
*.sh1667 LOC (28%) 19 files
*.bat1149 LOC (19%) 15 files
Other Code
plist
storyboard
patch
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 183 files match defined criteria (16,761 lines of code, 16.5% vs. main code):
    • 33 *.json files (10,471 lines of code)
    • 11 *.md files (2,885 lines of code)
    • 29 *.plist files (1,004 lines of code)
    • 65 *.xml files (856 lines of code)
    • 37 *.storyboard files (725 lines of code)
    • 3 *.cc files (678 lines of code)
    • 2 *.patch files (77 lines of code)
    • 2 *.java files (44 lines of code)
    • 1 *.properties files (21 lines of code)
  • " *.json" is biggest, containing 62.47% of code.
  • " *.properties" is smallest, containing 0.13% of code.


*.json10471 LOC (62%) 33 files
*.md2885 LOC (17%) 11 files
*.plist1004 LOC (5%) 29 files
*.xml856 LOC (5%) 65 files
*.storyboard725 LOC (4%) 37 files
*.cc678 LOC (4%) 3 files
*.patch77 LOC (<1%) 2 files
*.java44 LOC (<1%) 2 files
*.properties21 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.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
  • *.pro 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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


2022-02-03 05:39