From d6e99161a9e671c8935200853635a7cd805318ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 4 Feb 2026 01:53:28 +0100 Subject: [PATCH] docs: add linting instructions to CLAUDE.md Document the requirement to run golangci-lint, govulncheck, and go vet before completing work on a feature branch. Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index b254e93..425f590 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -178,6 +178,22 @@ hm-options --version # Show version - **Use `nix run` to run binaries** (e.g., `nix run .#nixos-options -- serve`) - File paths in responses should use format `path/to/file.go:123` +### Linting +**Before completing work on a feature**, run all linting tools to ensure code quality: + +```bash +# Run all linters (should report 0 issues) +nix develop -c golangci-lint run ./... + +# Check for known vulnerabilities in dependencies +nix develop -c govulncheck ./... + +# Run go vet for additional static analysis +nix develop -c go vet ./... +``` + +All three tools should pass with no issues before merging a feature branch. + ### Nix Build Requirement **IMPORTANT**: When running `nix build`, `nix run`, or similar commands, new files must be tracked by git first. Nix flakes only see git-tracked files. If you create new files, run `git add ` before attempting nix operations.