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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user