-
Notifications
You must be signed in to change notification settings - Fork 52
Bump rubocop from 1.75.8 to 1.76.0 in the rubocop group #736
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
Conversation
Bumps the rubocop group with 1 update: [rubocop](https://github.com/rubocop/rubocop). Updates `rubocop` from 1.75.8 to 1.76.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v1.75.8...v1.76.0) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.76.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rubocop ... Signed-off-by: dependabot[bot] <[email protected]>
This cop has been renamed, so we conditionally set the config depending on RuboCop version.
As of `[email protected]`, our config matches the default, so we should not configure it.
6f79835 to
1a90daa
Compare
| <% if rubocop_version < "1.76" %> | ||
| Lint/ShadowingOuterLocalVariable: | ||
| Enabled: false | ||
| <% end %> |
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 now the default, so we only want to keep configuring it for old RuboCop versions.
| <% if rubocop_version >= "1.76" %> | ||
| Lint/UselessDefaultValueArgument: | ||
| Enabled: true | ||
| <% end %> |
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.
https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessdefaultvalueargument
This seems like a good idea, although I do notice that there's an example of including Rails.cache in the AllowedReceivers config. We should see what the results are of running this against Core. If there are many false positives (beyond Rails.cache), it may not be worth enabling.
| <% if rubocop_version >= "1.76" %> | ||
| Lint/UselessOr: | ||
| Enabled: true | ||
| <% end %> |
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.
https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessor
This seems unambiguous.
| <% if rubocop_version >= "1.76" %> | ||
| Naming/PredicateMethod: | ||
| Enabled: true | ||
| <% end %> |
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.
https://docs.rubocop.org/rubocop/cops_naming.html#namingpredicatemethod
This seems nice, but I'm curious about false positives, especially in contexts where we have to use non-? suffixed "predicate" methods (e.g. is_foo as a GraphQL field method).
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.
Disabled, as per #736 (comment)
| <% if rubocop_version >= "1.76" %> | ||
| Naming/PredicatePrefix: | ||
| <% else %> | ||
| Naming/PredicateName: | ||
| <% end %> |
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 just handles the cop being renamed. We may want to backport this so consumers don't get the warning.
| <% if rubocop_version >= "1.76" %> | ||
| Style/EmptyStringInsideInterpolation: | ||
| Enabled: false | ||
| <% end %> |
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.
https://docs.rubocop.org/rubocop/cops_style.html#styleemptystringinsideinterpolation
This controls the preference between
"...#{var ? "foo" : ""}...#{var ? "" : "bar"}..."
# or
"...#{"foo" if var}...#{"bar" unless var}..."defaulting to preferring the latter.
I personally agree with it, but my gut feeling following the "Great Reset" is that we shouldn't enable this and leave it up to the author.
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.
Yes, that is right.
| <% if rubocop_version >= "1.76" %> | ||
| Style/RedundantArrayFlatten: | ||
| Enabled: true | ||
| <% end %> |
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.
https://docs.rubocop.org/rubocop/cops_style.html#styleredundantarrayflatten
While this is a Style cop, it is also an optimization, as it avoids the work of the redundant flattening operation, so I think we should enable it.
| - ruby | ||
| - bundler | ||
|
|
||
| test: bundle exec rake |
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.
🤷 I just want dev test due to habit.
1a90daa to
ccbb378
Compare
Bumps the rubocop group with 1 update: rubocop.
Updates
rubocopfrom 1.75.8 to 1.76.0Release notes
Sourced from rubocop's releases.
Changelog
Sourced from rubocop's changelog.
Commits
190a64dCut 1.76f62809dUpdate Changelog329b580UseRuboCop::AST::Node#any_match_pattern_type?method9368339[Fix #14228] Fix false positive forStyle/RedundantParentheses16efaa9Merge pull request #14226 from Zopolis4/standeeaf29d5cFixLint/LiteralAsConditionautocorrect when branches of a condition have c...173db55Add new cop Lint/UselessOrc977defMerge pull request #14225 from viralpraxis/fix-style-empty-string-inside-inte...fac13c5FixStyle/EmptyStringInsideInterpolationcop error on non-string literal25a7eefFix false negatives forStyle/RedundantParenthesesDependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions