class Overcommit::Hook::PreCommit::YamlLint

Runs `YAMLLint` against any modified YAML files.

@see github.com/adrienverge/yamllint

Public Instance Methods

run() click to toggle source
# File lib/overcommit/hook/pre_commit/yaml_lint.rb, line 8
def run
  result = execute(command, args: applicable_files)

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