-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
audit: Port audit_options rules for new formulae to rubocop and add test #2905
audit: Port audit_options rules for new formulae to rubocop and add test #2905
Conversation
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.
One tiny nit otherwise 👍
|
||
module NewFormulaAudit | ||
class Options < FormulaCop | ||
MSG = "New Formula should not use `deprecated_option`".freeze |
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.
Newline after MSG
(and in general can you go and fix that up for any other occurrences in this or other cops?)
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.
(feel free to do all of them in this PR)
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 checked and found no recurrence in other cops.
32510b6
to
a8f1b02
Compare
Thanks again @GauthamGoli! |
@@ -27,6 +27,9 @@ FormulaAudit/Options: | |||
FormulaAuditStrict/Options: | |||
Enabled: true | |||
|
|||
NewFormulaAudit/Options: | |||
Enabled: true |
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.
@GauthamGoli I've disabled this in 207ffd6 as it was activating for every formula every time.
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.
Looking into it now.
brew tests
with your changes locally?#569
Continuation of #2879 and #2901 . This PR finishes porting of
audit_options
method completely fromaudit.rb
to rubocop.This also introduces a new department of cops
NewFormulaAudit
as the name suggests, cops which execute when--new-formula
flag is passed to audit.