aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorCory Donnelly2015-12-23 09:31:17 -0500
committerBaptiste Fontaine2016-04-16 16:14:15 +0200
commitbad28dc5460aa5bbe4d620bc4362b6cc1239bff3 (patch)
tree695b924894f53a1ba079f57cc9b401daf14cc379 /Library/Homebrew
parentabff8a0cc8d7c8fd1fb111f383fc756de08b0878 (diff)
downloadbrew-bad28dc5460aa5bbe4d620bc4362b6cc1239bff3.tar.bz2
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
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/audit.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 3fe461908..cdf5bb9fe 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -409,11 +409,12 @@ class FormulaAuditor
end
# 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
problem <<-EOS.undent
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
end