fix: resolve all golangci-lint v2 warnings (29 issues)
Migrate to golangci-lint v2 config format and fix all lint issues: - errcheck: add explicit error handling for Close/Remove calls - gocritic: convert if-else chains to switch statements - gosec: tighten file permissions, add nolint for intentional cases - staticcheck: lowercase error strings, simplify boolean returns Also update Makefile to install golangci-lint v2 and update CLAUDE.md.
This commit is contained in:
@@ -54,7 +54,7 @@ scripts/ Smoke tests, benchmarks, release
|
||||
|
||||
- **Language:** Go 1.25+
|
||||
- **Formatter:** `gofumpt` (enforced in CI)
|
||||
- **Linter:** `golangci-lint` v1.64.8 (config in `.golangci.yml`)
|
||||
- **Linter:** `golangci-lint` v2 (config in `.golangci.yml`)
|
||||
- **Import order:** stdlib, third-party, local (`gitea.app.monadical.io/monadical/greywall`)
|
||||
- **Platform code:** build tags (`//go:build linux`, `//go:build darwin`) with `*_stub.go` for unsupported platforms
|
||||
- **Error handling:** custom error types (e.g., `CommandBlockedError`)
|
||||
|
||||
Reference in New Issue
Block a user