Permalink
Browse files

Use internal API to warn and fail

I like this much better - using those raw fail and warn calls never sat
well with me and Rubocop wasn't a big fan either!
  • Loading branch information...
jonallured committed Aug 26, 2016
1 parent b91386e commit 9ca11d66b5bb53530fc8abe6c1a753711af40a72
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/commit_lint/plugin.rb
@@ -53,13 +53,11 @@ def check(config = {})
def check_messages
for message in messages
for klass in warning_checkers
warn klass::MESSAGE if klass.fail? message
messaging.warn klass::MESSAGE if klass.fail? message
end
for klass in failing_checkers
# rubocop:disable Style/SignalException
fail klass::MESSAGE if klass.fail? message
# rubocop:enable Style/SignalException
messaging.fail klass::MESSAGE if klass.fail? message
end
end
end

0 comments on commit 9ca11d6

Please sign in to comment.