Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1016 Bytes

Style-MethodCallWithArgsParentheses.md

File metadata and controls

56 lines (39 loc) · 1016 Bytes

Pattern: Missing parentheses for method calls with arguments

Issue: -

Description

This rule checks presence of parentheses in method calls containing parameters. By default, macro methods are ignored. Additional methods can be added to the IgnoredMethods list.

Examples

# bad
array.delete e

# good
array.delete(e)

# good
# Operators don't need parens
foo == bar

# good
# Setter methods don't need parens
foo.bar = baz

# okay with `puts` listed in `IgnoredMethods`
puts 'test'

# IgnoreMacros: true (default)

# good
class Foo
  bar :baz
end

# IgnoreMacros: false

# bad
class Foo
  bar :baz
end

Default configuration

Attribute Value
IgnoreMacros true
IgnoredMethods

Further Reading