From 4d1abe7274a3a5089d8b40cc4df66bcf0f9b5a15 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Thu, 11 Jan 2024 14:02:40 +0700 Subject: [PATCH] Add test for Makefile and add fix lints. (#118) * Add test for Makefile and add some ignores. * Disable goconst lint * Disable revive lint --- .gitignore | 8 +++++++- .golangci.yml | 2 -- Makefile | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ea4e1146..9e02b1f2 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,10 @@ # vendor/ # Go go.work -go.work.sum \ No newline at end of file +go.work.sum + +bin/ + +# IDE config +.vscode/ +.idea/ \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index c9686a60..a02ced68 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,7 +9,6 @@ linters: - exportloopref - errcheck - gci - - goconst - gocritic - gofumpt - gosec @@ -22,7 +21,6 @@ linters: - thelper - typecheck - stylecheck - - revive - typecheck - tenv - unconvert diff --git a/Makefile b/Makefile index 7d70d5b5..b208c3c9 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,9 @@ install: go.sum build: go build $(BUILD_FLAGS) -o bin/feeappd ./cmd/feeappd +test: + go test -race -v ./... + docker-build-debug: @DOCKER_BUILDKIT=1 docker build -t feeapp:debug -f Dockerfile . @@ -100,7 +103,7 @@ lint: @find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run mvdan.cc/gofumpt -w . @find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run github.com/client9/misspell/cmd/misspell -w @find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run golang.org/x/tools/cmd/goimports -w -local github.com/osmosis-labs/fee-abstraction -.PHONY: lint +.PHONY: lint test ############################################################################### ### Interchain test ###