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

audit: Port audit_options rules for new formulae to rubocop and add test #2905

Merged
merged 1 commit into from
Jul 15, 2017

Conversation

GauthamGoli
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

#569
Continuation of #2879 and #2901 . This PR finishes porting of audit_options method completely from audit.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.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a 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
Copy link
Member

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?)

Copy link
Member

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)

Copy link
Contributor Author

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.

@GauthamGoli GauthamGoli force-pushed the audit_option_rubocop_3 branch from 32510b6 to a8f1b02 Compare July 15, 2017 12:06
@MikeMcQuaid
Copy link
Member

Thanks again @GauthamGoli!

@MikeMcQuaid MikeMcQuaid merged commit ce1b26d into Homebrew:master Jul 15, 2017
@GauthamGoli GauthamGoli deleted the audit_option_rubocop_3 branch July 15, 2017 13:05
@@ -27,6 +27,9 @@ FormulaAudit/Options:
FormulaAuditStrict/Options:
Enabled: true

NewFormulaAudit/Options:
Enabled: true
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants