Sha256: f04337409d7de4a8663d843a903d740889d2cd0f46912b7d73d58a3770d9b86d
Contents?: true
Size: 561 Bytes
Versions: 28
Compression:
Stored size: 561 Bytes
Contents
# frozen_string_literal: true module Overcommit::Hook::PreCommit # Runs `vint` against any modified Vim script files. # # @see https://github.com/Kuniwak/vint class Vint < Base def run result = execute(command, args: applicable_files) return :pass if result.success? return [:fail, result.stderr] unless result.stderr.empty? # example message: # path/to/file.vim:1:1: Error message extract_messages( result.stdout.split("\n"), /^(?<file>(?:\w:)?[^:]+):(?<line>\d+)/ ) end end end
Version data entries
28 entries across 28 versions & 2 rubygems