firebase / firebase-unity-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
asset
meta
txt
i
cmake
properties
resx
storyboard
plist
csproj
  • 29 extensions are included in analyses: cs, asset, meta, txt, py, md, unity, xml, i, cmake, cc, h, properties, sh, json, yml, resx, swift, storyboard, plist, bat, gradle, cpp, kt, js, java, gitignore, m, csproj
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*[.]resx" (The resx resource files) (6 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (7 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (12 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) (39 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.

main62705 LOC (64%) 591 files
test5049 LOC (5%) 24 files
generated19614 LOC (20%) 153 files
build and deployment716 LOC (<1%) 15 files
other8752 LOC (9%) 59 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asset
i
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 591 files match defined criteria (62,705 lines of code, 100.0% vs. main code):
    • 257 *.cs files (26,509 lines of code)
    • 205 *.asset files (16,889 lines of code)
    • 19 *.i files (6,770 lines of code)
    • 23 *.unity files (4,903 lines of code)
    • 28 *.py files (3,707 lines of code)
    • 15 *.cmake files (1,805 lines of code)
    • 18 *.cc files (960 lines of code)
    • 18 *.h files (773 lines of code)
    • 4 *.swift files (141 lines of code)
    • 1 *.cpp files (107 lines of code)
    • 1 *.m files (54 lines of code)
    • 1 *.kt files (48 lines of code)
    • 1 *.java files (39 lines of code)
  • " *.cs" is biggest, containing 42.28% of code.
  • " *.java" is smallest, containing 0.06% of code.


*.cs26509 LOC (42%) 257 files
*.asset16889 LOC (26%) 205 files
*.i6770 LOC (10%) 19 files
*.unity4903 LOC (7%) 23 files
*.py3707 LOC (5%) 28 files
*.cmake1805 LOC (2%) 15 files
*.cc960 LOC (1%) 18 files
*.h773 LOC (1%) 18 files
*.swift141 LOC (<1%) 4 files
*.cpp107 LOC (<1%) 1 files
*.m54 LOC (<1%) 1 files
*.kt48 LOC (<1%) 1 files
*.java39 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 24 files match defined criteria (5,049 lines of code, 8.1% vs. main code):
    • 18 *.cs files (4,045 lines of code)
    • 4 *.py files (914 lines of code)
    • 1 *.cc files (52 lines of code)
    • 1 *.kt files (38 lines of code)
  • " *.cs" is biggest, containing 80.11% of code.
  • " *.kt" is smallest, containing 0.75% of code.


*.cs4045 LOC (80%) 18 files
*.py914 LOC (18%) 4 files
*.cc52 LOC (1%) 1 files
*.kt38 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
meta
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]meta" AND any line of content like ".*fileFormatVersion[:] .*".
    • files with paths like ".*/generated/.*".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 153 files match defined criteria (19,614 lines of code, 31.3% vs. main code):
    • 1 *.cpp files (13,119 lines of code)
    • 48 *.cs files (4,453 lines of code)
    • 104 *.meta files (2,042 lines of code)
  • " *.cpp" is biggest, containing 66.89% of code.
  • " *.meta" is smallest, containing 10.41% of code.


*.cpp13119 LOC (66%) 1 files
*.cs4453 LOC (22%) 48 files
*.meta2042 LOC (10%) 104 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 15 files match defined criteria (716 lines of code, 1.1% vs. main code):
    • 8 *.sh files (385 lines of code)
    • 3 *.bat files (227 lines of code)
    • 3 *.gradle files (57 lines of code)
    • 1 *.csproj files (47 lines of code)
  • " *.sh" is biggest, containing 53.77% of code.
  • " *.csproj" is smallest, containing 6.56% of code.


*.sh385 LOC (53%) 8 files
*.bat227 LOC (31%) 3 files
*.gradle57 LOC (7%) 3 files
*.csproj47 LOC (6%) 1 files
Other Code
storyboard
plist
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 59 files match defined criteria (8,752 lines of code, 14.0% vs. main code):
    • 3 *.json files (5,721 lines of code)
    • 13 *.md files (2,363 lines of code)
    • 23 *.xml files (300 lines of code)
    • 4 *.storyboard files (132 lines of code)
    • 3 *.plist files (122 lines of code)
    • 12 *.properties files (87 lines of code)
    • 1 *.cs files (27 lines of code)
  • " *.json" is biggest, containing 65.37% of code.
  • " *.cs" is smallest, containing 0.31% of code.


*.json5721 LOC (65%) 3 files
*.md2363 LOC (26%) 13 files
*.xml300 LOC (3%) 23 files
*.storyboard132 LOC (1%) 4 files
*.plist122 LOC (1%) 3 files
*.properties87 LOC (<1%) 12 files
*.cs27 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 namespace heuristics)
  • *.asset 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
  • *.i 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
  • *.unity 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.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)


2022-02-03 05:40