From 02c93a4850ac64bd41d1cc6e76a0084178878c00 Mon Sep 17 00:00:00 2001 From: Charlie Smurthwaite Date: Thu, 16 Mar 2023 14:49:16 +0000 Subject: [PATCH] style(rubocop): install rubocop configuration --- .gitignore | 1 + .rubocop.yml | 35 +++++++++++++++++++++++++++++++++++ Gemfile | 2 ++ Gemfile.lock | 27 +++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 .rubocop.yml diff --git a/.gitignore b/.gitignore index 4c97c5d..7f537dc 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ vendor/bundle Procfile.local VERSION +.rubocop-https* diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..d857827 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,35 @@ +inherit_from: + - https://dev.k.io/rubocop/rubocop.rails.yml + +Style/StringLiterals: + EnforcedStyle: double_quotes + +Style/WordArray: + EnforcedStyle: brackets + +Layout/LineLength: + Enabled: false + +Metrics/AbcSize: + Enabled: false + +Metrics/BlockLength: + Enabled: false + +Metrics/ClassLength: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + +Metrics/MethodLength: + Enabled: false + +Metrics/ModuleLength: + Enabled: false + +Metrics/PerceivedComplexity: + Enabled: false + +Lint/MissingSuper: + Enabled: false diff --git a/Gemfile b/Gemfile index 6fd707a..d5f5946 100644 --- a/Gemfile +++ b/Gemfile @@ -47,4 +47,6 @@ group :development do gem 'rspec-rails', require: false gem "factory_bot_rails", "~> 4.0", require: false gem "database_cleaner", require: false + gem "rubocop" + gem "rubocop-rails" end diff --git a/Gemfile.lock b/Gemfile.lock index 2f6df08..fca59b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,6 +55,7 @@ GEM activerecord (>= 3.2, < 6.0) rake (>= 10.4, < 13.0) arel (9.0.0) + ast (2.4.2) authie (3.3.1) secure_random_string autoprefixer-rails (9.1.3) @@ -151,6 +152,9 @@ GEM nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) + parallel (1.22.1) + parser (3.2.1.1) + ast (~> 2.4.1) puma (6.1.0) nio4r (~> 2.0) racc (1.6.2) @@ -181,11 +185,14 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) + rainbow (3.1.1) rake (12.3.3) rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) + regexp_parser (2.7.0) resolv (0.2.1) + rexml (3.2.5) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) @@ -207,6 +214,23 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) + rubocop (1.48.1) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.26.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.27.0) + parser (>= 3.2.1.0) + rubocop-rails (2.18.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + ruby-progressbar (1.13.0) sass (3.5.7) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -240,6 +264,7 @@ GEM thread_safe (~> 0.1) uglifier (4.1.18) execjs (>= 0.3.0, < 3) + unicode-display_width (2.4.2) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -283,6 +308,8 @@ DEPENDENCIES resolv (~> 0.2.1) rspec rspec-rails + rubocop + rubocop-rails sass-rails (~> 5.0) secure_headers sentry-raven