chore: reconcile on-client path + add golangci-lint config (R13+R14)
R13 — on-client path reconciliation: - AGENTS.md: 6 occurrences of /opt/homelab-context/ → /opt/homelab/ (sections 1, 2, 5, 7) - .agents/NOMOS.md: 2 occurrences of /opt/homelab-context/ → /opt/homelab/ - CLIENTS.md already used /opt/homelab/ — now consistent across all docs. The repo is still named 'homelab-context' (git remote), it just clones to /opt/homelab/ on enrolled clients per CLIENTS.md. R14 — golangci-lint/staticcheck/govulncheck tooling: - .golangci.yml (new): config enabling govet, staticcheck, ineffassign, unused, errcheck, gosimple, typecheck, misspell, revive. Excludes generated code (internal/httpapi/gen/, internal/db/sqlcgen/) and relaxes errcheck in test files. - Makefile: split 'lint' target into vet, golangci, govulncheck subtargets. Each checks if the tool is installed and prints install instructions if not. 'make lint' runs all three. - CI already had golangci-lint-action + govulncheck (both advisory); the action auto-discovers .golangci.yml.
This commit is contained in:
41
.golangci.yml
Normal file
41
.golangci.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
# golangci-lint configuration for Oikos
|
||||
# Docs: https://golangci-lint.run/usage/configuration/
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- govet # go vet
|
||||
- staticcheck # advanced static analysis
|
||||
- ineffassign # detect ineffectual assignments
|
||||
- unused # find unused identifiers
|
||||
- errcheck # check for unchecked errors
|
||||
- gosimple # simplifications
|
||||
- typecheck # standard type checking
|
||||
- misspell # find commonly misspelled English words in comments
|
||||
- revive # fast, configurable linter (replaces golint)
|
||||
|
||||
linters-settings:
|
||||
errcheck:
|
||||
# Allow unchecked errors on common Close/Flush patterns (deferred cleanup)
|
||||
exclude-functions:
|
||||
- (io.Closer).Close
|
||||
- (*os.File).Close
|
||||
|
||||
issues:
|
||||
# Exclude generated code
|
||||
exclude-rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- errcheck
|
||||
- path: internal/httpapi/gen/
|
||||
linters:
|
||||
- all
|
||||
- path: internal/db/sqlcgen/
|
||||
linters:
|
||||
- all
|
||||
# Don't auto-exclude common patterns
|
||||
exclude-use-default: false
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
Reference in New Issue
Block a user