Skip to content

Commit ab1fcd3

Browse files
arimxyerclaude
andcommitted
fix: apply De Morgan's law to satisfy staticcheck linter
Applied De Morgan's law transformation as requested by staticcheck QF1001. Original: !(check.Name == "keychain" && check.Status == CheckWarning) Transformed to: (check.Name != "keychain" || check.Status != CheckWarning) Both expressions are logically equivalent. De Morgan's law states: !(A && B) == (!A || !B) This makes the code more readable and satisfies the linter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d7752f9 commit ab1fcd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/health/checker_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ audit_enabled: false
7474

7575
// Verify all checks passed or have acceptable warnings (keychain only)
7676
for _, check := range report.Checks {
77-
if check.Status != CheckPass && !(check.Name == "keychain" && check.Status == CheckWarning) {
77+
// Apply De Morgan's law: !(A && B) == (!A || !B)
78+
if check.Status != CheckPass && (check.Name != "keychain" || check.Status != CheckWarning) {
7879
t.Errorf("Check %s did not pass: status=%s, message=%s",
7980
check.Name, check.Status, check.Message)
8081
}

0 commit comments

Comments
 (0)