diff --git a/.golangci.yml b/.golangci.yml index 98af080..6e40f3f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -131,13 +131,13 @@ linters-settings: # minimal occurrences count to trigger, 3 by default min-occurrences: 3 depguard: - list-type: blacklist - include-go-root: false - packages: - - github.com/sirupsen/logrus - packages-with-error-messages: - # specify an error message to output when a blacklisted package is used - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" + rules: + main: + allow: + - $gostd + - eth2-crawler + - github.com + - $all # List of file globs that will match this list of settings to compare against. misspell: # Correct spellings using locale preferences for US or UK. # Default is to use a neutral variety of English. diff --git a/Makefile b/Makefile index 855102f..672b11c 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,16 @@ help: Makefile @sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /' @echo +.PHONY: get-lint get-lint: if [ ! -f ./bin/golangci-lint ]; then \ - wget -O - -q https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s latest; \ + curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.54.2; \ fi; +.PHONY: lint lint: get-lint - ./bin/golangci-lint run ./... --timeout 5m0s + @echo " > \033[32mRunning lint...\033[0m " + ./bin/golangci-lint run --config=./.golangci.yml ## license: Adds license header to missing files. license: