Skip to content

Commit

Permalink
Merge pull request #97 from slauger/master
Browse files Browse the repository at this point in the history
add support for validating puppet plans (fixes #95, fixes #96)
  • Loading branch information
bastelfreak authored Oct 5, 2019
2 parents 19fffd8 + 1880da7 commit 143bb0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/puppet-syntax/manifests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def check(filelist)
def validate_manifest(file)
Puppet[:parser] = 'future' if PuppetSyntax.future_parser and Puppet.version.to_i < 4
Puppet[:app_management] = true if PuppetSyntax.app_management && (Puppet::Util::Package.versioncmp(Puppet.version, '4.3.0') >= 0 && Puppet.version.to_i < 5)
Puppet[:tasks] = true if Puppet::Util::Package.versioncmp(Puppet.version, '5.4.0') >= 0 and file.match(/.*plans\/.*\.pp$/)
Puppet::Face[:parser, :current].validate(file)
end
end
Expand Down

0 comments on commit 143bb0c

Please sign in to comment.