check the stderr writes errcheck now sees
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
2026-09-12 20:12:12 +10:00
parent 86e4958bcb
commit 88bbc2f441
+5 -5
View File
@@ -149,18 +149,18 @@ func run(ctx context.Context, out, errOut io.Writer, opts *options) error {
// stays clean.
func warn(w io.Writer, r *impact.Result) {
for _, file := range r.UnmappedFiles {
fmt.Fprintf(w, "warning: %s matches no mapping rule; every host is included\n", file)
_, _ = fmt.Fprintf(w, "warning: %s matches no mapping rule; every host is included\n", file)
}
for _, line := range impact.UnresolvedLines(r.UnresolvedRefs) {
fmt.Fprintf(w, "warning: %s did not resolve to a class name; the host list may be incomplete\n", line)
_, _ = fmt.Fprintf(w, "warning: %s did not resolve to a class name; the host list may be incomplete\n", line)
}
for _, line := range r.NodeWarnings {
fmt.Fprintf(w, "warning: %s; the estate table may be missing hosts\n", line)
_, _ = fmt.Fprintf(w, "warning: %s; the estate table may be missing hosts\n", line)
}
for _, class := range r.OrphanClasses {
fmt.Fprintf(w, "warning: class %s is declared by nothing and listed in no hiera_include; it reaches no hosts\n", class)
_, _ = fmt.Fprintf(w, "warning: class %s is declared by nothing and listed in no hiera_include; it reaches no hosts\n", class)
}
if r.Truncated {
fmt.Fprintf(w, "warning: %d hosts affected, output capped at %d by --limit\n", r.Summary.Hosts, len(r.Hosts))
_, _ = fmt.Fprintf(w, "warning: %d hosts affected, output capped at %d by --limit\n", r.Summary.Hosts, len(r.Hosts))
}
}