firebase / firebase-tools-ui
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
prettierignore
  • 14 extensions are included in analyses: tsx, scss, ts, svg, json, js, txt, md, gitignore, json5, xml, yml, html, prettierignore
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 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 ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (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.

main15540 LOC (12%) 286 files
test6884 LOC (5%) 94 files
generated50879 LOC (40%) 1 files
build and deployment0 LOC (0%) 0 files
other51355 LOC (41%) 22 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 ".*".
  • 286 files match defined criteria (15,540 lines of code, 100.0% vs. main code):
    • 150 *.tsx files (10,430 lines of code)
    • 90 *.scss files (2,680 lines of code)
    • 40 *.ts files (2,186 lines of code)
    • 4 *.js files (149 lines of code)
    • 1 *.html files (58 lines of code)
    • 1 *.json5 files (37 lines of code)
  • " *.tsx" is biggest, containing 67.12% of code.
  • " *.json5" is smallest, containing 0.24% of code.


*.tsx10430 LOC (67%) 150 files
*.scss2680 LOC (17%) 90 files
*.ts2186 LOC (14%) 40 files
*.js149 LOC (<1%) 4 files
*.html58 LOC (<1%) 1 files
*.json537 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 ".*/test[-]data/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 94 files match defined criteria (6,884 lines of code, 44.3% vs. main code):
    • 86 *.tsx files (5,936 lines of code)
    • 8 *.ts files (948 lines of code)
  • " *.tsx" is biggest, containing 86.23% of code.
  • " *.ts" is smallest, containing 13.77% of code.


*.tsx5936 LOC (86%) 86 files
*.ts948 LOC (13%) 8 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".
  • 1 file matches defined criteria (50,879 lines of code, 327.4% vs. main code). All matches are in *.json files.


*.json50879 LOC (100%) 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 ".*/[.]prettierignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 22 files match defined criteria (51,355 lines of code, 330.5% vs. main code):
    • 6 *.json files (51,122 lines of code)
    • 13 *.svg files (132 lines of code)
    • 2 *.md files (92 lines of code)
    • 1 *.xml files (9 lines of code)
  • " *.json" is biggest, containing 99.55% of code.
  • " *.xml" is smallest, containing 0.02% of code.


*.json51122 LOC (99%) 6 files
*.svg132 LOC (<1%) 13 files
*.md92 LOC (<1%) 2 files
*.xml9 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.tsx 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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.json5 files are analyzed with JsonAnalyzer:
    • 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