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

Projects
None yet
2 participants
@GauthamGoli
Copy link
Member

GauthamGoli commented Jul 15, 2017

  • 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.

@MikeMcQuaid
Copy link
Member

MikeMcQuaid left a comment

One tiny nit otherwise 👍


module NewFormulaAudit
class Options < FormulaCop
MSG = "New Formula should not use `deprecated_option`".freeze

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Jul 15, 2017

Member

Newline after MSG (and in general can you go and fix that up for any other occurrences in this or other cops?)

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Jul 15, 2017

Member

(feel free to do all of them in this PR)

This comment has been minimized.

@GauthamGoli

GauthamGoli Jul 15, 2017

Member

I checked and found no recurrence in other cops.

@GauthamGoli GauthamGoli force-pushed the GauthamGoli:audit_option_rubocop_3 branch from 32510b6 to a8f1b02 Jul 15, 2017

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 15, 2017

Thanks again @GauthamGoli!

@MikeMcQuaid MikeMcQuaid merged commit ce1b26d into Homebrew:master Jul 15, 2017

3 checks passed

codecov/patch 66.66% of diff hit (target 65.74%)
Details
codecov/project 65.75% (+<.01%) compared to 83f6183
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GauthamGoli GauthamGoli deleted the GauthamGoli:audit_option_rubocop_3 branch Jul 15, 2017

@@ -27,6 +27,9 @@ FormulaAudit/Options:
FormulaAuditStrict/Options:
Enabled: true

NewFormulaAudit/Options:
Enabled: true

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Jul 15, 2017

Member

@GauthamGoli I've disabled this in 207ffd6 as it was activating for every formula every time.

This comment has been minimized.

@GauthamGoli

GauthamGoli Jul 15, 2017

Member

Looking into it now.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.