Expected behavior
RuboCop should find the style problem in the if statement
Actual behavior
RuboCop didn't find the style problem
Steps to reproduce the problem
test.rb
a = 1
if a&.to_i = 1
puts '111'
end
Run:
rubocop --only Lint/AssignmentInCondition -a test.rb
Result:
Inspecting 1 file
.
1 file inspected, no offenses detected
RuboCop version
root@localhost:~$ rubocop -v
1.61.0