Sha256: 4ca98c09356559508799d790ad7a6897c6bbcbc51a045d36faf40c473b6a8640
Contents?: true
Size: 779 Bytes
Versions: 8
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true module Git module Lint module CLI module Actions # Handles unsaved Git commit action. class Hook def initialize analyzer: Analyzer.new, container: Container @analyzer = analyzer @container = container end def call path analyzer.call commits: [repository.unsaved(path)] do |collector, reporter| kernel.puts reporter kernel.abort if collector.errors? end end private attr_reader :analyzer, :container def repository = container[__method__] def kernel = container[__method__] def logger = container[__method__] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems