firebase / extensions
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
snap
properties
prettierignore
  • 18 extensions are included in analyses: ts, json, js, md, txt, yaml, gitignore, sh, yml, snap, swift, svg, gradle, java, bat, xml, properties, prettierignore
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (3 files).
    • 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (24 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.

main10153 LOC (2%) 125 files
test2290 LOC (<1%) 37 files
generated173998 LOC (47%) 14 files
build and deployment237 LOC (<1%) 5 files
other177067 LOC (48%) 131 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 ".*".
  • 125 files match defined criteria (10,153 lines of code, 100.0% vs. main code):
    • 58 *.ts files (5,673 lines of code)
    • 54 *.js files (2,873 lines of code)
    • 9 *.yaml files (1,371 lines of code)
    • 1 *.java files (119 lines of code)
    • 2 *.swift files (106 lines of code)
    • 1 *.yml files (11 lines of code)
  • " *.ts" is biggest, containing 55.88% of code.
  • " *.yml" is smallest, containing 0.11% of code.


*.ts5673 LOC (55%) 58 files
*.js2873 LOC (28%) 54 files
*.yaml1371 LOC (13%) 9 files
*.java119 LOC (1%) 1 files
*.swift106 LOC (1%) 2 files
*.yml11 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/__mocks?__/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[-]data/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 37 files match defined criteria (2,290 lines of code, 22.6% vs. main code):
    • 32 *.ts files (2,188 lines of code)
    • 4 *.snap files (92 lines of code)
    • 1 *.sh files (10 lines of code)
  • " *.ts" is biggest, containing 95.55% of code.
  • " *.sh" is smallest, containing 0.44% of code.


*.ts2188 LOC (95%) 32 files
*.snap92 LOC (4%) 4 files
*.sh10 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
  • 14 files match defined criteria (173,998 lines of code, 1713.8% vs. main code). All matches are in *.json files.


*.json173998 LOC (100%) 14 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
  • 5 files match defined criteria (237 lines of code, 2.3% vs. main code):
    • 2 *.sh files (90 lines of code)
    • 1 *.gradle files (62 lines of code)
    • 1 *.bat files (61 lines of code)
    • 1 *.js files (24 lines of code)
  • " *.sh" is biggest, containing 37.97% of code.
  • " *.js" is smallest, containing 10.13% of code.


*.sh90 LOC (37%) 2 files
*.gradle62 LOC (26%) 1 files
*.bat61 LOC (25%) 1 files
*.js24 LOC (10%) 1 files
Other Code
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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 131 files match defined criteria (177,067 lines of code, 1744.0% vs. main code):
    • 83 *.json files (175,186 lines of code)
    • 47 *.md files (1,878 lines of code)
    • 1 *.xml files (3 lines of code)
  • " *.json" is biggest, containing 98.94% of code.
  • " *.xml" is smallest, containing 0% of code.


*.json175186 LOC (98%) 83 files
*.md1878 LOC (1%) 47 files
*.xml3 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.yaml files are analyzed with YamlAnalyzer:
    • 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
  • *.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)
  • *.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
  • *.yml files are analyzed with YamlAnalyzer:
    • 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