-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bundle update rubocop --conservative #50515
Conversation
@@ -1694,7 +1694,7 @@ def test_route_with_subdomain_and_constraints_must_receive_params | |||
set.draw do | |||
get "page/:name" => "pages#show", :constraints => lambda { |request| | |||
name_param = request.params[:name] | |||
return true | |||
true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't like this rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess that's why I'd be keen to get Rails under omakase style too.
@@ -784,7 +784,7 @@ def link_to_remote_options?(options) | |||
end | |||
|
|||
def add_method_to_attributes!(html_options, method) | |||
if method_not_get_method?(method) && !html_options["rel"]&.match?(/nofollow/) | |||
if method_not_get_method?(method) && !html_options["rel"]&.include?("nofollow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems like an odd choice. Maybe fine but it's in the wrong PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(linking for context) Performance/StringInclude
was enabled in #45865
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Not sure about this one either! But yes, should be in compliance with the rules as they currently are. Just think that needs to happen in a clear PR separate from a dependency bump.
I'm not sure I understand the reasoning here. The rules are already being enforced but bumping RuboCop is bringing in bug fixes that cause these two code changes to only be warned on now. |
The dependency bump is broad, bumps all sorts of stuff. The new rubocop rules are specific, and should just get their own explaining PR. Or you can split the dep bump into "just rubocop, plus new rules" and "everything else". |
Got it, the transitive dependencies are being bumped as well but really we should bump the minimum (only |
268f548
to
f6aea39
Compare
* main: Add a default yield :head to layouts/application.html.erb (rails#50527) Switch to new enum syntax in example code [ci-skip] Utilize new enum syntax Apply autocorrection by RuboCop to files generated by `bin/rails generate` (rails#50506) Add brakeman as development dependency Fix skipped rubocop test typo (rails#50519) Update the puma startup message docs: remove unneeded whitespace from start of code blocks Add changelog entry for rails#50512 Remove unnecessary require Fix railspect not validating alphabetical order
Style/RedundantReturn
Performance/StringInclude
When attempting to update Gemfile.lock for Ruby 3.3.0 (#50516), there were a few new warnings raised by RuboCop. This commit splits out just the RuboCop update with fixes for the new warnings introduced.