lib/pdk/validators/puppet/puppet_syntax.rb in pdk-0.4.4 vs lib/pdk/validators/puppet/puppet_syntax.rb in pdk-0.5.0

- old
+ new

@@ -42,11 +42,11 @@ location = location_raw.strip.match(%r{\A(?<file>.+):(?<line>\d+):(?<column>\d+)\Z}) unless location_raw.nil? attributes = { source: name, message: message.strip, - state: 'failure', + state: :failure, } attributes[:severity] = severity.strip unless severity.nil? unless location.nil? attributes[:file] = location[:file] @@ -55,17 +55,17 @@ end results_data << attributes end - # puppet-lint does not include files without problems in its JSON + # puppet parser validate does not include files without problems in its # output, so we need to go through the list of targets and add passing - # events to the report for any target not listed in the JSON output. + # events to the report for any target not listed in the output. targets.reject { |target| results_data.any? { |j| j[:file] == target } }.each do |target| report.add_event( file: target, - source: 'puppet-syntax', - severity: 'ok', + source: name, + severity: :ok, state: :passed, ) end results_data.each do |offense|