- #468: Fix false positives for
Performance/BigDecimalWithNumericArgument
when using float argument forBigDecimal
. (@koic)
- #454: Fix false positives for
Performance/BigDecimalWithNumericArgument
when using BigDecimal 3.1+. (@koic)
- #385: Disable
Performance/BlockGivenWithExplicitBlock
by default. (@earlopain) - #407: Make
Performance/DoubleStartEndWith
aware of safe navigation. (@earlopain)
- #452: Fix an error for
Performance/RedundantEqualityComparisonBlock
when the block is empty. (@earlopain)
- #437: Fix a false positive for
Performance/ChainArrayAllocation
when usingselect
with block argument afterselect
. (@koic) - #448: Fix a false positive for
Performance/RedundantBlockCall
when usingblock.call
with block argument. (@koic)
- #240: Disable
Performance/Casecmp
cop by default. (@parkerfinch)
- #425: Fix a false positive for
Performance/StringIdentifierArgument
when using string interpolation with methods that don't support symbols with::
inside them. (@earlopain)
- #428: Fix false negatives for
Performance/StringIdentifierArgument
when using multiple string arguments. (@koic)
- #374: Fix an error for
Performance/MapMethodChain
when usingmap
method chain without receiver. (@koic) - #386: Fix a false negative for
Performance/StringIdentifierArgument
when using string interpolation. (@earlopain) - #419: Make
Performance/Count
,Performance/FixedSize
,Performance/FlatMap
,Performance/InefficientHashSearch
,Performance/RangeInclude
,Performance/RedundantSortBlock
,Performance/ReverseFirst
,Performance/SelectMap
,Performance/Size
,Performance/SortReverse
, andPerformance/TimesMap
cops aware of safe navigation operator. (@koic) - #390: Fix a false negative for
Performance/ReverseEach
when safe navigation is betweenreverse
andeach
. (@fatkodima) - #401: Make
Performance/Sum
aware of safe navigation operator. (@koic)
- #389: Improve
Performance/MapCompact
to handle more safe navigation calls. (@fatkodima) - #395: Enhance
Performance/StringInclude
to handle===
method. (@fatkodima) - #388: Require RuboCop 1.30+ as runtime dependency. (@koic)
- #380: Require RuboCop AST 1.30.0+. (@koic)
- #367: Fix an incorrect autocorrect for
Performance/BlockGivenWithExplicitBlock
when usingLint/UnusedMethodArgument
's autocorrection together. (@ymap) - #370: Fix an incorrect autocorrect for
Performance/RedundantMatch
when expressions with lower precedence than=~
are used as an argument. (@ymap) - #365: Fix false positives for
Performance/ArraySemiInfiniteRangeSlice
when using[]
with string literals. (@koic) - #373: Set target version for
Performance/UnfreezeString
. (@tagliala)
- #364: Add new
Performance/MapMethodChain
cop. (@koic) - #363: Support safe navigation operator for
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
, andPerformance/StringReplacement
cops. (@koic)
- #359: Fix a false positive for
Performance/RedundantEqualityComparisonBlock
when the block variable is used on both sides of==
. (@koic) - #351: Fix an incorrect autocorrect for
Performance/ConstantRegexp
andPerformance/RegexpMatch
when autocorrecting both at the same time. (@fatkodima)
- #357: Add
sort!
andminmax
toPerformance/CompareWithBlock
. (@vlad-pisanov) - #353: (Breaking) Drop Ruby 2.6 support. (@koic)
- #352: Fix the default config for
AllowRegexpMatch
option ofPerformance/RedundantEqualityComparisonBlock
. (@koic)
- #346: Fix a false positive for
Performance/StringIdentifierArgument
when using a command method with receiver. (@koic) - #344: Fix
Performance/FlatMap
autocorrection for chained methods on separate lines. (@fatkodima)
- #332: Register offenses for variables against regexes in
Performance/StringInclude
. (@fatkodima)
- #313: Fix a false negative for
Performance/RedundantStringChars
when usingstr.chars.last
without argument. (@koic) - #321: Fix a false positive for
Performance/Sum
when usingTargetRubyVersion
is 2.3 or lower. (@koic) - #314: Fix
Performance/RegexpMatch
to handle::Regexp
. (@fatkodima)
- #318: Extend
Performance/StringInclude
to handle!~
. (@fatkodima)
- #309: Fix an error for
Performance/MapCompact
when usingmap(&:do_something).compact
and there is a line break aftermap.compact
and assigning with||=
. (@koic)
- #305: Support numbered parameter for
Performance/RedundantSortBlock
,Performance/SortReverse
, andPerformance/TimesMap
cops. (@koic)
- #297: Support autocorrection on
Performance/RedundantMatch
when receiver is a Regexp literal. (@r7kamura)
- #296: Fix a false negative for
Performance/StringIdentifierArgument
when usinginstance_variable_defined?
. (@koic) - #294: Fix a false negative for
Performance/ChainArrayAllocation
when usingarray.first(do_something).uniq
. (@koic)
- #291: Fix
Performance/MapCompact
autocorrect causing invalid syntax when using multilinemap { ... }.compact
as an argument for an assignment method. (@QQism)
- #289: Fix a false positive for
Performance/StringIdentifierArgument
when using namespaced class string argument. (@koic) - #288: Recover Ruby 2.4 code analysis using
TargetRubyVersion: 2.4
. (@koic)
- #285: Fix an error for
Performance/MapCompact
when usingmap(&:do_something).compact.first
and there is a line break aftermap.compact
and receiver. (@ydah)
- #281: Fix an error for
Performance/BlockGivenWithExplicitBlock
when using Ruby 3.1's anonymous block forwarding. (@koic)
- #276: Add new
Performance/StringIdentifierArgument
cop. (@koic) - #204: Add
Performance/Sum
option to ignore potential false positives. (@leoarnold) - #269: Add
#to_d
support toBigDecimalWithNumericArgument
. (@leoarnold)
- #277: Fix an incorrect autocorrect for
Performance/MapCompact
when usingmap.compact.first
and there is a line break aftermap.compact
and receiver. (@koic) - #273: Fix an incorrect autocorrect for
Performance/RedundantStringChars
when usingstr.chars[0]
. (@koic)
- #270: Mark
Performance/Sum
auto-correction as unsafe and extend documentation. (@leoarnold) - #274: Unmark
AutoCorrect: false
fromPerformance/CaseWhenSplat
. (@koic) - #275: Unmark
AutoCorrect: false
fromPerformance/TimesMap
. (@koic)
- #261: Fix a false negative for
Performance/RedundantBlockCall
when usingblock.call
in a class method'. (@koic) - #264: Fix error in Performance/Sum when method has no brackets. (@mvz)
- #255: Fix a false positive for
Performance/RedundantEqualityComparisonBlock
when using block argument is used for an argument of operand. (@koic) - #257: Fix an incorrect auto-correct for
Performance/MapCompact
when using multi-linecollection.map { ... }.compact
as a method argument. (@koic)
- #247: Fix an incorrect auto-correct for
Performance/MapCompact
when using multi-line trailing dot method calls. (@koic) - #249: Fix a false positive for
Performance/RedundantStringChars
when usingstr.chars.last
andstr.chars.drop
. (@koic) - #252: Fix an incorrect auto-correct for
Performance/UnfreezeString
when invoking a method afterString.new
with a string. (@koic)
- #242: Fix an error for
Performance/MapCompact
when using multilinemap { ... }.compact
and assigning to return value. (@koic)
- #238: Fix an incorrect auto-correct for
Performance/MapCompact
when invoking a method aftermap { ... }.compact
on the same line. (@koic)
- #236: Fix an incorrect auto-correct for
Performance/MapCompact
when using multi-line leading dot method calls. (@koic)
- #228: Mark
Performance/RedundantMerge
as unsafe. (@dvandersluis) - #232: (Compatibility) Drop Ruby 2.4 support. (@koic)
- #235: Require RuboCop 1.7 or higher. (@koic)
- #162: Fix a false positive for
Performance/RedundantBlockCall
when an optional block that is overridden by block variable. (@koic) - #36: Fix a false positive for
Performance/ReverseEach
wheneach
is called onreverse
and using the result value. (@koic) - #224: Fix a false positive for
Style/RedundantEqualityComparisonBlock
when using one argument with comma separator in block argument. (@koic) - #225: Fix a false positive for
Style/RedundantEqualityComparisonBlock
when usingany?
with===
comparison block and block argument is not used as a receiver for===
. (@koic) - #222: Fix a false positive for
Performance/RedundantSplitRegexpArgument
whensplit
method argument is exactly one space regexp/ /
. (@koic)
- #214: Fix a false positive for
Performance/RedundantEqualityComparisonBlock
when using multiple block arguments. (@koic) - #216: Fix a false positive for
Performance/RedundantSplitRegexpArgument
when using split method with ignore case regexp option. (@koic) - #217: Fix a false positive for
Performance/RedundantEqualityComparisonBlock
when using block argument is used for an argument ofis_a
. (@koic)
- #190: Add new
Performance/RedundantSplitRegexpArgument
cop. (@mfbmina) - #213: Add new
Performance/RedundantEqualityComparisonBlock
cop. (@koic)
- #207: Fix an error for
Performance/Sum
when usingmap(&do_something).sum
without receiver. (@koic) - #210: Fix a false negative for
Performance/BindCall
when receiver is not a method call. (@koic)
- #205: Update
Performance/ConstantRegexp
to allow memoized regexps. (@dvandersluis) - #212: Enable unsafe auto-correct for
Performance/StartWith
andPerformance/EndWith
cops by default. (@koic)
- #201: Fix an incorrect auto-correct for
Performance/ReverseEach
when using multi-linereverse.each
with leading dot. (@koic)
- #185: Fix incorrect replacement recommendation for
Performance/ChainArrayAllocation
. (@fatkodima)
- #197: Disable
Performance/ArraySemiInfiniteRangeSlice
cop. (@tejasbubane)
- #173: Add new
Performance/BlockGivenWithExplicitBlock
cop. (@fatkodima) - #136: Add new
Performance/MethodObjectAsBlock
cop. (@fatkodima) - #151: Add new
Performance/ConstantRegexp
cop. (@fatkodima) - #175: Add new
Performance/ArraySemiInfiniteRangeSlice
cop. (@fatkodima) - #189: Support auto-correction for
Performance/Caller
. (@koic) - #171: Extend auto-correction support for
Performance/Sum
. (@koic) - #194: Support auto-correction for
Performance/UnfreezeString
. (@koic)
- #181: Change default configuration for
Performance/CollectionLiteralInLoop
toEnabled: 'pending'
. (@ghiculescu) - #170: Extend
Performance/Sum
to register an offense formap { ... }.sum
. (@eugeneius) - #179: Change
Performance/Sum
to warn about empty arrays, and not register an offense on empty array literals. (@ghiculescu) - #180: Require RuboCop 0.90 or higher. (@koic)
- #164: Fix an error for
Performance/CollectionLiteralInLoop
when a method fromEnumerable
is called with no receiver. (@eugeneius) - #165: Fix a false positive for
Performance/Sum
when using initial value argument is a variable. (@koic)
- #163: Change
Performance/Detect
to also detect offenses when index 0 or -1 is used instead (ie.detect{ ... }[0]
). (@dvandersluis) - #168: Extend
Performance/Sum
to register an offense forinject(&:+)
. (@eugeneius)
- #140: Add new
Performance/CollectionLiteralInLoop
cop. (@fatkodima) - #137: Add new
Performance/Sum
cop. (@fatkodima)
- #157: Extend
Performance/Detect
cop with check forfilter
method andPerformance/Count
cop with checks forfind_all
andfilter
methods. (@fatkodima) - #154: Require RuboCop 0.87 or higher. (@koic)
- #147: Fix an error for
Performance/AncestorsInclude
when usingancestors.include?
without receiver. (@koic) - #150: Fix an incorrect autocorrect for
Performance/BigDecimalWithNumericArgument
when a precision is specified. (@eugeneius)
- #149: Mark
Performance/AncestorsInclude
as unsafe. (@eugeneius) - #145: Mark
Performance/StringInclude
asSafeAutocorrect: false
and disable autocorrect by default. (@koic)
- #141: Add new
Performance/RedundantStringChars
cop. (@fatkodima) - #127: Add new
Performance/IoReadlines
cop. (@fatkodima) - #128: Add new
Performance/ReverseFirst
cop. (@fatkodima) - #132: Add new
Performance/RedundantSortBlock
cop. (@fatkodima) - #125: Support
Array()
andHash()
methods forPerformance/Size
cop. (@fatkodima) - #124: Add new
Performance/Squeeze
cop. (@fatkodima) - #129: Add new
Performance/BigDecimalWithNumericArgument
cop. (@fatkodima) - #130: Add new
Performance/SortReverse
cop. (@fatkodima) - #81: Add new
Performance/StringInclude
cop. (@fatkodima) - #123: Add new
Performance/AncestorsInclude
cop. (@fatkodima) - #125: Support
Range#member?
method forPerformance/RangeInclude
cop. (@fatkodima)
- #115: Support
String#sub
andString#sub!
methods forPerformance/DeletePrefix
andPerformance/DeleteSuffix
cops. (@fatkodima)
- #111: Fix an error for
Performance/DeletePrefix
andPerformance/DeleteSuffix
cops when using autocorrection with RuboCop 0.81 or lower. (@koic) - #118: Fix a false positive for
Performance/DeletePrefix
,Performance/DeleteSuffix
,Performance/StartWith
, andPerformance/EndWith
cops when receiver is multiline string. (@koic)
- #77: Add new
Performance/BindCall
cop. (@koic) - #105: Add new
Performance/DeletePrefix
andPerformance/DeleteSuffix
cops. (@koic) - #107: Support regexp metacharacter
^
forPerformance/StartWith
cop and regexp metacharacter$
forPerformance/EndWith
cop. (@koic)
- #55: Fix an incorrect autocorrect for
Performance/RegexpMatch
when usingstr.=~(/regexp/)
. (@koic) - #108: Fix an incorrect autocorrect for
Performance/ReverseEach
when there is a newline between reverse and each. (@joe-sharp, @dischorde, @siegfault)
- #103: (Compatibility) Drop support for Ruby 2.3. (@koic)
- #101: Mark unsafe for
Performance/Casecmp
cop. (@koic)
- #86: Fix an incorrect autocorrect for
Performance/RedundantMerge
when using an empty hash argument. (@koic)
- #82: Let
Performance/StartWith
andPerformance/EndWith
correctRegexp#match?
andRegexp#=~
. (@eugeneius)
- #74: Fix an error for
Performance/RedundantMerge
whenMaxKeyValuePairs
option is set tonull
. (@koic) - #70: This PR fixes a false negative for
Performance/FlatMap
when using symbol to proc operator argument ofmap
method. (@koic, @splattael)
- #69: Remove
SafeMode
fromPerformance/Count
andPerformance/Detect
. SetSafeAutoCorrect
tofalse
for these cops by default. (@rrosenblum)
- #67: Fix an error for
Performance/RedundantMerge
whenMaxKeyValuePairs
option is set tonull
. (@koic) - #73: Fix a false negative for
Performance/RegexpMatch
whenMatchData
is not detected inif
branch of guard condition. (@koic)
- #54: Fix
Performance/FixedSize
to accept const assign with some operation. (@tejasbubane) - #61: Fix a false negative for
Performance/RegexpMatch
when using RuboCop 0.71 or higher. (@koic)
- #48: Reduce
Performance/RegexpMatch
false positive by only flaggingmatch
used with Regexp/String/Symbol literals. (@dduugg)
- #52: (Compatibility) Drop support for Ruby 2.2. (@bquorning)
- #39: Remove
Performance/LstripRstrip
cop. (@koic) - #39: Remove
Performance/RedundantSortBy
,Performance/UnneededSort
andPerformance/Sample
cops. (@koic)
- Extract performance cops from rubocop/rubocop repository. (@composerinteralia, @koic)