Sha256: 4430a9a6c09b344ca979247354f7a37e3abd71e9d5d9cf12cb2b5e9bd96f73e7
Contents?: true
Size: 508 Bytes
Versions: 10
Compression:
Stored size: 508 Bytes
Contents
# frozen_string_literal: true module Overcommit::Hook::Shared # Shared code used by all Pronto hooks. Runs pronto linter. module Pronto 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
10 entries across 10 versions & 2 rubygems