Sha256: 6fc4a5da41e092268b154bb1807608b5c7bf309b82c172313df2307ff134a3bd
Contents?: true
Size: 521 Bytes
Versions: 9
Compression:
Stored size: 521 Bytes
Contents
# frozen_string_literal: true 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
9 entries across 9 versions & 1 rubygems