diff options
| author | Mike McQuaid | 2017-05-29 08:06:27 +0100 |
|---|---|---|
| committer | GitHub | 2017-05-29 08:06:27 +0100 |
| commit | da39db01a2a0853f0bb67cfea1fb921084a1d0a8 (patch) | |
| tree | fde0db1abec84666d9fc097f06faf463e7ab4e1a /Library/Homebrew | |
| parent | 52b54aaeb9513500331228b9b1efee34f0174880 (diff) | |
| parent | 279a4df6c3fa41f0b660d67f880ed2bc7c0be848 (diff) | |
| download | brew-da39db01a2a0853f0bb67cfea1fb921084a1d0a8.tar.bz2 | |
Merge pull request #2687 from issyl0/fix_formula_description_regex
Match the "formula name in description" on word boundaries
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/rubocops/formula_desc_cop.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb index 1fbf1ddbf..81068ac34 100644 --- a/Library/Homebrew/rubocops/formula_desc_cop.rb +++ b/Library/Homebrew/rubocops/formula_desc_cop.rb @@ -40,7 +40,7 @@ module RuboCop end # Check if formula's name is used in formula's desc - problem "Description shouldn't include the formula name" if regex_match_group(desc, /^#{@formula_name}/i) + problem "Description shouldn't include the formula name" if regex_match_group(desc, /^#{@formula_name}\b/i) end end end diff --git a/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb b/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb index 432b15e3c..bc92291af 100644 --- a/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb @@ -120,7 +120,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do source = <<-EOS.undent class Foo < Formula url 'http://example.com/foo-1.0.tgz' - desc 'Foo' + desc 'Foo: foobar' end EOS |
