License style cleanup#8411
Merged
MikeMcQuaid merged 5 commits intoHomebrew:masterfrom Aug 21, 2020
Rylan12:license-rubocop
Merged
License style cleanup#8411MikeMcQuaid merged 5 commits intoHomebrew:masterfrom Rylan12:license-rubocop
MikeMcQuaid merged 5 commits intoHomebrew:masterfrom
Rylan12:license-rubocop
Conversation
5 tasks
MikeMcQuaid
approved these changes
Aug 21, 2020
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Great work as usual @Rylan12!
MikeMcQuaid
reviewed
Aug 21, 2020
Contributor
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew stylewith your changes locally?brew testswith your changes locally?This PR does a few things:
licensemethod rather than on-demand when needed by e.g. audit. This means that callingformula.licensewill always return either a string, symbol, or hash.license [...]is called. This message would show up when runningbrew audit,brew install, etc.brew styleforbids using license arrays.brew style --fixwill automatically correct license arrays to an:any_ofhash.brew stylerequires using multiple lines for license expressions if there are nested hashed. This means thatlicense any_of: ["MIT", "0BSD"]is allowed butlicense any_of: ["MIT", "0BSD" => { with: "LLVM-exception" }]is not.