Skip to content

Commit

Permalink
Upgrade rubocop the rest of the way
Browse files Browse the repository at this point in the history
Hound doesn't support any higher than this as of yet.
  • Loading branch information
cooperka committed Jun 29, 2020
1 parent 7c85711 commit cfd1f24
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ fail_on_violations: true
ruby:
enabled: true
config_file: .rubocop.yml
rubocop:
version: 0.83.0
eslint:
enabled: false
config_file: .eslintrc.yml
Expand Down
33 changes: 20 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require: rubocop-rails

# Disable defaults
AllCops:
# Enable future cops not specified here.
NewCops: enable
Exclude:
- "bin/**/*"
- "db/schema.rb"
Expand All @@ -9,7 +13,10 @@ AllCops:
- "vendor/**/*"
- "node_modules/**/*"

Layout/AlignParameters:
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation

Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation

Layout/CaseIndentation:
Expand All @@ -18,13 +25,13 @@ Layout/CaseIndentation:
Layout/EmptyLineAfterGuardClause:
Enabled: false

Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent

Layout/IndentFirstArrayElement:
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent

Layout/IndentFirstHashElement:
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Layout/MultilineMethodCallIndentation:
Expand All @@ -36,7 +43,14 @@ Layout/MultilineOperationIndentation:
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/UnneededCopDisableDirective:
Layout/LineLength:
Enabled: true
Max: 110
IgnoredPatterns:
# Test descriptors
- ^\s*(describe|it|context|scenario) ".+" do$

Lint/RedundantCopDisableDirective:
Enabled: false

Metrics/BlockLength:
Expand All @@ -52,13 +66,6 @@ Metrics/ClassLength:
Metrics/CyclomaticComplexity:
Enabled: false

Metrics/LineLength:
Enabled: true
Max: 110
IgnoredPatterns:
# Test descriptors
- ^\s*(describe|it|context|scenario) ".+" do$

Metrics/MethodLength:
Max: 12

Expand All @@ -71,7 +78,7 @@ Metrics/PerceivedComplexity:
Metrics/ParameterLists:
CountKeywordArgs: false

Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
AllowedNames:
- _
- a
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ group :development, :test do
gem "awesome_print", "~> 1.6.1"
gem "database_cleaner", "~> 1.7.0"
gem "db-query-matchers", "~> 0.9"
gem "rubocop", "~> 0.71.0"
gem "rubocop", "~> 0.83.0"
gem "rubocop-rails", "~> 2.6"
gem "timecop", "~> 0.7.3"
end
21 changes: 13 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ GEM
activerecord (>= 3.0)
ipaddress (0.8.3)
iso-639 (0.2.8)
jaro_winkler (1.5.4)
jasmine-core (2.99.2)
jasmine-rails (0.10.8)
jasmine-core (>= 1.3, < 3.0)
Expand Down Expand Up @@ -434,7 +433,7 @@ GEM
railties (>= 3.2)
tilt
recaptcha (0.4.0)
regexp_parser (1.7.0)
regexp_parser (1.7.1)
request_store (1.4.1)
rack (>= 1.4)
responders (2.4.0)
Expand All @@ -446,6 +445,7 @@ GEM
netrc (~> 0.8)
reverse_markdown (1.0.5)
nokogiri
rexml (3.2.4)
roo (2.1.1)
nokogiri (~> 1)
rubyzip (~> 1.1, < 2.0.0)
Expand Down Expand Up @@ -474,13 +474,17 @@ GEM
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rubocop (0.71.0)
jaro_winkler (~> 1.5.1)
rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 2.6)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-rails (2.6.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.82.0)
ruby-graphviz (1.2.4)
ruby-jmeter (2.13.10)
nokogiri
Expand Down Expand Up @@ -551,7 +555,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.6.1)
unicode-display_width (1.7.0)
unicode_utils (1.4.0)
uniform_notifier (1.13.0)
versionist (1.4.1)
Expand Down Expand Up @@ -666,7 +670,8 @@ DEPENDENCIES
rqrcode (~> 0.10.1)
rspec-collection_matchers (~> 1.1.3)
rspec-rails (~> 3.7.2)
rubocop (~> 0.71.0)
rubocop (~> 0.83.0)
rubocop-rails (~> 2.6)
ruby-jmeter (~> 2.13.4)
rubyzip (~> 1.3)
scout_apm (~> 2.6)
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
end

# Special SMS routes. No locale.
def sms_submission_route(as:) # rubocop:disable Naming/UncommunicativeMethodParamName
def sms_submission_route(as:) # rubocop:disable Naming/MethodParameterName
match("/sms/submit/:token", to: "sms#create", token: /[0-9a-f]{32}/, via: %i[get post], as: as)
end
scope "/m/:mission_name", mission_name: /[a-z][a-z0-9]*/, defaults: {mode: "m"} do
Expand Down

0 comments on commit cfd1f24

Please sign in to comment.