Skip to content

Commit

Permalink
Update golangci-lint to 1.62.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Dec 19, 2024
1 parent 67a8686 commit b0ea790
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Update README.md instructions when bumping this.
version: v1.55.1
version: v1.62.2
# Always run this step so that all linting errors can be seen at once.
if: always()
12 changes: 8 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

run:
timeout: 5m
skip-dirs:

issues:
exclude-dirs:
# Contains a cloned subset of oasis-core. Some types are unused, some
# formatting is haphazard. We don't care much; this code is meant to be
# frozen in time.
- coreapi

issues:
exclude-rules:
- path: '(.+)_test\.go'
linters:
Expand All @@ -36,7 +37,6 @@ linters:
- dogsled
- errcheck
- exhaustive
- exportloopref
- goconst
- gocritic
- gocyclo
Expand Down Expand Up @@ -74,7 +74,11 @@ linters-settings:
default-signifies-exhaustive: true
govet:
# Enabled checking for shadowed variables.
check-shadowing: true
shadow: true
gosec:
excludes:
# https://github.com/securego/gosec#available-rules
- G115
goimports:
# Put local imports after 3rd-party packages.
local-prefixes: github.com/oasisprotocol/nexus
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ create a PR, but without them, you're at the mercy of CI.

```sh
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.55.1
| sh -s -- -b $(go env GOPATH)/bin v1.62.2
```

- **gofumpt**: `go install mvdan.cc/gofumpt@latest`
Expand Down
1 change: 0 additions & 1 deletion log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func TestLoggerJSON(t *testing.T) {
require.NoError(t, err)

l.Debug("a statement")
//nolint:goconst
require.Regexp(t, regexp.MustCompile(
`{"caller":"log_test\.go:\d{1,4}","level":"debug","module":"log-test","msg":"a statement","ts":"`+tsRegex+`"}\n`),
b.String())
Expand Down
1 change: 0 additions & 1 deletion storage/postgres/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func TestInvalidQuery(t *testing.T) {
client := testutil.NewTestClient(t)
defer client.Close()

//nolint:sqlclosecheck
_, err := client.Query(context.Background(), `
an invalid query
`)
Expand Down

0 comments on commit b0ea790

Please sign in to comment.