diff --git a/Makefile b/Makefile index 1aca799..bcfe74c 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,9 @@ verify: ## Verify dependencies have expected content format: ## Format go code go fmt ./... +lint: ## Run linter (staticcheck) + staticcheck -f stylish ./... + test: ## Run tests go test ./... diff --git a/README.md b/README.md index ff9af2a..42e187a 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ Use these Make targets for convenience: - `build`: Compile project - `tidy`: Add missing and remove unused modules - `verify`: Verify dependencies have expected content +- `format`: Format go code +- `lint`: Run linter (staticcheck) - `test`: Run tests - `cert`: Create https certificate for local testing diff --git a/flake.nix b/flake.nix index e9c2495..f96694a 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ go + go-tools # staticcheck gomod2nix.packages.${system}.default sanic ];