From 9cf1559c085ac751544a1dba0d17ab22c6c14261 Mon Sep 17 00:00:00 2001 From: Yevhen Pavlov Date: Sat, 23 Nov 2024 23:28:22 +0200 Subject: [PATCH] chore: Add more tools (#25) --- Makefile | 16 ++++++++++++++++ README.md | 3 +++ 2 files changed, 19 insertions(+) diff --git a/Makefile b/Makefile index 7a24ea6..d1b0dd8 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,22 @@ air: get-deps generate-web go install github.com/air-verse/air@latest air +## format: Fix code format issues +.PHONY: format +format: + go run mvdan.cc/gofumpt@latest -w -l . + +## deadcode: Run deadcode tool for find unreachable functions +deadcode: + go run golang.org/x/tools/cmd/deadcode@latest -test ./... + +## audit: Quality checks +.PHONY: audit +audit: + go mod verify + go vet ./... + go run golang.org/x/vuln/cmd/govulncheck@latest ./... + ## check-go: Check that Go is installed .PHONY: check-go check-go: diff --git a/README.md b/README.md index cb010e3..47a2a56 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ Commands: get-deps Download go dependencies generate-web Compile templ files via github.com/a-h/templ/cmd/templ air Build and start application in live reload mode via air + format Fix code format issues + deadcode Run deadcode tool for find unreachable functions + audit Quality checks check-go Check that Go is installed help Display help ```