lib/scss_lint/linter/shorthand.rb in scss_lint-0.50.2 vs lib/scss_lint/linter/shorthand.rb in scss_lint-0.50.3

- old
+ new

@@ -80,12 +80,14 @@ # @param node [Sass::Script::Value::String] # @param values [Array<String>] def check_shorthand(prop, node, values) values = shorthand_values(values) - add_lint(node, "Shorthands of length `#{values.count}` are not allowed. " \ - "Value was `#{values.join(' ')}`") unless allowed?(values.count) + unless allowed?(values.count) + add_lint(node, "Shorthands of length `#{values.count}` are not allowed. " \ + "Value was `#{values.join(' ')}`") + end return unless (2..4).member?(values.count) shortest_form = condensed_shorthand(*values) return if values == shortest_form @@ -138,10 +140,10 @@ end # @param right [String] # @param left [String] # @return [Boolean] - def condense_to_three_values?(_, right, __, left) + def condense_to_three_values?(_, right, _, left) return unless allowed?(3) right == left end