Skip to content

Add explicit parentheses in SSHInfoIsEmpty#841

Merged
sosedoff merged 2 commits intomainfrom
fix/ssh-info-is-empty-precedence
Mar 1, 2026
Merged

Add explicit parentheses in SSHInfoIsEmpty#841
sosedoff merged 2 commits intomainfrom
fix/ssh-info-is-empty-precedence

Conversation

@sosedoff
Copy link
Owner

@sosedoff sosedoff commented Mar 1, 2026

Summary

  • Add explicit parentheses around the && conditions in Bookmark.SSHInfoIsEmpty() to clarify operator precedence
  • No behavior change — the implicit precedence already produced the correct result, but the explicit grouping makes the intent obvious and prevents accidental bugs if the condition is modified in the future

Test plan

  • Existing TestBookmarkSSHInfoIsEmpty tests pass with no changes

🤖 Generated with Claude Code

sosedoff and others added 2 commits March 1, 2026 11:02
The condition relied on implicit operator precedence (&&
binding tighter than ||) which made the intent unclear and
fragile to future modifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover edge cases where only one SSH field (host, port, or user)
is set, ensuring the method correctly returns false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sosedoff sosedoff merged commit ee2e54b into main Mar 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant