Skip to content

Commit

Permalink
appease golint
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <jason@chainguard.dev>
  • Loading branch information
imjasonh committed Aug 21, 2024
1 parent dcc291a commit 3e17be9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"slices"
"strings"

"github.com/chainguard-dev/clog"
"github.com/charmbracelet/log"
"github.com/dustin/go-humanize"
"golang.org/x/exp/maps"
Expand Down Expand Up @@ -574,14 +575,15 @@ func LintBuild(ctx context.Context, packageName string, path string, require, wa
fsys := os.DirFS(path)

if err := lintPackageFS(ctx, packageName, fsys, warn); err != nil {
log.Warnf(err.Error())
log.Warnf("linting package FS: %s", err)
}
log.Infof("linting apk: %s", packageName)
return lintPackageFS(ctx, packageName, fsys, require)
}

// Lint the given APK at the given path
func LintAPK(ctx context.Context, path string, require, warn []string) error {
log := clog.FromContext(ctx)
if err := checkLinters(append(require, warn...)); err != nil {
return err
}
Expand Down Expand Up @@ -643,7 +645,7 @@ func LintAPK(ctx context.Context, path string, require, warn []string) error {

log.Infof("linting apk: %s (size: %s)", pkgname, humanize.Bytes(uint64(exp.Size)))
if err := lintPackageFS(ctx, pkgname, exp.TarFS, warn); err != nil {
log.Warnf(err.Error())
log.Warnf("linting package FS: %s", err)
}
return lintPackageFS(ctx, pkgname, exp.TarFS, require)
}

0 comments on commit 3e17be9

Please sign in to comment.