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 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 01:53:28 +01:00
parent ea11dd5e14
commit d6e99161a9

View File

@@ -178,6 +178,22 @@ hm-options --version # Show version
- **Use `nix run` to run binaries** (e.g., `nix run .#nixos-options -- serve`) - **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` - 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 ### 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 <file>` before attempting nix operations. **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 <file>` before attempting nix operations.