boostorg / boostorg/program_options

[Feature] Allow Unknown Options from all sources

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.