-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Generate 'Exclude' list if different styles is used #3175
Conversation
3faa5f1
to
4177bc5
Compare
@@ -19,6 +19,7 @@ | |||
* [#3140](https://github.com/bbatsov/rubocop/pull/3140): `Style/FrozenStringLiteralComment` works with file doesn't have any tokens. ([@pocke][]) | |||
* [#3154](https://github.com/bbatsov/rubocop/issues/3154): Fix handling of `()` in `Style/RedundantParentheses`. ([@lumeet][]) | |||
* [#3160](https://github.com/bbatsov/rubocop/pull/3160): `Style/Lambda` fix whitespacing when auto-correcting unparenthesized arguments. ([@palkan][]) | |||
* [#3175](https://github.com/bbatsov/rubocop/pull/3175): Generate 'Exclude' list for style cops to `.rubocop_todo.yml` if different styles is used. ([@flexoid][]) |
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.
if different styles are used
And it's not entirely correct to say that it's for style cops, because there are a handful of rails cops that have a configurable enforced style, and they will also be affected by this correction. So say "cops with configurable enforced style" instead.
Code looks good. Just some remarks on the changelog entry. |
0664c09
to
7f02e59
Compare
@jonas054 thanks for your corrections, I just fixed changelog and rebased on master. |
Unfortunately you'll have to rebase this again. |
7f02e59
to
aa47893
Compare
@bbatsov no problem, done |
Are you sure? I still see a merge conflict. |
Before, if mixed styles of the specific cop are used across project files, some of the cops set 'Enabled: false' regardless of the count of files with offense and "--exclude-limit" argument.
aa47893
to
f9ed49b
Compare
Master is changing so quickly :) Should be mergeable until next PR. |
Before, if mixed styles of the specific cop are used across project files, some of the cops set 'Enabled: false' regardless of the count of files with offense and "--exclude-limit" argument.
If mixed styles of the specific cop is used across project files,
some of the cops (probably all style cops) now set 'Enabled: false'
regardless of the count of files with offense and "--exclude-limit" argument.
For example:
.rubocop_todo.yml
for the following ruby code was (with any--exclude-limit
value):Now it will be like this, as expected:
With
--exclude-limit 0
:And with
m2
method commented: