lib/simplabs/excellent/checks/method_name_check.rb in excellent-1.7.1 vs lib/simplabs/excellent/checks/method_name_check.rb in excellent-1.7.2
- old
+ new
@@ -15,13 +15,14 @@
#
# * methods
class MethodNameCheck < NameCheck
DEFAULT_PATTERN = /^[_a-z<>=\[|+-\/\*\~\%\&`\|\^]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/
+ WHITELIST = %w([] ! != !~ % & * ** + +@ - -@ / < << <= <=> == === =~ > >= >> ^ ` | ~)
def initialize(options = {}) #:nodoc:
pattern = options['pattern'] || DEFAULT_PATTERN
- super([Parsing::MethodContext, Parsing::SingletonMethodContext], pattern)
+ super([Parsing::MethodContext, Parsing::SingletonMethodContext], pattern, WHITELIST)
end
protected
def warning_args(context) #:nodoc: