audit.rb: Base desc length check on short name
Currently, brew audit --strict includes the name of the tap when calculating the length of a formula's description. This makes it difficult to pass the audit for formulas in taps with lengthy names. In #47033 @jawshooah called out head-only or devel-only taps specifically, but this is an issue elsewhere. For example: homebrew/versions/elasticsearch20: Distributed search & analytics engine (72) This commit updates audit.rb to use formula.name rather than formula.full_name. Closes #47033 -- Audit shouldn't include tap name in description length
This commit is contained in:
parent
abff8a0cc8
commit
bad28dc546
@ -409,11 +409,12 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Make sure the formula name plus description is no longer than 80 characters
|
# Make sure the formula name plus description is no longer than 80 characters
|
||||||
linelength = formula.full_name.length + ": ".length + desc.length
|
# Note full_name includes the name of the tap, while name does not
|
||||||
|
linelength = formula.name.length + ": ".length + desc.length
|
||||||
if linelength > 80
|
if linelength > 80
|
||||||
problem <<-EOS.undent
|
problem <<-EOS.undent
|
||||||
Description is too long. \"name: desc\" should be less than 80 characters.
|
Description is too long. \"name: desc\" should be less than 80 characters.
|
||||||
Length is calculated as #{formula.full_name} + desc. (currently #{linelength})
|
Length is calculated as #{formula.name} + desc. (currently #{linelength})
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user