Pattern: Invalid predicate name
Issue: -
This rule makes sure that predicates are named properly.
# bad
def is_even?(value) ...
# good
def even?(value)
# bad
def has_value? ...
# good
def value? ...
Attribute | Value |
---|---|
NamePrefix | is_ , has_ , have_ |
NamePrefixBlacklist | is_ , has_ , have_ |
NameWhitelist | is_a? |
MethodDefinitionMacros | define_method , define_singleton_method |
Exclude | spec/**/* |