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

@@ -86,5 +86,5 @@ func isWithinWorkspace(root, candidate string) bool {
if err != nil {
return false
}
return rel == "." || !(rel == ".." || strings.HasPrefix(rel, ".."+string(os.PathSeparator)))
return rel == "." || (rel != ".." && !strings.HasPrefix(rel, ".."+string(os.PathSeparator)))
}