Skip to content

Commit

Permalink
remove rescue
Browse files Browse the repository at this point in the history
  • Loading branch information
alex501212 committed Feb 18, 2025
1 parent e06438f commit 5fc682a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,10 @@
PuppetLint.new_check(:legacy_facts) do
def check
if File.extname(PuppetLint::Data.path).downcase.match?(%r{\.ya?ml$})
begin
content = PuppetLint::Data.manifest_lines
yaml_content = content.join("\n")
data = YAML.safe_load(yaml_content, aliases: true, permitted_classes: [Symbol])
search_yaml(data)
rescue StandardError => e
raise e
end
content = PuppetLint::Data.manifest_lines
yaml_content = content.join("\n")
data = YAML.safe_load(yaml_content, aliases: true, permitted_classes: [Symbol])
search_yaml(data)

Check warning on line 121 in lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb

View check run for this annotation

Codecov / codecov/patch

lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb#L118-L121

Added lines #L118 - L121 were not covered by tests
else
check_puppet
end
Expand Down

0 comments on commit 5fc682a

Please sign in to comment.