Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 754 Bytes

Naming-PredicateName.md

File metadata and controls

38 lines (26 loc) · 754 Bytes

Pattern: Invalid predicate name

Issue: -

Description

This rule makes sure that predicates are named properly.

Examples

# bad
def is_even?(value) ...

# good
def even?(value)

# bad
def has_value? ...

# good
def value? ...

Default configuration

Attribute Value
NamePrefix is_, has_, have_
NamePrefixBlacklist is_, has_, have_
NameWhitelist is_a?
MethodDefinitionMacros define_method, define_singleton_method
Exclude spec/**/*

Further Reading