Skip to content

Commit

Permalink
Allow params receiver by default for Style/CollectionMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jul 21, 2024
1 parent e012af8 commit 9584781
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
-e "/gem 'rubocop-performance',/d" \
-e "/gem 'rubocop-rspec',/d" -i Gemfile
cat << EOF > Gemfile.local
gem 'rubocop', '1.33.0' # Specify the oldest supported RuboCop version
gem 'rubocop', '1.52.0' # Specify the oldest supported RuboCop version
EOF
- name: set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#1302](https://github.com/rubocop/rubocop-rails/pull/1302): Allow `params` receiver by default for `Style/CollectionMethods`. ([@koic][])
4 changes: 4 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@ Rails/WhereRange:
Style/AndOr:
EnforcedStyle: conditionals

Style/CollectionCompact:
AllowedReceivers:
- params

Style/FormatStringToken:
AllowedMethods:
- redirect
Expand Down
2 changes: 1 addition & 1 deletion rubocop-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ Gem::Specification.new do |s|
# Rack::Utils::SYMBOL_TO_STATUS_CODE, which is used by HttpStatus cop, was
# introduced in rack 1.1
s.add_dependency 'rack', '>= 1.1'
s.add_dependency 'rubocop', '>= 1.33.0', '< 2.0'
s.add_dependency 'rubocop', '>= 1.52.0', '< 2.0'
s.add_dependency 'rubocop-ast', '>= 1.31.1', '< 2.0'
end

0 comments on commit 9584781

Please sign in to comment.