From 88bbc2f4419d442a45fb736c4798bc18850c8eba Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 12 Sep 2026 20:12:12 +1000 Subject: [PATCH] check the stderr writes errcheck now sees --- cmd/catalog-impact/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/catalog-impact/main.go b/cmd/catalog-impact/main.go index ca43706..ffc9a4a 100644 --- a/cmd/catalog-impact/main.go +++ b/cmd/catalog-impact/main.go @@ -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)) } }