-
-
Notifications
You must be signed in to change notification settings - Fork 87
Comparing changes
Open a pull request
base repository: rubocop/rubocop-performance
base: v1.20.2
head repository: rubocop/rubocop-performance
compare: v1.21.0
- 16 commits
- 33 files changed
- 2 contributors
Commits on Jan 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3ba5d91 - Browse repository at this point
Copy the full SHA 3ba5d91View commit details
Commits on Feb 2, 2024
-
[Fix #437] Fix a false positive for
Performance/ChainArrayAllocation
Fixes #437. This PR fixes a false positive for `Performance/ChainArrayAllocation` when using `select` with block argument after `select`.
Configuration menu - View commit details
-
Copy full SHA for 2103446 - Browse repository at this point
Copy the full SHA 2103446View commit details
Commits on Feb 3, 2024
-
Merge pull request #439 from koic/fix_a_false_positive_for_performanc…
…e_chain_array_allocation [Fix #437] Fix a false positive for `Performance/ChainArrayAllocation`
Configuration menu - View commit details
-
Copy full SHA for c07dcd2 - Browse repository at this point
Copy the full SHA c07dcd2View commit details
Commits on Feb 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4230dc0 - Browse repository at this point
Copy the full SHA 4230dc0View commit details
Commits on Feb 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ae0a3d4 - Browse repository at this point
Copy the full SHA ae0a3d4View commit details
Commits on Feb 14, 2024
-
Remove redundant
expect_no_offenses
keyword argumentsThis PR removes the following redundant `expect_no_offenses` keyword arguments: ```console $ bundle exec rubocop (snip) Offenses: spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb:52:35: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method_name: method_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/rubocop/cop/performance/sum_spec.rb:329:33: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ spec/rubocop/cop/performance/sum_spec.rb:348:35: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ spec/rubocop/cop/performance/times_map_spec.rb:52:37: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ spec/rubocop/cop/performance/times_map_spec.rb:60:37: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ spec/rubocop/cop/performance/times_map_spec.rb:68:37: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ 118 files inspected, 6 offenses detected, 6 offenses autocorrectable ```
Configuration menu - View commit details
-
Copy full SHA for dd698b2 - Browse repository at this point
Copy the full SHA dd698b2View commit details
Commits on Feb 15, 2024
-
[Fix #240] Disable
Performance/Casecmp
copThis cop suggests an incorrect fix when code involves non-ASCII characters. Disabling it by default makes this risky behavior opt-in rather than opt-out.
Configuration menu - View commit details
-
Copy full SHA for 4dc1e5c - Browse repository at this point
Copy the full SHA 4dc1e5cView commit details
Commits on Feb 17, 2024
-
Merge pull request #443 from koic/disalbe_performance_casecmp_by_default
[Fix #240] Disable `Performance/Casecmp` cop
Configuration menu - View commit details
-
Copy full SHA for 08ac312 - Browse repository at this point
Copy the full SHA 08ac312View commit details
Commits on Mar 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9ba15dd - Browse repository at this point
Copy the full SHA 9ba15ddView commit details
Commits on Mar 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 13aa3d1 - Browse repository at this point
Copy the full SHA 13aa3d1View commit details
Commits on Mar 5, 2024
-
Support Prism as a Ruby parser
Follow up rubocop/rubocop-ast#277 In Prism (`Prism::Translation::Parser`), `match-with-lvasgn` can be distinctly differentiated. It is unclear whether to conform to the current behavior of the Parser gem, but initially, `def_node_matcher` has been updated to accept the following incompatibilities for `Performance/EndWith`, `Performance/StringInclude`, and `Performance/StartWith` cops to ensure it works with Prism 0.24.0 as well. ## Parser gem Returns an `match_with_lvasgn` node: ```console $ bundle exec ruby -rparser/ruby33 -ve 'p Parser::Ruby33.parse("/foo/ =~ bar")' ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] s(:match_with_lvasgn, s(:regexp, s(:str, "foo"), s(:regopt)), s(:send, nil, :bar)) ``` Returns an `match_with_lvasgn` node: ```console $ bundle exec ruby -rparser/ruby33 -ve 'p Parser::Ruby33.parse("/(?<foo>)foo/ =~ bar")' ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] s(:match_with_lvasgn, s(:regexp, s(:str, "(?<foo>)foo"), s(:regopt)), s(:send, nil, :bar)) ``` This lvar-injecting feature appears to have not been supported by Parser gem for a long time: whitequark/parser#69 (comment) ## Prism Returns an `send` node: ```console $ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("/foo/ =~ bar")' ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] s(:send, s(:regexp, s(:str, "foo"), s(:regopt)), :=~, s(:send, nil, :bar)) ``` Returns an `match_with_lvasgn` node: ```console $ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("/(?<foo>)foo/ =~ bar")' ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] s(:match_with_lvasgn, s(:regexp, s(:str, "(?<foo>)foo"), s(:regopt)), s(:send, nil, :bar)) ```
Configuration menu - View commit details
-
Copy full SHA for 2059d28 - Browse repository at this point
Copy the full SHA 2059d28View commit details -
Merge pull request #446 from koic/support_prism
Support Prism as a Ruby parser
Configuration menu - View commit details
-
Copy full SHA for d4d1875 - Browse repository at this point
Copy the full SHA d4d1875View commit details
Commits on Mar 25, 2024
-
[Fix #448] Fix a false positive for
Performance/RedundantBlockCall
Fixes #448. This PR fixes a false positive for `Performance/RedundantBlockCall` when using `block.call` with block argument.
Configuration menu - View commit details
-
Copy full SHA for 0d98285 - Browse repository at this point
Copy the full SHA 0d98285View commit details
Commits on Mar 29, 2024
-
Merge pull request #449 from koic/fix_false_positive_for_performance_…
…redundant_block_call [Fix #448] Fix a false positive for `Performance/RedundantBlockCall`
Configuration menu - View commit details
-
Copy full SHA for 9d28120 - Browse repository at this point
Copy the full SHA 9d28120View commit details
Commits on Mar 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 067c641 - Browse repository at this point
Copy the full SHA 067c641View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30f6669 - Browse repository at this point
Copy the full SHA 30f6669View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.20.2...v1.21.0