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