Handle catalog footer write errors

This commit is contained in:
Snider 2026-04-16 06:39:33 +01:00
parent a9e369f4c2
commit bba74baed0

View file

@ -372,7 +372,9 @@ func newCatalogCommand() *cli.Command {
for _, rule := range rules {
fmt.Fprintf(command.OutOrStdout(), "%-14s [%-8s] %s\n", rule.ID, rule.Severity, rule.Title)
}
fmt.Fprintf(os.Stderr, "\n%d rule(s)\n", len(rules))
if _, err := fmt.Fprintf(os.Stderr, "\n%d rule(s)\n", len(rules)); err != nil {
return err
}
return nil
})
cli.StringFlag(listCmd, &listLanguage, "lang", "l", "", "Filter by language")