add fmt and lint to README

This commit is contained in:
XenGi 2024-01-24 13:28:54 +01:00
parent bc2f64eefd
commit d52ba880cd
Signed by: xengi
SSH key fingerprint: SHA256:jxWM2RTHvxxcncXycwwWkP7HCWb4VREN05UGJTbIPZg
3 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,9 @@ verify: ## Verify dependencies have expected content
format: ## Format go code format: ## Format go code
go fmt ./... go fmt ./...
lint: ## Run linter (staticcheck)
staticcheck -f stylish ./...
test: ## Run tests test: ## Run tests
go test ./... go test ./...

View file

@ -50,6 +50,8 @@ Use these Make targets for convenience:
- `build`: Compile project - `build`: Compile project
- `tidy`: Add missing and remove unused modules - `tidy`: Add missing and remove unused modules
- `verify`: Verify dependencies have expected content - `verify`: Verify dependencies have expected content
- `format`: Format go code
- `lint`: Run linter (staticcheck)
- `test`: Run tests - `test`: Run tests
- `cert`: Create https certificate for local testing - `cert`: Create https certificate for local testing

View file

@ -26,6 +26,7 @@
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
go go
go-tools # staticcheck
gomod2nix.packages.${system}.default gomod2nix.packages.${system}.default
sanic sanic
]; ];