5.9 KiB
5.9 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | must_haves | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| quick-13 | 13 | execute | 1 |
|
true |
|
Purpose: Clean lint output for the codebase. Output: Zero lint issues from golangci-lint.
<execution_context> @/home/caleb/.config/opencode/get-shit-done/workflows/execute-plan.md @/home/caleb/.config/opencode/get-shit-done/templates/summary.md </execution_context>
@.planning/STATE.md Task 1: Fix lint issues in main source files (library.go, genevents/main.go, testhelper.go) backend/library/library.go backend/events/cmd/genevents/main.go backend/database/testhelper.go **backend/database/testhelper.go** (1 errcheck): - Line 66: Change `db.Close()` to `_ = db.Close()` inside the t.Cleanup funcbackend/events/cmd/genevents/main.go (10 issues: 4 errcheck, 3 nlreturn, 3+ wsl):
- Line 35: Add blank line before
return - Line 61: Add blank line before
if err != nil(wsl: only one cuddle assignment before if) - Line 85: Add blank line before
for i, name := range vs.Names { - Line 89: Move
bl, ok := ...assignment so it's not cuddled incorrectly — add blank line before it - Line 90: Add blank line before
if !ok || bl.Kind != token.STRING - Line 113: Add blank line before
return s - Line 129: Add blank line before
for _, c := range g.Consts - Line 150: Add blank line before
if err != nil - Line 153: Add blank line before
tmpName := tmp.Name() - Line 156: Change
tmp.Close()to_ = tmp.Close()(errcheck) - Line 157: Change
os.Remove(tmpName)to_ = os.Remove(tmpName)(errcheck) - Line 160: Add blank line before
if err := tmp.Close() - Line 161: Change
os.Remove(tmpName)to_ = os.Remove(tmpName)(errcheck) - Line 164: Add blank line before
return os.Rename(tmpName, path)
backend/library/library.go (2 issues: 1 gofumpt, 1 wsl):
- Line 232: Add blank line before
workChan := make(...) - Line 534-536: Reformat the ScanProgress struct literal so gofumpt is happy — put opening brace on same line as
runtime.EventsEmit(l.ctx, events.LibraryScanProgress,and format the struct fields properly (run gofumpt to check exact formatting needed) golangci-lint run ./backend/database/ ./backend/events/... ./backend/library/ 2>&1 | grep -E "errcheck|nlreturn|gofumpt|wsl" | grep -E "testhelper|main.go|library.go" | wc -l should be 0 All errcheck, nlreturn, gofumpt, and wsl issues fixed in the 3 main source files
backend/config/config_test.go (2 issues: 1 golines, 1 wsl):
- Line 75: Break long t.Errorf line across multiple lines
- Line 212: Remove trailing blank line before closing
}
backend/queue/navigation_test.go (1 intrange):
- Line 17: Change
for i := 0; i < tracks; i++tofor i := range tracks
backend/queue/queue_test.go (1 intrange):
- Line 56: Change
for i := 0; i < count; i++tofor i := range count
backend/library/scan_test.go (1 wsl):
- Line 659: Remove trailing blank line before closing
}golangci-lint run ./... 2>&1 | grep -c "issue" should show "0 issues" and go test ./backend/... should pass All 31 lint issues resolved, golangci-lint reports 0 issues, all tests pass
<success_criteria>
- golangci-lint run ./... reports 0 issues
- All existing tests continue to pass
- No behavioral changes to any code </success_criteria>