Skip to content
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 .rubocop_todo.yml without any exclude limit #10409

Closed
andyw8 opened this issue Feb 10, 2022 · 2 comments · Fixed by #11036
Closed

Generate .rubocop_todo.yml without any exclude limit #10409

andyw8 opened this issue Feb 10, 2022 · 2 comments · Fixed by #11036

Comments

@andyw8
Copy link
Contributor

andyw8 commented Feb 10, 2022

(Apologies if this has been discussed previously, it's hard to search for with such a large issue volume.)

Is your feature request related to a problem? Please describe.

When setting up RuboCop on a project with a lot of existing offences, running --auto-gen-config results in many cops being entirely disabled (because there are more than the default limit of 15 occurrences).

To avoid that, I typically pass --exclude-limit with an arbitrary high limit such as 999999.

Describe the solution you'd like

I'd like to have a cleaner way to specify that no limit should supply, e.g:

  • --exclude-limit=0 (treat 0 as a special indicator)
  • --exclude-limit=-1 (treat any negative number as a special indicator)
  • --no-exclude-limit

Describe alternatives you've considered

n/a

Additional context

n/a

@jonas054
Copy link
Collaborator

I would rule out --exclude-limit=0 beacuse it breaks compatibility. It can currently be used with the opposite purpose; to generate a todo file with no Exclude parameters.

Of the remaining two I like --no-exclude-limit the best, as I think using -1 is not entirely logical.

@andyw8
Copy link
Contributor Author

andyw8 commented Nov 20, 2022

Thanks for implementing this @r7kamura!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants