Unreachable code
Reports unreachable code that will never be executed in any control flow and can be safely removed.
Example:
def largest_number(x, y)
if x > y
return x
else
return y
end
puts 'The largest number is ' + x #unreachable code
end
Inspection Details | |
---|---|
Available in: | Qodana for Ruby 2023.3, RubyMine 2023.3 |
Plugin: | Ruby, 233.SNAPSHOT |
Last modified: 13 July 2023