reactjs / tl.reactjs.org
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
eslintignore
babelrc
dockerignore
patch
prettierignore
  • 17 extensions are included in analyses: md, js, tsx, json, yml, svg, css, ts, txt, html, gitignore, eslintignore, babelrc, dockerignore, patch, prettierignore, yaml
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (15 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (96 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (4 files).
    • exclude files with path like ".*/flow-typed/.*\.js" (flow-typed) (5 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.

main12625 LOC (19%) 225 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment14 LOC (<1%) 1 files
other50731 LOC (80%) 439 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 ".*".
  • 225 files match defined criteria (12,625 lines of code, 100.0% vs. main code):
    • 111 *.js files (5,577 lines of code)
    • 89 *.tsx files (4,631 lines of code)
    • 8 *.yml files (1,602 lines of code)
    • 8 *.css files (562 lines of code)
    • 5 *.ts files (117 lines of code)
    • 1 *.yaml files (85 lines of code)
    • 3 *.html files (51 lines of code)
  • " *.js" is biggest, containing 44.17% of code.
  • " *.html" is smallest, containing 0.4% of code.


*.js5577 LOC (44%) 111 files
*.tsx4631 LOC (36%) 89 files
*.yml1602 LOC (12%) 8 files
*.css562 LOC (4%) 8 files
*.ts117 LOC (<1%) 5 files
*.yaml85 LOC (<1%) 1 files
*.html51 LOC (<1%) 3 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[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 1 file matches defined criteria (14 lines of code, 0.1% vs. main code). All matches are in *.yml files.


*.yml14 LOC (100%) 1 files
Other Code
patch
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]dockerignore".
  • 439 files match defined criteria (50,731 lines of code, 401.8% vs. main code):
    • 344 *.md files (48,367 lines of code)
    • 65 *.js files (1,243 lines of code)
    • 19 *.json files (1,006 lines of code)
    • 7 *.svg files (72 lines of code)
    • 1 *.patch files (35 lines of code)
    • 3 *.txt files (8 lines of code)
  • " *.md" is biggest, containing 95.34% of code.
  • " *.txt" is smallest, containing 0.02% of code.


*.md48367 LOC (95%) 344 files
*.js1243 LOC (2%) 65 files
*.json1006 LOC (1%) 19 files
*.svg72 LOC (<1%) 7 files
*.patch35 LOC (<1%) 1 files
*.txt8 LOC (<1%) 3 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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


2022-04-16 07:17