diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c349108..494b7c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.40 + version: v1.55 env: VERBOSE: "true" diff --git a/.golangci.yml b/.golangci.yml index deed852..f58e749 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,8 +23,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - - depguard - dupl - errcheck - exportloopref @@ -50,11 +48,9 @@ linters: - revive - sqlclosecheck - staticcheck - - structcheck - typecheck - unconvert - unused - - varcheck - whitespace issues: diff --git a/pkg/cask/update.go b/pkg/cask/update.go index cce5bdf..a7feeb8 100644 --- a/pkg/cask/update.go +++ b/pkg/cask/update.go @@ -145,7 +145,7 @@ func (s *Updater) Update( } func (s *Updater) putFile( - ctx context.Context, + _ context.Context, chk *LiveCheck, filename string, content []byte, diff --git a/pkg/dmg/assets/assets.go b/pkg/dmg/assets/assets.go index 0b5b596..3d9e121 100644 --- a/pkg/dmg/assets/assets.go +++ b/pkg/dmg/assets/assets.go @@ -8,6 +8,7 @@ import ( //go:generate tiffutil -cathidpicheck bg.png bg@2x.png -out bg.tif // Background is a raw byte slice of bytes of bg.tiff +// //go:embed bg.tif var Background []byte @@ -19,6 +20,7 @@ func BackgroundTempFile() (string, error) { } // Icon is a raw byte slice of bytes of vol.icns +// //go:embed vol.icns var Icon []byte diff --git a/pkg/dmg/dmg.go b/pkg/dmg/dmg.go index 8ea665f..c406a3a 100644 --- a/pkg/dmg/dmg.go +++ b/pkg/dmg/dmg.go @@ -22,8 +22,9 @@ type Options struct { Output io.Writer } -//nolint:funlen // Create will create a *.dmg disk image as specified by the given Options. +// +//nolint:funlen func Create(ctx context.Context, opts *Options) (string, error) { logger := hclog.FromContext(ctx).Named("package") diff --git a/pkg/dmgbuild/license.go b/pkg/dmgbuild/license.go index 92f0499..996283e 100644 --- a/pkg/dmgbuild/license.go +++ b/pkg/dmgbuild/license.go @@ -116,6 +116,7 @@ func NewLicense() License { return License{} } +//nolint:goconst func (s *License) Render() []string { var l []string diff --git a/pkg/dmgbuild/settings.go b/pkg/dmgbuild/settings.go index 5b8c899..bcd211b 100644 --- a/pkg/dmgbuild/settings.go +++ b/pkg/dmgbuild/settings.go @@ -90,9 +90,10 @@ func NewSettings() *Settings { } } -//nolint:funlen,gocyclo // Render returns a string slice where each string is a separate settings // statement. +// +//nolint:funlen,gocyclo func (s *Settings) Render() ([]string, error) { r := []string{ "# -*- coding: utf-8 -*-\n",