tap_auditor: use short names when checking exception lists #11895
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 style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?For core formulae,
Formula#full_name
is the same asFormulae#name
, but this is not true for other taps. The formula names that need to go in the exception lists are the short names (because this is what we compare them to during the audit and changing this adds backwards incompatibility). I think this makes sense because the lists are per-tap so short names are sufficient.TapAuditor
also checks to make sure that every formula listed in an exception list actually exists in that tap. This is done by comparing each entry toTap#formula_names
. There is a problem here becauseTap#formula_names
returns the full name of each formula in the tap. For core formulae,Formula#full_name
is the same asFormulae#name
, but this is not true for other taps. Therefore, adding an audit exception using the short name will fail the audit checking that it exists in the tap. For example,btb/open-watcom/open-watcom-v2
(fromformula_names
) is not the same asopen-watcom-v2
(from the exception list).See Homebrew/discussions#2005 (comment) or btb/homebrew-open-watcom#9