refactor: move lint args to configuration file

This commit is contained in:
Anton Iakimov 2024-04-09 10:09:00 +02:00
parent 7b09ee073d
commit 2b7306d62d
No known key found for this signature in database
GPG Key ID: DEA1FE58DD8BF7FA
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
run: run:
concurrency: 4 concurrency: 4
deadline: 1m timeout: 5m
issues-exit-code: 1 issues-exit-code: 1
modules-download-mode: vendor modules-download-mode: vendor
tests: true tests: true
@ -53,7 +53,9 @@ linters:
- megacheck - megacheck
- misspell - misspell
- structcheck - structcheck
# - typecheck # You can't disable typecheck, see:
# https://github.com/golangci/golangci-lint/blob/master/docs/src/docs/welcome/faq.mdx#why-do-you-have-typecheck-errors
- typecheck
- unconvert - unconvert
- varcheck - varcheck
fast: false fast: false
@ -64,6 +66,7 @@ issues:
- "G304: Potential file inclusion via variable" # gosec - "G304: Potential file inclusion via variable" # gosec
- "G104: Errors unhandled." #gosec - "G104: Errors unhandled." #gosec
- "lib._Ctype_char, which can be annoying to use" # golint - "lib._Ctype_char, which can be annoying to use" # golint
- "SA1019" # staticcheck
exclude-rules: exclude-rules:
- path: eth-node/keystore/passphrase\.go - path: eth-node/keystore/passphrase\.go
text: "make it a constant" text: "make it a constant"

View File

@ -354,7 +354,7 @@ canary-test: node-canary
lint: lint:
@echo "lint" @echo "lint"
@golangci-lint --exclude=SA1019 run ./... --deadline=5m @golangci-lint run ./...
ci: lint canary-test test-unit test-e2e ##@tests Run all linters and tests at once ci: lint canary-test test-unit test-e2e ##@tests Run all linters and tests at once