Skip to content

Commit

Permalink
Reduce minimum RuboCop version back to ~> 1.51
Browse files Browse the repository at this point in the history
Since we're introducing the

    <% if rubocop_version >= "X.YZ"
    Dept/Cop:
      Enabled: true
    <% end %>

approach to configuring RuboCop without requiring a specific version of
the gem (ahead of supporting plugin configs), we should just use that
approach to avoid changing the minimum required version in the next
release.
  • Loading branch information
sambostock committed Feb 14, 2024
1 parent e8e8718 commit f1d087c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rubocop-shopify (2.14.0)
rubocop (~> 1.53)
rubocop (~> 1.51)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion rubocop-shopify.gemspec
Expand Up @@ -23,5 +23,5 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 2.7.0"

s.add_dependency("rubocop", "~> 1.53")
s.add_dependency("rubocop", "~> 1.51")
end
18 changes: 18 additions & 0 deletions rubocop.yml
Expand Up @@ -202,8 +202,10 @@ Lint/LiteralAssignmentInCondition:
Enabled: true
<% end %>

<% if rubocop_version >= "1.53" %>
Lint/MixedCaseRange:
Enabled: true
<% end %>

Lint/MixedRegexpCaptureTypes:
Enabled: false
Expand Down Expand Up @@ -238,8 +240,10 @@ Lint/RaiseException:
Lint/RedundantDirGlobSort:
Enabled: false

<% if rubocop_version >= "1.53" %>
Lint/RedundantRegexpQuantifiers:
Enabled: true
<% end %>

Lint/RedundantRequireStatement:
Enabled: false
Expand Down Expand Up @@ -726,8 +730,10 @@ Style/RandomWithOffset:
Style/RedundantArgument:
Enabled: false

<% if rubocop_version >= "1.52" %>
Style/RedundantArrayConstructor:
Enabled: true
<% end %>

Style/RedundantAssignment:
Enabled: false
Expand All @@ -741,8 +747,10 @@ Style/RedundantConditional:
Style/RedundantConstantBase:
Enabled: true

<% if rubocop_version >= "1.53" %>
Style/RedundantCurrentDirectoryInPath:
Enabled: true
<% end %>

Style/RedundantDoubleSplatHashBraces:
Enabled: true
Expand All @@ -756,8 +764,10 @@ Style/RedundantFetchBlock:
Style/RedundantFileExtensionInRequire:
Enabled: false

<% if rubocop_version >= "1.52" %>
Style/RedundantFilterChain:
Enabled: true
<% end %>

Style/RedundantHeredocDelimiterQuotes:
Enabled: true
Expand All @@ -768,14 +778,18 @@ Style/RedundantInitialize:
Style/RedundantLineContinuation:
Enabled: true

<% if rubocop_version >= "1.53" %>
Style/RedundantRegexpArgument:
Enabled: true
<% end %>

Style/RedundantRegexpCharacterClass:
Enabled: false

<% if rubocop_version >= "1.52" %>
Style/RedundantRegexpConstructor:
Enabled: true
<% end %>

Style/RedundantRegexpEscape:
Enabled: false
Expand All @@ -801,8 +815,10 @@ Style/RescueStandardError:
Style/ReturnNil:
Enabled: true

<% if rubocop_version >= "1.53" %>
Style/ReturnNilInPredicateMethodDefinition:
Enabled: true
<% end %>

Style/SelectByRegexp:
Enabled: false
Expand Down Expand Up @@ -874,8 +890,10 @@ Style/UnpackFirst:
Style/WordArray:
EnforcedStyle: brackets

<% if rubocop_version >= "1.53" %>
Style/YAMLFileRead:
Enabled: true
<% end %>

Style/YodaCondition:
Enabled: false

0 comments on commit f1d087c

Please sign in to comment.