firebase / snippets-cpp
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
txt
properties
pro
  • 18 extensions are included in analyses: xml, h, kt, md, json, gitignore, gradle, plist, mm, cc, cpp, storyboard, m, txt, yml, properties, pro, bat
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (1 file).
    • 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.

main1104 LOC (49%) 15 files
test243 LOC (10%) 3 files
generated0 LOC (0%) 0 files
build and deployment140 LOC (6%) 4 files
other737 LOC (33%) 21 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 ".*".
  • 15 files match defined criteria (1,104 lines of code, 100.0% vs. main code):
    • 2 *.cpp files (706 lines of code)
    • 1 *.cc files (250 lines of code)
    • 6 *.h files (55 lines of code)
    • 2 *.mm files (39 lines of code)
    • 2 *.kt files (28 lines of code)
    • 2 *.m files (26 lines of code)
  • " *.cpp" is biggest, containing 63.95% of code.
  • " *.m" is smallest, containing 2.36% of code.


*.cpp706 LOC (63%) 2 files
*.cc250 LOC (22%) 1 files
*.h55 LOC (4%) 6 files
*.mm39 LOC (3%) 2 files
*.kt28 LOC (2%) 2 files
*.m26 LOC (2%) 2 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 ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 3 files match defined criteria (243 lines of code, 22.0% vs. main code):
    • 1 *.cc files (220 lines of code)
    • 2 *.kt files (23 lines of code)
  • " *.cc" is biggest, containing 90.53% of code.
  • " *.kt" is smallest, containing 9.47% of code.


*.cc220 LOC (90%) 1 files
*.kt23 LOC (9%) 2 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
  • 4 files match defined criteria (140 lines of code, 12.7% vs. main code):
    • 3 *.gradle files (79 lines of code)
    • 1 *.bat files (61 lines of code)
  • " *.gradle" is biggest, containing 56.43% of code.
  • " *.bat" is smallest, containing 43.57% of code.


*.gradle79 LOC (56%) 3 files
*.bat61 LOC (43%) 1 files
Other Code
plist
storyboard
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 ".*[.]storyboard".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 21 files match defined criteria (737 lines of code, 66.8% vs. main code):
    • 9 *.xml files (266 lines of code)
    • 3 *.json files (187 lines of code)
    • 4 *.md files (142 lines of code)
    • 2 *.plist files (72 lines of code)
    • 2 *.storyboard files (47 lines of code)
    • 1 *.properties files (23 lines of code)
  • " *.xml" is biggest, containing 36.09% of code.
  • " *.properties" is smallest, containing 3.12% of code.


*.xml266 LOC (36%) 9 files
*.json187 LOC (25%) 3 files
*.md142 LOC (19%) 4 files
*.plist72 LOC (9%) 2 files
*.storyboard47 LOC (6%) 2 files
*.properties23 LOC (3%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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


2022-02-03 05:39