boostorg / boostorg/program_options

[Feature] Allow Unknown Options from all sources

Offen
#83 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
136
Forks
117
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

For the command line parser, there is the [`allow_unregistered()` method](https://www.boost.org/doc/libs/1_70_0/doc/html/program_options/howto.html#id-1.3.32.6.9) to not throw an exception whenever an option is not recognized.

However, this is missing from the configuration file and environment parsers.

It is possible to do work around this for both [configuration files](https://stackoverflow.com/questions/23664503/parsing-unregistered-options-for-config-files-in-boost-program-options) and [environment](https://stackoverflow.com/questions/53285248/boost-program-options-allow-undeclared-from-environment), but I am of the opinion this should be handled in similar fashion to the command line parsers!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with the documented allow_unregistered() behavior for command-line parsing, then compare how the configuration-file and environment parsers handle unknown options. Review the linked configuration and environment workarounds before deciding how the existing parsers should behave. Done means unknown options are handled consistently across all three sources without exceptions.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.