[#164] Makefile: Add clang-format support

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-11-15 19:02:47 +03:00
parent 124397578d
commit fe90707913
Signed by: achuprov
GPG key ID: 2D916FFD803B0EDD

View file

@ -62,10 +62,19 @@ cover:
@go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
@go tool cover -html=coverage.txt -o coverage.html
# Install gofumpt
fumpt-install:
@echo "⇒ Processing fumpt install"
@rm -rf $(GOFUMPT_DIR)
@mkdir $(GOFUMPT_DIR)
@GOBIN=$(GOFUMPT_VERSION_DIR) go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION)
# Reformat code
format:
@echo "⇒ Processing gofmt check"
@gofmt -s -w ./
@echo "⇒ Processing clang format"
@clang-format -i **/*.js
# Run linters
lint: