Match the "formula name in description" on word boundaries#2687
Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom May 29, 2017
Merged
Match the "formula name in description" on word boundaries#2687MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
Conversation
224c66e to
93ecaae
Compare
Contributor
|
Thanks @issyl0 for finding this bug and the PR! |
bfontaine
reviewed
May 28, 2017
Contributor
There was a problem hiding this comment.
You can drop the first \b; ^ already ensures it’s the first word.
Member
Author
There was a problem hiding this comment.
Thanks. I've amended my commit.
- The regexp for the "check if formula name is used in formula's description" cop matches every instance of the formula name if it exists, whether it's in a word or not. - For example, the formula `mon` has the description "Monitor hosts/services/whatever and alert about problems". This makes `brew audit --strict` complain because it matches "Monitor", which isn't the formula name! The formula `pass` has the description "Password manager". Again, the strict audit matches "Password", which isn't an issue. - Instead, this change matches on a word boundary, so it will match `mon:`, or `mon `, but not "Monitor", or, for example, "harmony". - I've changed the tests to account for this change.
93ecaae to
279a4df
Compare
MikeMcQuaid
approved these changes
May 29, 2017
Member
|
Thanks for your first contribution to Homebrew, @issyl0! Without people like you submitting PRs we couldn't run this project. You rock! |
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 testswith your changes locally?description" cop matches every instance of the formula name if it
exists, whether it's in a word or not.
monhas the description "Monitorhosts/services/whatever and alert about problems". This makes
brew audit --strictcomplain because it matches "Monitor",which isn't the formula name! The formula
passhas the description"Password manager". Again, the strict audit matches "Password",
which isn't an issue.
mon:, ormon, but not "Monitor", or, for example, "harmony".