Skip to content

Commit

Permalink
ci: Add lint and formating to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hochiw committed Feb 10, 2022
1 parent ad80504 commit d9115be
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,13 @@ test:
clean:
rm -rf $(BUILDDIR)/ artifacts/

.PHONY: go-mod-cache gen-proto build-reproducible build-docker build install test clean
lint:
golangci-lint run --disable-all -E errcheck --timeout 10m
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs goimports -w -local github.com/cosmos/cosmos-sdk

.PHONY: go-mod-cache gen-proto build-reproducible build-docker build install test clean lint format

0 comments on commit d9115be

Please sign in to comment.