aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/rubocops
diff options
context:
space:
mode:
authorilovezfs2017-06-29 08:14:58 -0700
committerilovezfs2017-06-29 08:14:58 -0700
commit7013f9dee3ea3e05e0fd51ee6ef0f19e5656176a (patch)
tree0925a014486b1040d553002af5d834ad5ebef38c /Library/Homebrew/rubocops
parent76ed7898d002ed36e397c908f00589f62b78e641 (diff)
downloadbrew-7013f9dee3ea3e05e0fd51ee6ef0f19e5656176a.tar.bz2
formula_desc_cop: allow formula name in desc
except at the very beginning, as the audit originally intended. See https://github.com/Homebrew/legacy-homebrew/pull/45493.
Diffstat (limited to 'Library/Homebrew/rubocops')
-rw-r--r--Library/Homebrew/rubocops/formula_desc_cop.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb
index 3414439b0..619a0cda4 100644
--- a/Library/Homebrew/rubocops/formula_desc_cop.rb
+++ b/Library/Homebrew/rubocops/formula_desc_cop.rb
@@ -72,9 +72,9 @@ module RuboCop
problem "Description should start with a capital letter"
end
- # Check if formula's name is used in formula's desc
- return unless regex_match_group(desc, /(^|[^a-z])#{@formula_name}([^a-z]|$)/i)
- problem "Description shouldn't include the formula name"
+ # Check if formula's desc starts with formula's name
+ return unless regex_match_group(desc, /^#{@formula_name} /i)
+ problem "Description shouldn't start with the formula name"
end
private