Add some more excluded operators to `BinaryOperatorParameterName` rule

This commit is contained in:
Sijawusz Pur Rahnama 2023-11-24 21:13:04 +01:00
parent 9f9d5fae32
commit 47088b10ca
1 changed files with 2 additions and 2 deletions

View File

@ -25,13 +25,13 @@ module Ameba::Rule::Naming
# ``` # ```
# Naming/BinaryOperatorParameterName: # Naming/BinaryOperatorParameterName:
# Enabled: true # Enabled: true
# ExcludedOperators: ["[]", "[]?", "[]=", "<<", "=~"] # ExcludedOperators: ["[]", "[]?", "[]=", "<<", ">>", "=~", "!~"]
# ``` # ```
class BinaryOperatorParameterName < Base class BinaryOperatorParameterName < Base
properties do properties do
description "Enforces that certain binary operator methods have " \ description "Enforces that certain binary operator methods have " \
"their sole parameter named `other`" "their sole parameter named `other`"
excluded_operators %w[[] []? []= << ` =~] excluded_operators %w[[] []? []= << >> ` =~ !~]
end end
MSG = "When defining the `%s` operator, name its argument `other`" MSG = "When defining the `%s` operator, name its argument `other`"