Skip to content

Commit

Permalink
Add some more excluded operators to BinaryOperatorParameterName rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Nov 24, 2023
1 parent 9f9d5fa commit 47088b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ameba/rule/naming/binary_operator_parameter_name.cr
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ module Ameba::Rule::Naming
# ```
# Naming/BinaryOperatorParameterName:
# Enabled: true
# ExcludedOperators: ["[]", "[]?", "[]=", "<<", "=~"]
# ExcludedOperators: ["[]", "[]?", "[]=", "<<", ">>", "=~", "!~"]
# ```
class BinaryOperatorParameterName < Base
properties do
description "Enforces that certain binary operator methods have " \
"their sole parameter named `other`"
excluded_operators %w[[] []? []= << ` =~]
excluded_operators %w[[] []? []= << >> ` =~ !~]
end

MSG = "When defining the `%s` operator, name its argument `other`"
Expand Down

0 comments on commit 47088b1

Please sign in to comment.