reactjs / hi.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
prettierignore
  • 15 extensions are included in analyses: md, js, tsx, svg, json, yml, css, ts, txt, html, gitignore, eslintignore, babelrc, 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) (13 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (104 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.

main13044 LOC (19%) 231 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other54252 LOC (80%) 443 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 ".*".
  • 231 files match defined criteria (13,044 lines of code, 100.0% vs. main code):
    • 116 *.js files (5,744 lines of code)
    • 92 *.tsx files (4,658 lines of code)
    • 8 *.yml files (1,686 lines of code)
    • 6 *.css files (657 lines of code)
    • 5 *.ts files (163 lines of code)
    • 1 *.yaml files (85 lines of code)
    • 3 *.html files (51 lines of code)
  • " *.js" is biggest, containing 44.04% of code.
  • " *.html" is smallest, containing 0.39% of code.


*.js5744 LOC (44%) 116 files
*.tsx4658 LOC (35%) 92 files
*.yml1686 LOC (12%) 8 files
*.css657 LOC (5%) 6 files
*.ts163 LOC (1%) 5 files
*.yaml85 LOC (<1%) 1 files
*.html51 LOC (<1%) 3 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • 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/.*".
  • 443 files match defined criteria (54,252 lines of code, 415.9% vs. main code):
    • 349 *.md files (51,471 lines of code)
    • 19 *.json files (1,458 lines of code)
    • 65 *.js files (1,243 lines of code)
    • 7 *.svg files (72 lines of code)
    • 3 *.txt files (8 lines of code)
  • " *.md" is biggest, containing 94.87% of code.
  • " *.txt" is smallest, containing 0.01% of code.


*.md51471 LOC (94%) 349 files
*.json1458 LOC (2%) 19 files
*.js1243 LOC (2%) 65 files
*.svg72 LOC (<1%) 7 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:11