Closed integrii closed 4 years ago
I agree - this is totally broken still. Taking a look. I pulled those flags out because I went too quickly and didn't notice that those were in fact valid flags in that test.
Still working on new code to solve #47. This involves a new code path as described below:
parsedArgs
)func
is created and called when the root parser parses arguments. This func finds all the parsed args recursively, then reads the incoming arg values from the user to detect if any values were ignored or not found in any tracked subcommand's parsedArgs
propertiesOkay, all tests pass! Take a look. There is a lot of code here so if you don't get through all of it, no big deal. I am going to add some more tests before merging, I think - just to be sure.
I'm sorry to say that, but the unit tests on branch #47 are failing on my side.
D'oh! I'll take a look again and see if I missed something.
Okay, check it out now. I don't know what I was thinking before when I said tests pass. I must have somehow fooled myself.
I promise, tests pass now:
@integrii I can confirm that the tests pass now and that my own test input works as expected. Thank you very much for this awesome piece of work!
My application does not make use of subcommands, so I've tested it with an unkown global flag at the global level and it does not work. No error is reported.