Skip to content

Commit

Permalink
[#499] Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Goose97 committed Apr 11, 2024
1 parent 0eece68 commit b80b449
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rubocop/custom_cops/class_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,13 @@ def error_message(out_of_order_expression, expressions)
# rubocop:enable Metrics/MethodLength

def before_first_expression(current_expression, out_of_order_expression)
unless EXPRESSION_TYPE_ORDER[out_of_order_expression] < EXPRESSION_TYPE_ORDER[current_expression[:category]]
return
end
return unless EXPRESSION_TYPE_ORDER[out_of_order_expression] < EXPRESSION_TYPE_ORDER[current_expression[:category]]

"#{out_of_order_expression} should come before `#{current_expression[:expression].source}`."
end

def after_last_expression(current_expression, out_of_order_expression)
unless EXPRESSION_TYPE_ORDER[out_of_order_expression] > EXPRESSION_TYPE_ORDER[current_expression[:category]]
return
end
return unless EXPRESSION_TYPE_ORDER[out_of_order_expression] > EXPRESSION_TYPE_ORDER[current_expression[:category]]

"#{out_of_order_expression} should come after `#{current_expression[:expression].source}`."
end
Expand Down

0 comments on commit b80b449

Please sign in to comment.