Skip to content

Commit 0f63f00

Browse files
authored
Merge pull request #1302 from koic/make_style_collection_compact_aware_of_params
Allow `params` receiver by default for `Style/CollectionMethods`
2 parents fd14e47 + 9584781 commit 0f63f00

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
-e "/gem 'rubocop-performance',/d" \
9494
-e "/gem 'rubocop-rspec',/d" -i Gemfile
9595
cat << EOF > Gemfile.local
96-
gem 'rubocop', '1.33.0' # Specify the oldest supported RuboCop version
96+
gem 'rubocop', '1.52.0' # Specify the oldest supported RuboCop version
9797
EOF
9898
- name: set up Ruby
9999
uses: ruby/setup-ruby@v1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [#1302](https://github.com/rubocop/rubocop-rails/pull/1302): Allow `params` receiver by default for `Style/CollectionMethods`. ([@koic][])

config/default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,10 @@ Rails/WhereRange:
12341234
Style/AndOr:
12351235
EnforcedStyle: conditionals
12361236

1237+
Style/CollectionCompact:
1238+
AllowedReceivers:
1239+
- params
1240+
12371241
Style/FormatStringToken:
12381242
AllowedMethods:
12391243
- redirect

rubocop-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Gem::Specification.new do |s|
3535
# Rack::Utils::SYMBOL_TO_STATUS_CODE, which is used by HttpStatus cop, was
3636
# introduced in rack 1.1
3737
s.add_dependency 'rack', '>= 1.1'
38-
s.add_dependency 'rubocop', '>= 1.33.0', '< 2.0'
38+
s.add_dependency 'rubocop', '>= 1.52.0', '< 2.0'
3939
s.add_dependency 'rubocop-ast', '>= 1.31.1', '< 2.0'
4040
end

0 commit comments

Comments
 (0)