facebook / draft-js
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
snap
babelrc
txt
eslintignore
  • 12 extensions are included in analyses: js, md, snap, css, html, json, gitignore, babelrc, yml, svg, txt, eslintignore
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (30 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).
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.

main12837 LOC (18%) 192 files
test51887 LOC (72%) 110 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other6573 LOC (9%) 91 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 ".*".
  • 192 files match defined criteria (12,837 lines of code, 100.0% vs. main code):
    • 185 *.js files (12,485 lines of code)
    • 7 *.css files (352 lines of code)
  • " *.js" is biggest, containing 97.26% of code.
  • " *.css" is smallest, containing 2.74% of code.


*.js12485 LOC (97%) 185 files
*.css352 LOC (2%) 7 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 ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/__mocks?__/.*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]snap".
  • 110 files match defined criteria (51,887 lines of code, 404.2% vs. main code):
    • 49 *.snap files (41,390 lines of code)
    • 61 *.js files (10,497 lines of code)
  • " *.snap" is biggest, containing 79.77% of code.
  • " *.js" is smallest, containing 20.23% of code.


*.snap41390 LOC (79%) 49 files
*.js10497 LOC (20%) 61 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
  • 91 files match defined criteria (6,573 lines of code, 51.2% vs. main code):
    • 50 *.md files (3,147 lines of code)
    • 11 *.html files (1,696 lines of code)
    • 16 *.js files (994 lines of code)
    • 6 *.css files (405 lines of code)
    • 7 *.json files (330 lines of code)
    • 1 *.svg files (1 lines of code)
  • " *.md" is biggest, containing 47.88% of code.
  • " *.svg" is smallest, containing 0.02% of code.


*.md3147 LOC (47%) 50 files
*.html1696 LOC (25%) 11 files
*.js994 LOC (15%) 16 files
*.css405 LOC (6%) 6 files
*.json330 LOC (5%) 7 files
*.svg1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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-04-14 23:06