Rubocop Performance Versions Save

An extension of RuboCop focused on code performance checks.

v1.21.0

4 weeks ago

New features

  • #446: Support Prism as a Ruby parser (experimental). (@koic)

Bug fixes

  • #437: Fix a false positive for Performance/ChainArrayAllocation when using select with block argument after select. (@koic)
  • #448: Fix a false positive for Performance/RedundantBlockCall when using block.call with block argument. (@koic)

Changes

v1.20.2

3 months ago

Bug fixes

  • #425: Fix a false positive for Performance/StringIdentifierArgument when using string interpolation with methods that don't support symbols with :: inside them. (@earlopain)

v1.20.1

4 months ago

Bug fixes

  • #428: Fix false negatives for Performance/StringIdentifierArgument when using multiple string arguments. (@koic)

v1.20.0

4 months ago

New features

  • #384: Support optimized String#dup for Performance/UnfreezeString when Ruby 3.3+. (@koic)

Bug fixes

  • #374: Fix an error for Performance/MapMethodChain when using map 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, and Performance/TimesMap cops aware of safe navigation operator. (@koic)
  • #390: Fix a false negative for Performance/ReverseEach when safe navigation is between reverse and each. (@fatkodima)
  • #401: Make Performance/Sum aware of safe navigation operator. (@koic)

Changes

  • #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)

v1.19.1

7 months ago

Bug fixes

  • #367: Fix an incorrect autocorrect for Performance/BlockGivenWithExplicitBlock when using Lint/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)

v1.19.0

8 months ago

New features

  • #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, and Performance/StringReplacement cops. (@koic)

v1.18.0

11 months ago

Bug fixes

  • #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 and Performance/RegexpMatch when autocorrecting both at the same time. (@fatkodima)

Changes

v1.17.1

1 year ago

Bug fixes

  • #352: Fix the default config for AllowRegexpMatch option of Performance/RedundantEqualityComparisonBlock. (@koic)

v1.17.0

1 year ago

New features

  • #347: Add AllowRegexpMatch option to Performance/RedundantEqualityComparisonBlock. (@koic)

Bug fixes

  • #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)

v1.16.0

1 year ago

Changes

  • #332: Register offenses for variables against regexes in Performance/StringInclude. (@fatkodima)