-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
build(deps): bump rubocop-rails from 2.17.4 to 2.18.0 in /Library/Homebrew #14842
build(deps): bump rubocop-rails from 2.17.4 to 2.18.0 in /Library/Homebrew #14842
Conversation
14d62b7
to
66e3adf
Compare
928d916
to
ab82489
Compare
@@ -1,11 +1,13 @@ | |||
# typed: false | |||
# frozen_string_literal: true | |||
|
|||
# Disable Rails cops, as we haven't required active_support yet. | |||
# rubocop:disable Rails |
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 is tangential, but I've disabled Rails cops in this file based on the comments on the previous disables below
@@ -53,7 +53,7 @@ def audit_desc(type, name, desc_call) | |||
desc_problem "Description shouldn't start with an article." if regex_match_group(desc, /^(the|an?)(?=\s)/i) | |||
|
|||
# Check if invalid lowercase words are at the start of a desc. | |||
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && | |||
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && # rubocop:disable Style/InverseMethods (false positive) |
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 triggered errors when i applied the autocorrect, so I've disabled the cop instead
@@ -112,7 +112,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) | |||
end | |||
|
|||
def check_on_system_block_content(component_precedence_list, on_system_block) | |||
if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) | |||
if on_system_block.body.block_type? && on_system_methods.exclude?(on_system_block.body.method_name) |
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.
Not sure if this is also a false positive, as in the other violation in this directory below. We might want to disable it anyway, as we have comments elsewhere to avoid using ActiveSupport in rubocops (though we make extensive use of present?
)
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.
@MikeMcQuaid PTAL, I was able to reproduce and fix the violations locally. (A related question: why isn't |
because it's pretty "rubocop internals" heavy and most folks using this tools don't care about |
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.
Great work fixing this, thanks @dduugg!
Ah ok, FWIW, I work with rubocop often, and I still need to google the cop name regularly to figure out what to do with a violation. |
ab82489
to
733813e
Compare
@@ -53,7 +53,7 @@ def audit_desc(type, name, desc_call) | |||
desc_problem "Description shouldn't start with an article." if regex_match_group(desc, /^(the|an?)(?=\s)/i) | |||
|
|||
# Check if invalid lowercase words are at the start of a desc. | |||
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && | |||
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && # rubocop:disable Style/InverseMethods (false positive) |
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.
Is it a false positive? Is it not just because we don't have that part of ActiveSupport required for cops and we've not excluded these files from this check like we already do with Rails
?
Edit: Oh wait I see - they've taken a native RuboCop check and extended it... To be honest I don't understand why they've done that but also have Rails/NegateInclude
- is there any difference? It is possible to disable the ActiveSupport parts of Style/InverseMethods
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.
Is it a false positive? Is it not just because we don't have that part of ActiveSupport required for cops and we've not excluded these files from this check like we already do with Rails?
Yes to both, I consider the latter to be a false positive (meaning "this code is correct, rubocop should be ignored" not "rubocop has a point, but we've chosen to do something else"), but i'm open to a different wording. What do you suggest?
Edit: Oh wait I see - they've taken a native RuboCop check and extended it... To be honest I don't understand why they've done that but also have Rails/NegateInclude - is there any difference? It is possible to disable the ActiveSupport parts of Style/InverseMethods
I don't think there's a difference. I've filed rubocop/rubocop-rails#941 in the meantime. I describe a couple solutions there, I think I'd prefer the inline disable here in the meantime. Let me know what you'd like to do here.
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.17.4 to 2.18.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop-rails@v2.17.4...v2.18.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
733813e
to
ef2baee
Compare
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
Bumps rubocop-rails from 2.17.4 to 2.18.0.
Changelog
Sourced from rubocop-rails's changelog.
Commits
fa6662f
Cut 2.18.01a791ec
Update Changelogc532db1
Fix a false negative for Rails/ActionControllerTestCasee179054
Merge pull request #936 from koic/make_style_inverse_methods_aware_of_valid_a...9ff0c4d
Merge pull request #937 from koic/fix_a_false_positive_for_rails_action_contr...e9bb19f
SuppressInternalAffairs/ProcessedSourceBufferName
's offensead0fec1
[Fix #909] Fix a false positive forRails/ActionControllerFlashBeforeRender
ecd9fbe
[Fix #914] MakeStyle/InverseMethods
aware ofvalid?
andinvalid?
methods81b0fdc
Merge pull request #935 from koic/make_style_inverse_methods_aware_of_active_...b74740a
MakeStyle/InverseMethods
aware of some Active Support methodsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)