Skip to content

Files

Latest commit

 

History

History
31 lines (22 loc) · 445 Bytes

Lint-UselessSetterCall.md

File metadata and controls

31 lines (22 loc) · 445 Bytes

Pattern: Useless setter call

Issue: -

Description

This rule checks for setter call to local variable as the final expression of a function definition.

Examples

# bad

def something
  x = Something.new
  x.attr = 5
end
# good

def something
  x = Something.new
  x.attr = 5
  x
end

Further Reading