Sha256: 624d62e29e10e46282b660a9cdd9e490461c18a0c14f0124f0d30379304a5f30

Contents?: true

Size: 381 Bytes

Versions: 18

Compression:

Stored size: 381 Bytes

Contents

# frozen_string_literal: true

module Overcommit::Hook::PreCommit
  # Runs `YAMLLint` against any modified YAML files.
  #
  # @see https://github.com/adrienverge/yamllint
  class YamlLint < Base
    def run
      result = execute(command, args: applicable_files)

      if result.success?
        :pass
      else
        return [:warn, result.stdout]
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
overcommit-0.57.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.56.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.55.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.54.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.54.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-jeygeethanmedia-0.53.1.2 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-jeygeethanmedia-0.53.1.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-jeygeethanmedia-0.53.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.53.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.52.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.52.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.51.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.50.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.49.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.49.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.48.1 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.48.0 lib/overcommit/hook/pre_commit/yaml_lint.rb
overcommit-0.47.0 lib/overcommit/hook/pre_commit/yaml_lint.rb