Skip to content

Commit

Permalink
replaced linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sadiq1971 committed Jan 12, 2024
1 parent 0d48e57 commit 5b1e8d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5b1e8d5

Please sign in to comment.