boostorg / boostorg/program_options
parse_config_file: alternate comment interpretation
- Vorherrschende Sprache
- C++
- Sterne
- 136
- Forks
- 117
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
For some time `parse_config_file` treats all `#` signs as initiating comments, preventing the use of `#` signs in values.
It would be very helpful if a simple flag could be set, to only consider # signs in column 0, or preceded only by whitespace, as comments. This would make for clearer, cleaner code and configuration files, when configuration values contain `#`.
Here's an example of somebody looking for this, and being advised to write an iostreams filter to make it work:
https://stackoverflow.com/questions/31921241/boostprogram-options-how-to-support-hash-character-in-a-value
Here's an example of brute-force key generation implemented in a production release, to make sure the key never contains the `#` symbol and can be stored in the configuration file:
https://github.com/libbitcoin/libbitcoin-protocol/blob/version3/src/zmq/certificate.cpp#L78
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die Implementierung von parse_config_file und die vorhandenen Tests oder die Dokumentation dazu zu finden. Überprüfe, wie # derzeit interpretiert wird, und bestimme dann, wie eine Opt-in-Einstellung # in Spalte 0 oder nach Leerraum behandeln soll, während # in Werten erhalten bleibt. Erledigt ist die Aufgabe, wenn die angeforderte Einstellung dokumentiert und durch Tests für beide Fälle, Kommentare und Werte, abgedeckt ist.
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