An extension of RuboCop focused on code performance checks.
Performance/ChainArrayAllocation
when using select
with block argument after select
. (@koic)Performance/RedundantBlockCall
when using block.call
with block argument. (@koic)Performance/Casecmp
cop by default. (@parkerfinch)Performance/StringIdentifierArgument
when using string interpolation with methods that don't support symbols with ::
inside them. (@earlopain)Performance/MapMethodChain
when using map
method chain without receiver. (@koic)Performance/StringIdentifierArgument
when using string interpolation. (@earlopain)Performance/Count
, Performance/FixedSize
, Performance/FlatMap
, Performance/InefficientHashSearch
, Performance/RangeInclude
, Performance/RedundantSortBlock
, Performance/ReverseFirst
, Performance/SelectMap
, Performance/Size
, Performance/SortReverse
, and Performance/TimesMap
cops aware of safe navigation operator. (@koic)Performance/ReverseEach
when safe navigation is between reverse
and each
. (@fatkodima)Performance/Sum
aware of safe navigation operator. (@koic)Performance/MapCompact
to handle more safe navigation calls. (@fatkodima)Performance/StringInclude
to handle ===
method. (@fatkodima)Performance/BlockGivenWithExplicitBlock
when using Lint/UnusedMethodArgument
's autocorrection together. (@ymap)Performance/RedundantMatch
when expressions with lower precedence than =~
are used as an argument. (@ymap)Performance/ArraySemiInfiniteRangeSlice
when using []
with string literals. (@koic)Performance/UnfreezeString
. (@tagliala)Performance/MapMethodChain
cop. (@koic)Performance/ArraySemiInfiniteRangeSlice
, Performance/DeletePrefix
, Performance/DeleteSuffix
, Performance/Detect
, Performance/EndWith
, Performance/InefficientHashSearch
, Performance/MapCompact
, Performance/RedundantSplitRegexpArgument
, Performance/ReverseEach
, Performance/ReverseFirst
, Performance/SelectMap
, Performance/Squeeze
, Performance/StartWith
, Performance/StringInclude
, and Performance/StringReplacement
cops. (@koic)Performance/RedundantEqualityComparisonBlock
when the block variable is used on both sides of ==
. (@koic)Performance/ConstantRegexp
and Performance/RegexpMatch
when autocorrecting both at the same time. (@fatkodima)sort!
and minmax
to Performance/CompareWithBlock
. (@vlad-pisanov)Performance/StringIdentifierArgument
when using a command method with receiver. (@koic)Performance/FlatMap
autocorrection for chained methods on separate lines. (@fatkodima)Performance/StringInclude
. (@fatkodima)