fix(lint): address errcheck and De Morgan's law violations in doctor/fix

- Handle file.Close() errors in deletions.go and deletions_test.go
- Simplify boolean logic to apply De Morgan's law in common.go
- All golangci-lint checks now pass
This commit is contained in:
Steve Yegge
2025-12-14 14:12:13 -08:00
parent a22d949cbd
commit 3a4da4e08d
3 changed files with 10 additions and 6 deletions

View File

@@ -47,11 +47,11 @@ func TestGetCurrentJSONLIDs_SkipsTombstones(t *testing.T) {
encoder := json.NewEncoder(file)
for _, issue := range issues {
if err := encoder.Encode(issue); err != nil {
file.Close()
_ = file.Close()
t.Fatalf("Failed to write issue to JSONL: %v", err)
}
}
file.Close()
_ = file.Close()
// Call getCurrentJSONLIDs
ids, err := getCurrentJSONLIDs(jsonlPath)