rubocop-performance.yml in gitlab-styles-9.1.0 vs rubocop-performance.yml in gitlab-styles-9.2.0
- old
+ new
@@ -26,18 +26,34 @@
Enabled: true
Performance/CollectionLiteralInLoop: # (new in 1.8)
Enabled: true
+# Identifies places where Concurrent.monotonic_time can be replaced by
+# Process.clock_gettime(Process::CLOCK_MONOTONIC).
+Performance/ConcurrentMonotonicTime:
+ Enabled: true
+
Performance/ConstantRegexp: # (new in 1.9)
Enabled: true
# Use `str.{start,end}_with?(x, ..., y, ...)` instead of
# `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
Performance/DoubleStartEndWith:
Enabled: true
+# Identifies usages of map { ... }.flatten and change them to use
+# flat_map { ... } instead.
+Performance/FlatMap:
+ Enabled: true
+ EnabledForFlattenWithoutParams: true
+
+# This cop identifies places where map { … }.compact can be replaced by
+# filter_map.
+Performance/MapCompact:
+ Enabled: true
+
Performance/MethodObjectAsBlock: # (new in 1.9)
Enabled: true
# Superseded by Style/OpenStructUse
Performance/OpenStruct:
@@ -50,10 +66,15 @@
# This cop identifies the use of a `&block` parameter and `block.call`
# where `yield` would do just as well.
Performance/RedundantBlockCall:
Enabled: true
+# Checks for uses Enumerable#all?, Enumerable#any?, Enumerable#one?, and
+# Enumerable#none? are compared with === or similar methods in block.
+Performance/RedundantEqualityComparisonBlock:
+ Enabled: true
+
# This cop identifies use of `Regexp#match` or `String#match in a context
# where the integral return value of `=~` would do just as well.
Performance/RedundantMatch:
Enabled: true
@@ -71,10 +92,15 @@
# Checks for redundant String#chars.
# https://docs.rubocop.org/rubocop-performance/1.8/cops_performance.html#performanceredundantstringchars
Performance/RedundantStringChars:
Enabled: true
+# Identifies places where split argument can be replaced from a deterministic
+# regexp to a string.
+Performance/RedundantSplitRegexpArgument:
+ Enabled: true
+
# Identifies places where reverse.first(n) and reverse.first can be replaced by last(n).reverse and last.
# https://docs.rubocop.org/rubocop-performance/1.8/cops_performance.html#performancereversefirst
Performance/ReverseFirst:
Enabled: true
@@ -94,9 +120,15 @@
Enabled: true
# Identifies unnecessary use of a regex where String#include? would suffice.
# https://docs.rubocop.org/rubocop-performance/1.8/cops_performance.html#performancestringinclude
Performance/StringInclude:
+ Enabled: true
+
+# Identifies places where string identifier argument can be replaced by symbol
+# identifier argument. It prevents the redundancy of the internal
+# string-to-symbol conversion.
+Performance/StringIdentifierArgument:
Enabled: true
# Use `tr` instead of `gsub` when you are replacing the same number of
# characters. Use `delete` instead of `gsub` when you are deleting
# characters.