Skip to content

Commit

Permalink
Update golangci-lint config (#2772)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi authored Jun 2, 2023
1 parent c60534b commit 40fa532
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
14 changes: 6 additions & 8 deletions .golangci-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ linters-settings:
revive:
ignore-generated-header: true
severity: warning
# TODO enable-all-rules: true
# TODO enable-all-rules: true https://github.com/FerretDB/FerretDB/issues/2748
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: exported
Expand Down Expand Up @@ -62,8 +62,9 @@ linters:
- unused
- whitespace

# TODO configure and enable one by one
# TODO https://github.com/FerretDB/FerretDB/issues/2748
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
Expand Down Expand Up @@ -110,6 +111,8 @@ linters:
- prealloc
- predeclared
- promlinter
- rowserrcheck
- sqlclosecheck
- stylecheck
- tagliatelle
- tenv
Expand All @@ -120,13 +123,8 @@ linters:
- unparam
- varcheck
- varnamelen
- wrapcheck

# TODO https://github.com/golangci/golangci-lint/issues/2649
- bodyclose
- rowserrcheck
- sqlclosecheck
- wastedassign
- wrapcheck

# deprecated
- golint
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ linters-settings:
alias: dto
- pkg: github.com/jackc/pgx-zap
alias: zapadapter
- pkg: modernc.org/sqlite/lib
alias: sqlitelib
# ineffassign
lll:
line-length: 130
Expand Down
4 changes: 0 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,6 @@ tasks:
- go vet -vettool=./bin/checkswitch{{exeExt}} ./...
- bin/task{{exeExt}} -d integration integration-lint
- bin/task{{exeExt}} -d tools tools-lint
sources:
- "**/*.go"
- "**/go.mod"
- "**/*.yml"

security:
desc: "Run security scanners"
Expand Down
4 changes: 0 additions & 4 deletions integration/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ tasks:
- ../bin/go-consistent{{exeExt}} -pedantic ./...
- ../bin/go-sumtype{{exeExt}} ./...
- go vet -vettool=../bin/checkswitch{{exeExt}} ./...
sources:
- "**/*.go"
- "../**/go.mod"
- "../**/*.yml"

integration-security:
cmds:
Expand Down
4 changes: 0 additions & 4 deletions tools/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ tasks:
- ../bin/golangci-lint{{exeExt}} run --config=../.golangci-new.yml ./checkdocs/... ./checkswitch/...
- ../bin/go-consistent{{exeExt}} -pedantic ./checkdocs/... ./checkswitch/...
- go vet -vettool=../bin/checkswitch{{exeExt}} ./checkdocs/... ./checkswitch/...
sources:
- "**/*.go"
- "../**/go.mod"
- "../**/*.yml"

0 comments on commit 40fa532

Please sign in to comment.