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

components_order_cop: add all components #4863

Merged
merged 3 commits into from
Sep 21, 2018
Merged

components_order_cop: add all components #4863

merged 3 commits into from
Sep 21, 2018

Conversation

commitay
Copy link
Contributor

@commitay commitay commented Sep 9, 2018

  • 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 style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Follow up to #4113

I said in #4113 (comment):

Adding them individually would be a bit easier to do (and review)

They actually aren't, adding them individually means that some formulae end up needing multiple changes.

Currently ≈ 110 130 formulae need changes to pass audit with the components in this order.

This seems to the the "standard" order for these components but I can change it if this isn't the preferred order.

I've probably missed one or two of the less common components as well, shout at me and I'll add them.

I think we should do this now so it's easier expand this cop to include stable/devel/head blocks later. The same applies if we're going to add more components (IIRC moving livecheck to formulae was mentioned.)

I'll submit the necessary changes to core if people are 👍.


https://github.com/Homebrew/homebrew-core/blob/master/Formula/php.rb#L297-L299

  def php_version
    version.to_s.split(".")[0..1].join(".")
  end

Just as a note, this cop doesn't handle stuff like this, so we probably need an generic method_definition sort as well, but that's another PR.

@ghost ghost assigned commitay Sep 9, 2018
@ghost ghost added the in progress Maintainers are working on this label Sep 9, 2018
@MikeMcQuaid
Copy link
Member

Thanks @commitay for doing this. Feel free to 🚢 when you're happy with it.

@commitay
Copy link
Contributor Author

Options being removed from formulae is making the changes that would be needed for this and #4862 unnecessary for some formulae as they are either fixed or removed.

Leaving this and #4862 on hold while options removal is ongoing.

@MikeMcQuaid
Copy link
Member

@commitay Works for me 👍

@MikeMcQuaid
Copy link
Member

@commitay For what it's worth I think a mass cleanup PR where you brew audit --fix, check the diff yourself and then merge without it going through CI would be reasonable if you felt like that approach. If not: no worries! Thanks for doing this ❤️

@commitay commitay merged commit 108999f into Homebrew:master Sep 21, 2018
@commitay commitay deleted the component-order branch September 21, 2018 05:07
@ghost ghost removed the in progress Maintainers are working on this label Sep 21, 2018
@commitay commitay removed their assignment Sep 21, 2018
@lock lock bot added the outdated PR was locked due to age label Oct 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants