Skip to content

Commit a0e6823

Browse files
committedMar 6, 2025
Include thread-safety rubocop
1 parent 39d8dd7 commit a0e6823

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed
 

‎Gemfile.lock

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ PATH
33
specs:
44
rubocop-shopify (2.15.1)
55
rubocop (~> 1.62)
6+
rubocop-thread_safety
67

78
GEM
89
remote: https://rubygems.org/
@@ -44,6 +45,9 @@ GEM
4445
unicode-display_width (>= 2.4.0, < 4.0)
4546
rubocop-ast (1.38.1)
4647
parser (>= 3.3.1.0)
48+
rubocop-thread_safety (0.7.0)
49+
lint_roller (~> 1.1)
50+
rubocop (~> 1.72, >= 1.72.1)
4751
ruby-progressbar (1.13.0)
4852
unicode-display_width (3.1.4)
4953
unicode-emoji (~> 4.0, >= 4.0.4)

‎bin/sort-cops

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def sort_cops(file_path)
5858
end
5959

6060
if ARGV.empty?
61-
puts "Usage: ruby sort_cops.rb path/to/rubocop.yml"
61+
puts "Usage: ruby sort-cops path/to/rubocop.yml"
6262
exit 1
6363
end
6464

‎rubocop-shopify.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ Gem::Specification.new do |s|
2424
s.required_ruby_version = ">= 3.1.0"
2525

2626
s.add_dependency("rubocop", "~> 1.62")
27+
s.add_dependency("rubocop-thread_safety")
2728
end

‎rubocop.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ inherit_mode:
99
- Exclude
1010
- Include
1111

12+
plugins: rubocop-thread_safety
13+
1214
AllCops:
1315
StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
1416
NewCops: disable # New cops will be triaged by style guide maintainers instead.
@@ -1165,7 +1167,7 @@ Style/MultipleComparison:
11651167
Enabled: false
11661168

11671169
Style/MutableConstant:
1168-
Enabled: false
1170+
Enabled: true
11691171

11701172
Style/NegatedIf:
11711173
Enabled: false
@@ -1549,3 +1551,8 @@ Style/YodaCondition:
15491551

15501552
Style/ZeroLengthPredicate:
15511553
Enabled: false
1554+
1555+
<% if rubocop_version >= "1.67" %>
1556+
ThreadSafety:
1557+
Enabled: true
1558+
<% end %>

0 commit comments

Comments
 (0)
Failed to load comments.