From 5ee0cef012c333a67f2864825e3eed12a5a7bcd1 Mon Sep 17 00:00:00 2001 From: xanderxfz Date: Mon, 8 Apr 2024 18:35:31 +0300 Subject: [PATCH] chore: Add more makefile tools --- Makefile | 18 ++++++++++++++++++ README.md | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/Makefile b/Makefile index 6af7a0c..c3b4aa1 100644 --- a/Makefile +++ b/Makefile @@ -53,3 +53,21 @@ start: get-deps .PHONY: test test: @go test ./... + + +## 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 ./... diff --git a/README.md b/README.md index acdd3a9..e979faa 100644 --- a/README.md +++ b/README.md @@ -90,4 +90,8 @@ Commands: install Install binary file from local bin directory to /usr/local/bin/ uninstall Remove binary file from /usr/local/bin/ start Build and start application + test Run unit tests + format Fix code format issues + deadcode Run deadcode tool for find unreachable functions + audit Quality checks ```