Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
New cop: Detect return with argument on the top-level #7425
Is your feature request related to a problem? Please describe.
foo return # Since Ruby 2.4. bar # It is never executed.
But the argument of
return 1 # 1 is always ignored.
It will be detected since Ruby 2.7. ruby/ruby@aa97410
Describe the solution you'd like
Add a new cop to detect the problem. Maybe it will be named
Describe alternatives you've considered