Sha256: f94c5986afcfcfe758e6d573deba2b4bd64af91c075aedb1cec399a39ffc2b7c
Contents?: true
Size: 490 Bytes
Versions: 11
Compression:
Stored size: 490 Bytes
Contents
module Overcommit::Hook::PreCommit # Runs `pronto` # # @see https://github.com/mmozuras/pronto class Pronto < Base MESSAGE_TYPE_CATEGORIZER = lambda do |type| type.include?('E') ? :error : :warning end def run result = execute(command) return :pass if result.success? extract_messages( result.stdout.split("\n"), /^(?<file>(?:\w:)?[^:]+):(?<line>\d+) (?<type>[^ ]+)/, MESSAGE_TYPE_CATEGORIZER, ) end end end
Version data entries
11 entries across 9 versions & 2 rubygems