Skip to content

Commit

Permalink
Merge pull request #465 from hanazuki/raketask-fix
Browse files Browse the repository at this point in the history
Support automatic fixing in Rake task as described in README
  • Loading branch information
Kylo Ginsberg committed Jul 6, 2016
2 parents 0a7420f + 1ed6ced commit ec6b667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puppet-lint/tasks/puppet-lint.rb
Expand Up @@ -78,6 +78,10 @@ def define(args, &task_block)
linter.file = puppet_file
linter.run
linter.print_problems

if PuppetLint.configuration.fix && !linter.problems.any? { |e| e[:check] == :syntax }
IO.write(puppet_file, linter.manifest)
end
end
abort if linter.errors? || (
linter.warnings? && PuppetLint.configuration.fail_on_warnings
Expand Down

0 comments on commit ec6b667

Please sign in to comment.