Skip to content

Commit

Permalink
Disable Metrics/CyclomaticComplexity for RedundantParentheses#test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Nov 14, 2022
1 parent 08208f1 commit 482597f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ameba/rule/style/redundant_parentheses.cr
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Ameba::Rule::Style

MSG = "Redundant parentheses"

# ameba:disable Metrics/CyclomaticComplexity
def test(source, node : Crystal::If | Crystal::Unless | Crystal::Case | Crystal::While | Crystal::Until)
is_ternary = node.is_a?(Crystal::If) && node.ternary?
return if is_ternary && exclude_ternary
Expand Down

0 comments on commit 482597f

Please sign in to comment.