Merge: lib/opts: accept non-conflicting parameters for OptionString and rename get_er...
authorJean Privat <jean@pryen.org>
Tue, 8 Sep 2015 15:54:28 +0000 (11:54 -0400)
committerJean Privat <jean@pryen.org>
Tue, 8 Sep 2015 15:54:28 +0000 (11:54 -0400)
`OptionString` reads the next argument to be used as its parameter. However, to detect errors it did not read parameter beginning with `-`. This PR changes this behavior to only avoid parameters that are the name of a known option in the current `OptionContext`. This should report real errors and accept parameters beginning with `-`, such parameter are useful to forward options to subprograms.

Renaming `OptionContext::get_errors` to `errors` assign the short name to the most commonly used property. `errors` was previously reserved for errors local to the context only. From the Nit repo, only 2 projects correctly used `get_errors`, 8 wrongfully used `errors` and thus did not catch all errors.

Pull-Request: #1686
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge