Skip to content

Commit f1d087c

Browse files
committed
Reduce minimum RuboCop version back to ~> 1.51
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.
1 parent e8e8718 commit f1d087c

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
rubocop-shopify (2.14.0)
5-
rubocop (~> 1.53)
5+
rubocop (~> 1.51)
66

77
GEM
88
remote: https://rubygems.org/

rubocop-shopify.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
2323

2424
s.required_ruby_version = ">= 2.7.0"
2525

26-
s.add_dependency("rubocop", "~> 1.53")
26+
s.add_dependency("rubocop", "~> 1.51")
2727
end

rubocop.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ Lint/LiteralAssignmentInCondition:
202202
Enabled: true
203203
<% end %>
204204

205+
<% if rubocop_version >= "1.53" %>
205206
Lint/MixedCaseRange:
206207
Enabled: true
208+
<% end %>
207209

208210
Lint/MixedRegexpCaptureTypes:
209211
Enabled: false
@@ -238,8 +240,10 @@ Lint/RaiseException:
238240
Lint/RedundantDirGlobSort:
239241
Enabled: false
240242

243+
<% if rubocop_version >= "1.53" %>
241244
Lint/RedundantRegexpQuantifiers:
242245
Enabled: true
246+
<% end %>
243247

244248
Lint/RedundantRequireStatement:
245249
Enabled: false
@@ -726,8 +730,10 @@ Style/RandomWithOffset:
726730
Style/RedundantArgument:
727731
Enabled: false
728732

733+
<% if rubocop_version >= "1.52" %>
729734
Style/RedundantArrayConstructor:
730735
Enabled: true
736+
<% end %>
731737

732738
Style/RedundantAssignment:
733739
Enabled: false
@@ -741,8 +747,10 @@ Style/RedundantConditional:
741747
Style/RedundantConstantBase:
742748
Enabled: true
743749

750+
<% if rubocop_version >= "1.53" %>
744751
Style/RedundantCurrentDirectoryInPath:
745752
Enabled: true
753+
<% end %>
746754

747755
Style/RedundantDoubleSplatHashBraces:
748756
Enabled: true
@@ -756,8 +764,10 @@ Style/RedundantFetchBlock:
756764
Style/RedundantFileExtensionInRequire:
757765
Enabled: false
758766

767+
<% if rubocop_version >= "1.52" %>
759768
Style/RedundantFilterChain:
760769
Enabled: true
770+
<% end %>
761771

762772
Style/RedundantHeredocDelimiterQuotes:
763773
Enabled: true
@@ -768,14 +778,18 @@ Style/RedundantInitialize:
768778
Style/RedundantLineContinuation:
769779
Enabled: true
770780

781+
<% if rubocop_version >= "1.53" %>
771782
Style/RedundantRegexpArgument:
772783
Enabled: true
784+
<% end %>
773785

774786
Style/RedundantRegexpCharacterClass:
775787
Enabled: false
776788

789+
<% if rubocop_version >= "1.52" %>
777790
Style/RedundantRegexpConstructor:
778791
Enabled: true
792+
<% end %>
779793

780794
Style/RedundantRegexpEscape:
781795
Enabled: false
@@ -801,8 +815,10 @@ Style/RescueStandardError:
801815
Style/ReturnNil:
802816
Enabled: true
803817

818+
<% if rubocop_version >= "1.53" %>
804819
Style/ReturnNilInPredicateMethodDefinition:
805820
Enabled: true
821+
<% end %>
806822

807823
Style/SelectByRegexp:
808824
Enabled: false
@@ -874,8 +890,10 @@ Style/UnpackFirst:
874890
Style/WordArray:
875891
EnforcedStyle: brackets
876892

893+
<% if rubocop_version >= "1.53" %>
877894
Style/YAMLFileRead:
878895
Enabled: true
896+
<% end %>
879897

880898
Style/YodaCondition:
881899
Enabled: false

0 commit comments

Comments
 (0)