Fix for duplicate arguments bug 117 - #187
Conversation
|
The concept is fine by me, but the tests don't look right. Each executable looks like it defines 6 tests, but only calls two of them. The The extra tests look useful. Those should be fixed and enabled. |
|
@Taywee Enabled the missing tests. |
7aecf0d to
9f73245
Compare
9f73245 to
cf563f6
Compare
|
Reworked the detection to occur when a flag is added, instead of on parsing. |
|
Another implementation of this fix, #189, was recently opened as well. That looks like it might be a simpler implementation, but I don't see any evidence that it works across subgroups, and the testing here is more complete. Edit: Actually, it does look like that one will probably work across subgroups, it's just not tested for yet. |
|
I poked at #189 a bit, and tried an approach merging this one and that one, and it looks like it's simple because to extend it to handle error-on-add, it would have to look pretty much exactly like this one. |
|
After these changes, I'm happy with the shape of it. Thanks for interfacing with me, and thanks for the PR. |
Fixes #117 by searching the tree for duplicate arguments on parse.
Normal context throws a
ParseErrorif a duplicate is found.Noexcept context sets a
UsageErrorif a duplicate is found.