From 2b7306d62d59b6470be04bc44f019508d9d57eac Mon Sep 17 00:00:00 2001 From: Anton Iakimov Date: Tue, 9 Apr 2024 10:09:00 +0200 Subject: [PATCH] refactor: move lint args to configuration file --- .golangci.yml | 7 +++++-- Makefile | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ec6cf2c03..cec8481c6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ run: concurrency: 4 - deadline: 1m + timeout: 5m issues-exit-code: 1 modules-download-mode: vendor tests: true @@ -53,7 +53,9 @@ linters: - megacheck - misspell - 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 - varcheck fast: false @@ -64,6 +66,7 @@ issues: - "G304: Potential file inclusion via variable" # gosec - "G104: Errors unhandled." #gosec - "lib._Ctype_char, which can be annoying to use" # golint + - "SA1019" # staticcheck exclude-rules: - path: eth-node/keystore/passphrase\.go text: "make it a constant" diff --git a/Makefile b/Makefile index 260ad2cb7..0dd9fa5f4 100644 --- a/Makefile +++ b/Makefile @@ -354,7 +354,7 @@ canary-test: node-canary 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