class Overcommit::Hook::PreCommit::PuppetMetadataJsonLint
Run’s the Puppet metadata linter. It has support for adding options in the .overcommit.yaml
Constants
- MESSAGE_REGEX
- MESSAGE_TYPE_CATEGORIZER
Public Instance Methods
run()
click to toggle source
# File lib/overcommit/hook/pre_commit/puppet_metadata_json_lint.rb, line 17 def run result = execute(command, args: applicable_files) output = result.stdout.chomp.gsub(/^"|"$/, '') return :pass if result.success? && output.empty? extract_messages( output.split("\n"), MESSAGE_REGEX, MESSAGE_TYPE_CATEGORIZER ) end