-
-
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
Add --exclude-limit to configure --auto-gen-config exclusion count #2004
Conversation
fb31477
to
d015769
Compare
bf270db
to
7d73bc5
Compare
@@ -23,6 +23,12 @@ class << self | |||
attr_accessor :config_to_allow_offenses | |||
end | |||
|
|||
def file_started(_file, file_info) |
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 don't like passing in the args here -- I wish that #started took the cli_options instead of #file_started. But I didn't want to change the API.
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 should note that the code I based this on just set an instance variable inside of the formatter from the cli lib directly, which I also didn't like much -- but I can totally put it back to that if you prefer.
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 way is good, and it's a public API, so you're right in not changing it.
7d73bc5
to
b6b6b83
Compare
@jonas054 Are you going to review this or should I? |
b6b6b83
to
f5d7ed3
Compare
(I keep pushing minor conflict changes to make merging trivial :) ) |
f5d7ed3
to
98d6200
Compare
file `.rubocop_todo.yml` contains configuration to disable cops that | ||
currently detect an offense in the code by excluding the offending | ||
files, or disabling the cop altogether once a file count limit has been | ||
reached (the default is 15 files before the cop is completely disabled). |
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.
It's mentioned further down that the default is 15, so remove the text in parentheses.
Had some comments, but overall it looks good. |
@awwaiid Ping :-) |
98d6200
to
c649865
Compare
OK -- I applied all changes, and mainly ran into some difficulty making the constant in Options; first because I needed to refer to it from OptionsHelp, so I had to move OptionsHelp below options. Second because then a full module-path to the constant was too long to fit as-is in the help strings and still be a short line, so I made a short-name for it. I addressed the other feedback without issue. Open to suggestions :) |
👍 Looks good. I can't think of a better solution for the problems you mention. |
Add --exclude-limit to configure --auto-gen-config exclusion count
👍 Looks good to me as well! Thanks! |
YAY! :) |
I adapted @jonas054 work from #998 here.