mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 04:56:39 +00:00
ci(lint): fix golangci-lint complaints (#90)
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: v1.40
|
||||
version: v1.55
|
||||
env:
|
||||
VERBOSE: "true"
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -145,7 +145,7 @@ func (s *Updater) Update(
|
||||
}
|
||||
|
||||
func (s *Updater) putFile(
|
||||
ctx context.Context,
|
||||
_ context.Context,
|
||||
chk *LiveCheck,
|
||||
filename string,
|
||||
content []byte,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ func NewLicense() License {
|
||||
return License{}
|
||||
}
|
||||
|
||||
//nolint:goconst
|
||||
func (s *License) Render() []string {
|
||||
var l []string
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user