aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorIsabell Long2017-11-01 19:17:17 +0000
committerIsabell Long2017-11-01 19:50:56 +0000
commit5cbb41479731a5ea95fc9ec9a44b39b72df51995 (patch)
tree69b6344c7d1503b8bb8be7ae0e01062f68c395d9 /Library/Homebrew
parent0786d41693e1ff298d799d055a342dccaaea3fe6 (diff)
downloadbrew-5cbb41479731a5ea95fc9ec9a44b39b72df51995.tar.bz2
formula_desc_cop: Fix the 'full stop at end of description' autocorrect
- It wasn't working because desc strings end in quotes, not just full stops.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/rubocops/formula_desc_cop.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb
index 6aa395ee7..8a35e7d24 100644
--- a/Library/Homebrew/rubocops/formula_desc_cop.rb
+++ b/Library/Homebrew/rubocops/formula_desc_cop.rb
@@ -103,7 +103,7 @@ module RuboCop
correction.gsub!(/(^|[^a-z])#{@formula_name}([^a-z]|$)/i, "\\1\\2")
correction.gsub!(/^(['"]?)\s+/, "\\1")
correction.gsub!(/\s+(['"]?)$/, "\\1")
- correction.gsub!(/\.$/, "")
+ correction.gsub!(/\.(['"]?)$/, "\\1")
corrector.insert_before(node.source_range, correction)
corrector.remove(node.source_range)
end