Follow up https://bugs.ruby-lang.org/issues/18980 and https://github.com/ruby/ruby/pull/9152.
Emulates the following Ruby warnings in Ruby 3.3.
$ ruby -e '0.times { it }'
-e:1: warning: `it` calls without arguments will r...
Fixes #403, #404, #405, #406, #408, #411, #412, #413, #415, #416, and #417.
This PR makes Performance/Count
, Performance/FixedSize
, Performance/FlatMap
, Performance/InefficientHashSearch
, Performance/RangeInclude
, `Performan...
Resolves #384.
This PR supports optimized String#dup
for Performance/UnfreezeString
when Ruby 3.3+.
Before submitting the PR make sure the following are checked:
Fixes #12442.
This PR fixes an incorrect autocorrect for Style/CombinableLoops
when looping over the same data as previous loop in do
...end
and {
...}
blocks.
Before submitting the PR make sure the fol...
Fixes #1191, #1192, #1193, #1194, #1196, #1197, #1201, and #1202.
This PR makes Rails/ActiveSupportAliases
, Rails/FindBy
, Rails/FindById
, Rails/Inquiry
, Rails/Pick
Rails/PluckId
, Rails/PluckInWhere
, Rails/WhereEquals
, ...
Fixes #12436.
This PR fixes false positives for Style/RedundantParentheses
when a part of range is a parenthesized condition.
Before submitting the PR make sure the following are checked:
Fixes #12444.
This PR fixes false positive for Style/HashEachMethods
when receiver literal is not a hash literal.
Before submitting the PR make sure the following are checked:
Follow up https://github.com/rubocop/rubocop/pull/12381#issuecomment-1837926968.
This PR fixes a false positive for Style/RedundantParentheses
when using parenthesized lambda
or proc
with do
...end
block.
do
...end
and ...
Fixes #12493.
This PR makes Lint/UnmodifiedReduceAccumulator
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12492.
This PR makes Lint/RedundantWithObject
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12491.
This PR makes Lint/RedundantWithIndex
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12490.
This PR makes Lint/NumberConversion
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12489.
This PR makes Lint/NextWithoutAccumulator
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12489.
This PR makes Lint/HashCompareByIdentity
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12494.
This PR makes Style/SingleLineBlockChain
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12495.
This PR makes Style/RedundantLineBreak
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12486.
This PR makes Style/RedundantArgument
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12484.
This PR makes Style/Next
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12479.
This PR makes Style/EachWithObject
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12480.
This PR makes Style/ExactRegexpMatch
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12476.
This PR make Style/ConcatArrayLiterals
aware of safe navigation operator and tweaks this cop's offense message.
Before submitting the PR make sure the following are checked:
Fixes #12474.
This PR makes Style/ConcatArrayLiterals
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12473.
This PR makes Style/ClassCheck
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12469.
This PR makes Style/UnpackFirst
aware of safe navigation operator and tweaks offense message.
Before submitting the PR make sure the following are checked:
Fixes #12468.
This PR makes Style/Strip
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12454.
This PR makes Style/RedundantFetchBlock
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12455.
This PR makes Style/RedundantSort
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12456.
This PR makes Style/RedundantSortBy
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12457.
This PR makes Style/Sample
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12460.
This PR makes Style/SingleArgumentDig
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12461.
This PR makes Style/StringChars
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12447.
This PR makes Style/MapCompactWithConditionalBlock
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12446.
This PR makes Style/HashExcept
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12445.
This PR makes Style/CollectionCompact
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12441.
This PR fixes false positives for Style/HashEachMethods
when using destructed block arguments.
Before submitting the PR make sure the following are checked:
Fixes #12438.
This PR fixes a false positive for Lint/SelfAssignment
when using attribute assignment with method call with arguments.
Before submitting the PR make sure the following are checked:
Fixes #12434.
This PR fixes a false positive for Lint/LiteralAssignmentInCondition
when using interpolated string or xstring literals.
Before submitting the PR make sure the following are checked:
This PR fixes the following false positive for Lint/LiteralAssignmentInCondition
when using parallel assignment with splat operator:
return if do_something do |z|
x, y = *z
end
$ bundle exec rubocop ...
Fixes #401.
This PR makes Performance/Sum
aware of safe navigation operator.
Before submitting the PR make sure the following are checked:
Fixes #12429.
This PR tweaks autocorrect for Style/MapToHash
when using safe navigation method calls.
It seems not certainly a bug, but the proposal of #12429 suggests that it's acceptable since to_h
works even when the receive...
Fixes #12424.
This PR makes Style/HashEachMethods
aware of safe navigation operator.
Before submitting the PR make sure the following are checked: