Skip to content

Comments

fix(parser): return error for mismatched quotes (#45)#48

Merged
veeso merged 3 commits intomainfrom
fix/45-validate-mismatched-quotes
Jan 31, 2026
Merged

fix(parser): return error for mismatched quotes (#45)#48
veeso merged 3 commits intomainfrom
fix/45-validate-mismatched-quotes

Conversation

@veeso
Copy link
Owner

@veeso veeso commented Jan 31, 2026

Summary

  • Adds InvalidQuotes error variant to SshParserError
  • Parser now validates quotes in arguments and returns an error when mismatched
  • Matches OpenSSH behavior which returns "invalid quotes" for mismatched quotes

Fixes #45

Test plan

  • Added test should_fail_on_mismatched_quotes that verifies:
    • Unclosed opening quote: Hostname "example.com
    • Unexpected closing quote: Hostname example.com"
    • Quote in middle without closing: Hostname foo "bar
  • All 147 tests pass
  • Clippy passes with no warnings
  • Formatting check passes

🤖 Generated with Claude Code

The parser now validates quotes in arguments and returns an InvalidQuotes
error when they are mismatched, matching OpenSSH behavior.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coveralls
Copy link

coveralls commented Jan 31, 2026

Pull Request Test Coverage Report for Build 21547114344

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 98.284%

Totals Coverage Status
Change from base Build 21547015040: 0.007%
Covered Lines: 3264
Relevant Lines: 3321

💛 - Coveralls

veeso and others added 2 commits January 31, 2026 17:03
Breaking change: added InvalidQuotes variant to SshParserError enum.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@cocogitto-bot
Copy link

cocogitto-bot bot commented Jan 31, 2026

✔️ 374ff63...e0e305c - Conventional commits check succeeded.

@veeso veeso merged commit 52fa546 into main Jan 31, 2026
6 checks passed
@veeso veeso deleted the fix/45-validate-mismatched-quotes branch January 31, 2026 16:06
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.

Parser does not validate mismatched quotes

2 participants