Skip to content

Commit 17f2491

Browse files
jdxclaude
andcommitted
Use published clap-sort crate instead of inlined module
The clap-sort crate on crates.io (https://github.com/jdx/clap-sort) is the maintained upstream version of what src/clap_sort.rs duplicated. It already handles positional args correctly (source order preserved for parsing semantics; only short/long flags are sorted). Delete the 461-line inlined copy and depend on `clap-sort = "1"` as a dev-dependency instead. The `test_cli_ordering` test now calls `clap_sort::assert_sorted(&Cli::command())`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a1fa7b4 commit 17f2491

6 files changed

Lines changed: 13 additions & 469 deletions

File tree

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ dbus = { version = "0.9", features = ["vendored"] }
9595
openssl-sys = { version = "0.9", features = ["vendored"] }
9696

9797
[dev-dependencies]
98+
clap-sort = "1"
9899
tempfile = "3"
99100

100101
[build-dependencies]

0 commit comments

Comments
 (0)