reactjs / react-rails
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
coffee
ru
babelrc
rdoc
txt
pryrc
  • 18 extensions are included in analyses: rb, js, jsx, erb, md, yml, coffee, html, json, css, ru, babelrc, gitignore, rdoc, txt, pryrc, tsx, gemspec
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (12 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (2 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (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).
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.

main1799 LOC (31%) 49 files
test2683 LOC (46%) 159 files
generated0 LOC (0%) 0 files
build and deployment55 LOC (<1%) 2 files
other1209 LOC (21%) 13 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
coffee
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 49 files match defined criteria (1,799 lines of code, 100.0% vs. main code):
    • 26 *.rb files (986 lines of code)
    • 18 *.js files (694 lines of code)
    • 1 *.gemspec files (39 lines of code)
    • 2 *.jsx files (38 lines of code)
    • 1 *.tsx files (28 lines of code)
    • 1 *.coffee files (14 lines of code)
  • " *.rb" is biggest, containing 54.81% of code.
  • " *.coffee" is smallest, containing 0.78% of code.


*.rb986 LOC (54%) 26 files
*.js694 LOC (38%) 18 files
*.gemspec39 LOC (2%) 1 files
*.jsx38 LOC (2%) 2 files
*.tsx28 LOC (1%) 1 files
*.coffee14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
coffee
ru
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 ".*/test_.*".
  • 159 files match defined criteria (2,683 lines of code, 149.1% vs. main code):
    • 71 *.rb files (1,810 lines of code)
    • 6 *.html files (316 lines of code)
    • 35 *.js files (197 lines of code)
    • 19 *.jsx files (189 lines of code)
    • 15 *.erb files (97 lines of code)
    • 3 *.yml files (46 lines of code)
    • 6 *.coffee files (22 lines of code)
    • 2 *.ru files (4 lines of code)
    • 2 *.css files (2 lines of code)
  • " *.rb" is biggest, containing 67.46% of code.
  • " *.css" is smallest, containing 0.07% of code.


*.rb1810 LOC (67%) 71 files
*.html316 LOC (11%) 6 files
*.js197 LOC (7%) 35 files
*.jsx189 LOC (7%) 19 files
*.erb97 LOC (3%) 15 files
*.yml46 LOC (1%) 3 files
*.coffee22 LOC (<1%) 6 files
*.ru4 LOC (<1%) 2 files
*.css2 LOC (<1%) 2 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
  • 2 files match defined criteria (55 lines of code, 3.1% vs. main code). All matches are in *.js files.


*.js55 LOC (100%) 2 files
Other Code
rdoc
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 ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
  • 13 files match defined criteria (1,209 lines of code, 67.2% vs. main code):
    • 6 *.md files (1,019 lines of code)
    • 5 *.json files (160 lines of code)
    • 2 *.rdoc files (30 lines of code)
  • " *.md" is biggest, containing 84.28% of code.
  • " *.rdoc" is smallest, containing 2.48% of code.


*.md1019 LOC (84%) 6 files
*.json160 LOC (13%) 5 files
*.rdoc30 LOC (2%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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
  • *.gemspec files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.jsx 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
  • *.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
  • *.coffee files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-04-16 07:06