← Back to issue list

Exercise command parsers.

View original Github issue

Metadata

Project
charmcraft
Number
#211
Type
pull request
State
merged
Author
chipaca
Labels
Created
Updated
Closed

Current evaluation

Merged fix for a bug where the help command always returned an error. Updates help logic to only error on actual failures and adds tests exercising all command parsers, resolving issue #210. Approved by two reviewers and passed CI.

Suggested action:

No scores available.

Issue body

Before this change, asking for help would always return with error. This made testing actually asking for help hard, so we didn't, so we never exercised the actual command parser, so a bug snuck in. This changes things so that help returns with error only when actually in error, and adds a test that asks for help over all commands, meaning we exercise all the parsers, so we would actually catch this bug. Fixes: #210

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix for a bug where the help command always returned an error. Updates help logic to only error on actual failures and adds tests exercising all command parsers, resolving issue #210. Approved by two reviewers and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged a fix ensuring help commands only return errors when appropriate, resolving a bug that prevented parser testing. Added comprehensive tests to exercise all command parsers, closing issue #210.
qwen3.6-35b-a3b-mtp-q6 Merged PR resolves issue #210 by fixing a bug where the help command always returned an error. Added tests to exercise all command parsers, ensuring proper error handling.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#109 Better tested help parsing function, with a bug fixed. craft-cli merged Merged after approval. Improved testing for the help parsing function and fixed a bug where errors were not properly raised when using the --all flag with extra arguments. Changes span two files with 100 additions and 12 deletions.
71%
#207 Avoid a duplicated -h/--help option when getting help for a command. charmcraft merged Merged a fix to eliminate duplicate -h/--help options in command help output by disabling ArgumentParser's automatic help flag addition. Existing tests were updated to expose duplicates. Approved by two reviewers and passed CI.
70%