Reject unknown values passed to --debug-wave
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start in src/flags.rs at DebugFlags::apply and compare its recognized modes with argument handling in src/cli.rs. Run or extend the CLI tests for valid single and comma-separated modes, unknown and mixed values, and both option forms; done means invalid input follows the existing usage-error path while valid modes and all retain their behavior.
Written by the indexing model from the issue text.
Description
Current evidence
DebugFlags::apply in src/flags.rs recognizes tokens, ast, ir, mc, hex, and all, but its fallback branch silently ignores every other value. src/cli.rs accepts both --debug-wave=<value> and --debug-wave <value> without checking whether every requested mode was recognized.
A typo such as --debug-wave=toknes therefore succeeds while enabling nothing, which makes the command line appear valid even though the requested diagnostic mode was not applied.
Scope
- Reject unknown debug modes with a normal CLI usage error.
- Preserve comma-separated valid modes and
all. - When a list mixes valid and invalid values, report the invalid value instead of partially accepting the option silently.
- Keep the existing debug modes and their behavior unchanged.
Completion criteria
- CLI tests cover a valid single mode, a valid comma-separated list, an unknown mode, and a mixed valid/invalid list.
- Both
--debug-wave=valueand--debug-wave valueuse the same validation. - Invalid input exits through the existing usage-error path.
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wavefnd/Wave
-
ci enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
good first issue needs testing
Difficulty 2/5 Half a day Newbie friendliness 84/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·