Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick from upstream to attempt to fix linting #349

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: v1.55.1
args: --timeout=8m
4 changes: 2 additions & 2 deletions .github/workflows/test_crdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
check-latest: true
cache: true

- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: 'v1.55.1'
args: ./storage/crdb
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: docker run --rm -d --name=roach -p 8080:8080 -p 26257:26257 -v "${PWD}/cockroach-data:/cockroach/cockroach-data" cockroachdb/cockroach:latest start-single-node --insecure

- name: Wait for CockroachDB
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
uses: nick-fields/retry@c97818ca39074beaea45180dba704f92496a0082 # v3.0.1
with:
timeout_seconds: 15
max_attempts: 3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pgdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
check-latest: true
cache: true

- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: 'v1.55.1'
args: ./storage/postgresql
Expand Down
16 changes: 9 additions & 7 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 90s
skip-files:
- types/internal/tls/tls.go
timeout: 90s

linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
# TODO(mhutchinson): lower this again after reworking interceptor
min-complexity: 26
depguard:
list-type: blacklist
packages:
- golang.org/x/net/context
- github.com/gogo/protobuf/proto
rules:
main:
deny:
- pkg: "golang.org/x/net/context"
- pkg: "github.com/gogo/protobuf/proto"

issues:
# Don't turn off any checks by default. We can do this explicitly if needed.
Expand All @@ -27,3 +26,6 @@ issues:
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
- linters: [staticcheck]
text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'

exclude-files:
- types/internal/tls/tls.go
Loading