summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-04-27 18:22:46 -0600
committerConnor Shea <connor.james.shea@gmail.com>2016-05-10 18:34:15 -0600
commit4995302df64b71846370aa80f5b12a2d73112421 (patch)
treed6e0667f4f0399a7a13f17e54fa1860b03a588ed /.rubocop.yml
parent4a47470febe34bf67e84a2904422626caa64224e (diff)
downloadgitlab-ce-4995302df64b71846370aa80f5b12a2d73112421.tar.gz
Enable the StringReplacement cop.
Also fix one use of `gsub` that would be faster as `delete`. Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 9f179efa3ce..c96c7123c16 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -990,11 +990,12 @@ Performance/RedundantSortBy:
# string.
Performance/StartWith:
Enabled: false
+
# Use `tr` instead of `gsub` when you are replacing the same number of
# characters. Use `delete` instead of `gsub` when you are deleting
# characters.
Performance/StringReplacement:
- Enabled: false
+ Enabled: true
# TODO: Enable TimesMap Cop.
# Checks for `.times.map` calls.