• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

veeso / ssh2-config / 7102648735
90%

Build:
DEFAULT BRANCH: main
Ran 05 Dec 2023 03:09PM UTC
Jobs 1
Files 4
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Dec 2023 03:07PM UTC coverage: 97.467% (-0.3%) from 97.735%
7102648735

push

github

web-flow
fix: correctly apply configuration precedence in reverse parsing order (#12)

* fix: correctly apply configuration precedence in reverse parsing order

This change fixes #11:

Previously, the order of precedence applied to
parsed configuration was incorrect.

Configuration was parsed, then sorted in
alphabetical order.

Algorithms (ciphers, key
exchange algorithms, MACs, etc.) were incorrectly
applied during parsing.

The correct precedence order follows
https://linux.die.net/man/5/ssh_config: the
configuration is read from top to bottom,
precedence is applied from bottom (lowest)
to the top (highest precedence).

Options preceding the first `Host` block are
considered implicit command line options, in
line with OpenSSH's own implementation.

This patch includes the following changes:

- Remove the alphabetic ordering of host sections.

- Merge matching host sections in reverse order.

- More efficiently merge host sections with
  vastly reduced `clone`s. (`clone` on demand.)

- Resolve algorithms not during the parsing,
  but during the resolving stage.

- More efficiently resolve algorithms, without
  source list mutation.

- Adjust existing unit tests to test the corrected
  precedence algorithm.

* feat: improve error-tests by matching on error enum variant

This change improves error-tests by replacing
`Result::is_err` with a match against the error
enum.

Previously, only the existence of an error result
was checked.

With the first additional commit,
the kind of error is checked as well.

* style: return `Result` from success tests, using `?` (Rust 2018 idiom)

This change improves success-tests by applying
the Rust 2018 idiom of returning `Result`
from tests.

This way, `Result::unwrap` and `Result::is_ok`
can be replaced by `?`.

Any error occurring in a success-test
is propagated to the test runner.

Some tests previously called `.ok().unwrap()` on
`Result`s, effectively firs... (continued)

284 of 300 new or added lines in 2 files covered. (94.67%)

1193 of 1224 relevant lines covered (97.47%)

13.47 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
16
95.65
-2.41% src/parser/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 7102648735.1 05 Dec 2023 03:09PM UTC 4
97.47
GitHub Action Run
Source Files on build 7102648735
  • Tree
  • List 4
  • Changed 4
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 02ff1b99 on github
  • Prev Build on main (#5712204231)
  • Next Build on main (#7102689041)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc