Skip to content

Commit 3c74505

Browse files
committed
(CONT-811) Correct Style/StderrPuts
1 parent fc8dae6 commit 3c74505

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/puppet-lint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def report(problems)
190190
print_github_annotation(message) if configuration.github_actions
191191
end
192192
end
193-
$stderr.puts 'Try running `puppet parser validate <file>`' if problems.any? { |p| p[:check] == :syntax }
193+
warn 'Try running `puppet parser validate <file>`' if problems.any? { |p| p[:check] == :syntax }
194194
json
195195
end
196196

lib/puppet-lint/data.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def parse_control_comments
600600
if top_override.nil?
601601
# TODO: refactor to provide a way to expose problems from
602602
# PuppetLint::Data via the normal problem reporting mechanism.
603-
$stderr.puts "WARNING: lint:endignore comment with no opening lint:ignore:<check> comment found on line #{token.line}"
603+
warn "WARNING: lint:endignore comment with no opening lint:ignore:<check> comment found on line #{token.line}"
604604
else
605605
top_override.each do |start|
606606
next if start.nil?
@@ -616,7 +616,7 @@ def parse_control_comments
616616
end
617617

618618
stack.each do |control|
619-
$stderr.puts "WARNING: lint:ignore:#{control[0][2]} comment on line #{control[0][0]} with no closing lint:endignore comment"
619+
warn "WARNING: lint:ignore:#{control[0][2]} comment on line #{control[0][0]} with no closing lint:endignore comment"
620620
end
621621
end
622622
end

0 commit comments

Comments
 (0)