From d52ba880cdb10811c3bc8c85719d5bc05742cb6a Mon Sep 17 00:00:00 2001 From: Ricardo Band Date: Wed, 24 Jan 2024 13:28:54 +0100 Subject: [PATCH] add fmt and lint to README --- Makefile | 3 +++ README.md | 2 ++ flake.nix | 1 + 3 files changed, 6 insertions(+) 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 ];