Repository navigation
Closed
Description
Summary
Pre-commit checks fail with 236 linting issues from golangci-lint. These are pre-existing issues that need systematic cleanup.
Issue Breakdown
| Category | Count | Description |
|---|---|---|
| errcheck | 50 | Unchecked error returns |
| revive | 50 | Missing comments on exported types |
| gocritic | 50 | Code quality suggestions |
| gocognit | 23 | Cognitive complexity too high |
| nilerr | 19 | Returning nil when error is set |
| gosec | 16 | Security issues |
| unparam | 11 | Unused parameters |
| errorlint | 6 | Error wrapping issues |
| staticcheck | 4 | Static analysis findings |
| noctx | 3 | HTTP requests without context |
| misspell | 2 | Spelling errors |
| gocyclo | 1 | Cyclomatic complexity |
| unused | 1 | Unused function |
Priority Categories
High Priority (Security/Correctness)
gosec (16) - Security issues:
- Hardcoded credentials
- Insecure file permissions
- Potential command injection
errcheck (50) - Unchecked errors:
- Related to Fix ignored errors in security-sensitive operations #75 (ignored errors in security-sensitive operations)
- Many are legitimate (fmt.Fprintf to stderr)
- Some are critical (credentials.Get, config operations)
nilerr (19) - Returning nil with error:
- Functions that check
if err != nilbut returnnil, nil - May mask failures
noctx (3) - HTTP without context:
- HTTP requests that can't be cancelled
- Should use
http.NewRequestWithContext
Medium Priority (Code Quality)
gocognit (23) / gocyclo (1) - Complexity:
- Functions too complex to reason about
- Should be refactored into smaller pieces
staticcheck (4) - Static analysis:
- Unused append results
- Nil context passed to functions
unparam (11) - Unused parameters:
- Dead code or incomplete implementations
unused (1) - Unused function:
extractNodeIDininternal/starlark/plan.go
Low Priority (Style)
revive (50) - Missing comments:
- Exported types/methods without documentation
- Can be batch-fixed
gocritic (50) - Code suggestions:
elseif→else if- Unnecessary type conversions
- Style improvements
errorlint (6) - Error wrapping:
- Should use
errors.Is/errors.As - Should use
%wfor wrapping
misspell (2) - Spelling:
- "Decommision" → "Decommission"
Files with Most Issues
Based on the lint output, high-issue files include:
internal/execution/ops_service.go- Many exported methods without commentsinternal/console/*.go- Unchecked fmt errorsinternal/starlark/*.go- Complex functions, unchecked errorsinternal/bindgen/cobra/extractor.go- Many unchecked errors
Approach
- Immediate: Fix gosec and nilerr issues (correctness)
- Short-term: Fix errcheck for security-sensitive operations
- Ongoing: Add comments to exported types as code is touched
- Refactor: Break down high-complexity functions
Related Issues
- Fix ignored errors in security-sensitive operations #75 - Ignored errors in security-sensitive operations (subset of errcheck)
- Claude Code: Errors of Judgment noblefactor-engprod#317 - Errors in judgment
Commands
Run lint check:
pre-commit run golangci-lint --all-filesRun specific linter:
golangci-lint run --enable=errcheck ./...
golangci-lint run --enable=gosec ./...Metadata
Metadata
Assignees
Labels
No labels
Activity
docs(plans): mark compensation plan as complete
docs(plans): mark compensation plan as complete (#147)
David-Noble-at-work commentedon Aug 7, 2026
Closing as addressed by the lint ladder: the true uncapped count was 2,486 findings; it reached zero across PRs #290–#320, every surviving suppression carries a stated reason, and CI enforces board zero (PR #321 fixed the gate's verdict; #328 pinned golangci v2.12.2).