Skip to content

Commit

Permalink
Makefile: drop gofmt in favor of golangci-lint (cosmos#7260)
Browse files Browse the repository at this point in the history
* setup: update linter make jobs

* go lint: remove wsl from golangci-lint config

* rollback to use disable-all

* bring back vendor rules

* lint fails on golangci-lint error

Co-authored-by: Alessio Treglia <[email protected]>
  • Loading branch information
robert-zaremba and Alessio Treglia authored Sep 23, 2020
1 parent a722933 commit f52cce2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ benchmark:
###############################################################################

lint:
golangci-lint run --out-format=tab --issues-exit-code=0
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' | xargs gofmt -d -s
.PHONY: lint
golangci-lint run --out-format=tab

lint-fix:
golangci-lint run --fix --out-format=tab --issues-exit-code=0
.PHONY: lint lint-fix

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs gofmt -w -s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// nolint:deadcode,unused
var (
pk1 = ed25519.GenPrivKey().PubKey()
pk2 = ed25519.GenPrivKey().PubKey()
Expand Down

0 comments on commit f52cce2

Please sign in to comment.