Skip to content

Commit a7b23aa

Browse files
authored
Merge pull request #165 from bastelfreak/foo
Raise warning if hiera check is called but disabled
2 parents 2c1b8fa + b9d7b46 commit a7b23aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/puppet-syntax/tasks/puppet-syntax.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def filelist_hiera_yaml
2626
end
2727

2828
def initialize(*_args)
29-
desc 'Syntax check Puppet manifests and templates'
29+
desc 'Syntax check for Puppet manifests, templates and Hiera'
3030
task syntax: [
3131
'syntax:manifests',
3232
'syntax:templates',
@@ -69,6 +69,7 @@ def initialize(*_args)
6969
namespace :hiera do
7070
task :yaml do |t|
7171
warn "---> #{t.name}"
72+
warn "#{t.name} was called, but PuppetSyntax.check_hiera_keys is false. hiera syntax won't be checked" unless PuppetSyntax.check_hiera_keys
7273
c = PuppetSyntax::Hiera.new
7374
errors = c.check(filelist_hiera_yaml)
7475
$stdout.puts "#{errors.join("\n")}\n" unless errors.empty?

0 commit comments

Comments
 (0)