fix(cli): enable clap help and usage features#156
Merged
JanZachmann merged 1 commit intoomnect:mainfrom Apr 14, 2026
Merged
Conversation
clap was configured with default-features=false and only "derive" + "std", which excluded the "help" feature. This caused --help/-h to fail with "unexpected argument found" at every subcommand level. Add "help" and "usage" features to restore --help/-h support and usage synopsis in help output. Add regression tests covering help at root, subcommand group, and leaf command levels. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores standard clap-provided --help/-h and usage/version output for the omnect-cli binary by enabling the required clap features, and adds integration tests to prevent regressions.
Changes:
- Enable
clap’shelpandusagefeatures (while keepingdefault-features = false) so--help/-hand usage synopsis work across command levels. - Add integration tests covering help output at root, subcommand-group, and leaf-command levels, plus
-hand--version. - Bump crate version from
0.28.0to0.28.1.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Cargo.toml |
Enables clap help/usage features; adds predicates dev-dependency; bumps version. |
tests/integration_tests.rs |
Adds regression tests validating --help/-h and --version behavior/output. |
Cargo.lock |
Lockfile updates reflecting version bump and new predicates-related packages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JoergZeidler
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
default-features = falseand only["derive", "std"], which excluded thehelpfeature — causing--help/-hto fail witherror: unexpected argument foundat every subcommand level"help"and"usage"clap features to restore flag support and usage synopsis--helpat root, subcommand group, and leaf levels, plus-hshort form and--version