Skip to content

Commit

Permalink
Merge pull request #120 from b2network/add-lint
Browse files Browse the repository at this point in the history
Add more lint checks to Makefile
  • Loading branch information
Stonepapa authored Feb 26, 2024
2 parents eb0a355 + a412aef commit 4b3426a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ benchmark:
### Linting ###
###############################################################################

lint-all: lint yaml-lint markdown-lint dockerfile-lint gosec lint-cosmos-gosec proto-lint

lint:
@@test -n "$$golangci-lint version | awk '$4 >= 1.42')"
golangci-lint run --out-format=tab -n
Expand All @@ -385,6 +387,23 @@ format-fix:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' -not -name '*.pb.gw.go' | xargs misspell -w
.PHONY: format

lint-cosmos-gosec:
gosec -include=G701,G703,G704 ./...

gosec:
gosec -exclude-dir=localnet* ./...
.PHONY: gosec lint-cosmos-gosec

yaml-lint:
yamllint -c .yamllint -s .

markdown-lint:
markdownlint -c .markdownlint.yml .

dockerfile-lint:
hadolint Dockerfile
.PHONY: yaml-lint markdown-lint dockerfile-lint

###############################################################################
### Protobuf ###
###############################################################################
Expand Down

0 comments on commit 4b3426a

Please sign in to comment.