diff options
| author | Isabell Long | 2017-11-01 19:10:48 +0000 |
|---|---|---|
| committer | Isabell Long | 2017-11-01 19:50:56 +0000 |
| commit | 0786d41693e1ff298d799d055a342dccaaea3fe6 (patch) | |
| tree | 01cc712ba93b9dff0ac716927df30dadf94ec3de /Library | |
| parent | 302bc8be22c9f645a110815f52f252a78c666d0f (diff) | |
| download | brew-0786d41693e1ff298d799d055a342dccaaea3fe6.tar.bz2 | |
formula_desc_cop: If desc ends with 'etc.', it's not a violation
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/rubocops/formula_desc_cop.rb | 6 |
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 69fbeb56e..6aa395ee7 100644 --- a/Library/Homebrew/rubocops/formula_desc_cop.rb +++ b/Library/Homebrew/rubocops/formula_desc_cop.rb @@ -40,7 +40,7 @@ module RuboCop # - Checks for correct usage of `command-line` in `desc` # - Checks description starts with a capital letter # - Checks if `desc` contains the formula name - # - Checks if `desc` ends with a full stop + # - Checks if `desc` ends with a full stop (apart from in the case of "etc.") class Desc < FormulaCop VALID_LOWERCASE_WORDS = %w[ ex @@ -83,8 +83,8 @@ module RuboCop problem "Description shouldn't start with the formula name" end - # Check if a full stop is used at the end of a formula's desc - return unless regex_match_group(desc, /\.$/) + # Check if a full stop is used at the end of a formula's desc (apart from in the case of "etc.") + return unless regex_match_group(desc, /\.$/) && !string_content(desc).end_with?("etc.") problem "Description shouldn't end with a full stop" end |
