🚨 Update linter and fix new warnings

This commit is contained in:
Dan Jones 2025-07-02 14:14:04 -05:00
commit 186bf5fcba
4 changed files with 24 additions and 21 deletions

View file

@ -1,6 +1,7 @@
package convids
import (
"cmp"
"context"
"errors"
"fmt"
@ -17,6 +18,7 @@ import (
)
func NewData(path string) (*Data, error) {
//nolint:gosec // I don't care if this is user input
f, err := os.Open(path)
if err != nil {
return nil, err
@ -152,8 +154,8 @@ func WalkFiles(d *Data, stopOnError bool, gp GroupPrinter, cb ShowWalker) (err e
func DryRun(out io.Writer) ShowWalker {
return func(s *Show, path string) error {
fmt.Fprintf(out, "Saving %s to %s\n", path, s.Folder)
return ErrSkipped
_, err := fmt.Fprintf(out, "Saving %s to %s\n", path, s.Folder)
return cmp.Or(err, ErrSkipped)
}
}
@ -175,6 +177,6 @@ func GetShowWithIO(ctx context.Context, stdin io.Reader, stdout, stderr io.Write
func PrintGroupName(out io.Writer) GroupPrinter {
return func(name string, group Shows) {
fmt.Fprintf(out, "Checking %s shows\n\n", name)
_, _ = fmt.Fprintf(out, "Checking %s shows\n\n", name)
}
}