Skip to content

Commit 7af621d

Browse files
Bump github.com/golangci/golangci-lint from 1.55.2 to 1.62.0 (#224)
* Bump github.com/golangci/golangci-lint from 1.55.2 to 1.62.0 Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.55.2 to 1.62.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](golangci/golangci-lint@v1.55.2...v1.62.0) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Linter fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Josh Spence <[email protected]>
1 parent 31189f2 commit 7af621d

File tree

7 files changed

+431
-1007
lines changed

7 files changed

+431
-1007
lines changed

.golangci.yaml

+4-12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ linters:
88
# Temporary
99
- 'cyclop'
1010
- 'dupl'
11+
- 'err113'
1112
- 'exhaustruct'
1213
- 'forbidigo'
1314
- 'funlen'
@@ -17,28 +18,19 @@ linters:
1718
- 'gocritic'
1819
- 'gocyclo'
1920
- 'godox'
20-
- 'goerr113'
21-
- 'gomnd'
2221
- 'gosec'
2322
- 'lll'
2423
- 'maintidx'
24+
- 'mnd'
2525
- 'nestif'
2626
- 'nlreturn'
2727
- 'paralleltest'
28+
- 'perfsprint'
2829
- 'revive'
2930
- 'stylecheck'
3031
- 'varnamelen'
3132
- 'wrapcheck'
3233
- 'wsl'
3334

3435
# Deprecated
35-
- 'deadcode'
36-
- 'exhaustivestruct'
37-
- 'golint'
38-
- 'ifshort'
39-
- 'interfacer'
40-
- 'maligned'
41-
- 'nosnakecase'
42-
- 'scopelint'
43-
- 'structcheck'
44-
- 'varcheck'
36+
- 'exportloopref'

fields/fwupdate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type firmwareUpdateApiResponseEmbeddedFirmwareDataLink struct {
3838
Href *url.URL `json:"href"`
3939
}
4040

41-
func (l firmwareUpdateApiResponseEmbeddedFirmwareDataLink) MarshalJSON() ([]byte, error) {
41+
func (l *firmwareUpdateApiResponseEmbeddedFirmwareDataLink) MarshalJSON() ([]byte, error) {
4242
var href string
4343
if l.Href != nil {
4444
href = l.Href.String()

fields/main_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7-
assert "github.com/stretchr/testify/assert"
7+
"github.com/stretchr/testify/assert"
8+
"github.com/stretchr/testify/require"
89
)
910

1011
func TestFieldInfoFromValidation(t *testing.T) {
@@ -151,7 +152,7 @@ func TestResourceTypes(t *testing.T) {
151152

152153
err := resource.processJSON(([]byte)(testData))
153154

154-
assert.Empty(t, err, "No error processing JSON")
155+
require.NoError(t, err, "No error processing JSON")
155156
assert.Equal(t, expectation.StructName, resource.StructName)
156157
assert.Equal(t, expectation.ResourcePath, resource.ResourcePath)
157158
assert.Equal(t, expectation.Types, resource.Types)

fields/version_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ func TestLatestUnifiVersion(t *testing.T) {
7474
assert.Contains(query["filter"], firmwareUpdateApiFilter("product", unifiControllerProduct))
7575

7676
resp, err := json.Marshal(respData)
77-
require.NoError(err)
77+
assert.NoError(err)
7878

7979
_, err = rw.Write(resp)
80-
require.NoError(err)
80+
assert.NoError(err)
8181
}))
8282
defer server.Close()
8383

0 commit comments

Comments
 (0)