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

remove some linters to make ci faster #2116

Merged
merged 3 commits into from
Jul 10, 2023
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
1 change: 0 additions & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
go build -mod=readonly ./...
- name: Run golangci-lint
run: |
# golangci-lint run --config .golangci.yml --issues-exit-code 0
golangci-lint run --config .golangci.yml \
| reviewdog -f=golangci-lint -name=golangci -reporter=${REPORTER} -level=${LEVEL}
env:
Expand Down
26 changes: 15 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ linters:
- gochecknoglobals
- gochecknoinits
- goconst
- gocritic
- godot
- godox
- gofumpt
Expand Down Expand Up @@ -91,14 +90,14 @@ linters:
- unparam
- unused #(megacheck)
- usestdlibvars
- zerologlint
# Disabled by your configuration linters
# - cyclop
# - errcheck
# - forbidigo
# - funlen
# - gci
# - gocognit
# - gocritic
# - gocyclo
# - goerr113
# - gofmt
Expand All @@ -123,6 +122,7 @@ linters:
# - whitespace
# - wrapcheck
# - wslissues:
# - zerologlint
exclude-use-default: false
exclude-rules:
- path: _test\.go
Expand Down Expand Up @@ -163,15 +163,19 @@ linters-settings:
json: snake
yaml: snake
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- errors: "errors is allowed only by internal/errors"
- k8s.io/apimachinery/pkg/api/errors: "errors is allowed only by internal/errors"
- github.com/cockroachdb/errors: "errors is allowed only by internal/errors"
- github.com/pkg/errors: "errors is allowed only by internal/errors"
- github.com/go-errors/errors: "errors is allowed only by internal/errors"
- golang.org/x/sync/errgroup: "errgroup is allowed only by internal/errgroup"
rules:
main:
deny:
- pkg: "errors"
desc: "errors is allowed only by internal/errors"
- pkg: "k8s.io/apimachinery/pkg/api/errors"
desc: "errors is allowed only by internal/errors"
- pkg: "github.com/cockroachdb/errors"
desc: "errors is allowed only by internal/errors"
- pkg: "github.com/pkg/errors"
desc: "errors is allowed only by internal/errors"
- pkg: github.com/go-errors/errors
desc: "errors is allowed only by internal/errors"
govet:
check-shadowing: true
enable-all: true