ci(lint): fix golangci-lint complaints (#90)

This commit is contained in:
2023-11-16 13:11:52 +00:00
committed by GitHub
parent 8c9aba9a6b
commit bf81afeb4b
7 changed files with 9 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.40
version: v1.55
env:
VERBOSE: "true"

View File

@@ -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:

View File

@@ -145,7 +145,7 @@ func (s *Updater) Update(
}
func (s *Updater) putFile(
ctx context.Context,
_ context.Context,
chk *LiveCheck,
filename string,
content []byte,

View File

@@ -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

View File

@@ -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")

View File

@@ -116,6 +116,7 @@ func NewLicense() License {
return License{}
}
//nolint:goconst
func (s *License) Render() []string {
var l []string

View File

@@ -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",