1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00

12 Commits

Author SHA1 Message Date
Henry Schreiner
e2e3cb2fed
refactor!: drop defaulted from add_option (#597) 2021-06-16 11:16:22 -04:00
Henry Schreiner
5d12e11d8a tests: use catch2 2021-04-04 00:29:21 -04:00
D. Fleury
a7902531c9
fix: add multilines array support for TOML (#528)
* Adds multilines array support

* Update include/CLI/Config.hpp

Co-authored-by: David Fleury <david.fleury@expandium.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-10-28 12:34:24 -04:00
Philip Top
6aa58d5828
Add an ability to deal handle multiple config files (#494) 2020-09-03 19:42:35 -04:00
Philip Top
102e201dc7
fix: a failing test case for toml string_vector processing (#491) 2020-07-27 22:10:18 -04:00
Christoph Bachhuber
e85eaecf85 Fix comment whitespace 2020-03-23 09:42:08 -04:00
Christoph Bachhuber
3ab92ad454 Add copyright message 2020-03-23 09:42:08 -04:00
Philip Top
f346f29802
Config short (#443)
* add a get_single_name function for options, and allow short names to be used for configuration output.

* add config input to handle short and positional options

* add some tests about short options and positional options in config files

* allow use of envname_ in config files

* update doc book and readme with fixes

* formatting update

* some formatting updates

* add some notes on the config file generation

* just try modifying a comment
2020-03-22 13:58:46 -04:00
Philip Top
967bfe0e02
Set the default configuration file output as TOML (#435)
* Set the default configuration file output as TOML

* update formatting
2020-03-06 00:11:59 -05:00
Christoph Bachhuber
d8a5bdc294
Add and fix cpplint whitespace/comments (#434)
* Add whitespace/comments check

* Adapt spacing in clang-format

* Fix cpplint whitespace/comments issues

* Grammar

* Do not use clang-format for comment spacing

* Fix with clang-format pre-commit hook
2020-03-06 00:04:59 -05:00
Philip Top
6b7f6a7480 Value initialization (#416)
* work on the flags book chapter and making sure the values are initialized properly.

* Fix initialization of values used in flags or options

* update some formatting and more brace initialization

* update more formatting and fix a incorrect initializer

* more formatting and some error fixes

* more formatting

* Small formatting fix

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-01-27 09:42:03 -06:00
Philip Top
c67ab9dd43 Config file handling refactor. (#362)
Refactor some of the configuration file handling code.  Make it easier to get the actual file that was processed, and allow extras in the config file to be ignored (default now), captured or errored.

fix std::error reference and formatting

add test for required but no default and fix a shadow warning on 'required' from gcc 4.8

Test correctness of config write-read loop

fix config generation for flag definitions

make the config output conform with toml

continue work on the config file interpretation and construction

get all the ini tests working again with the cleaned up features.

update formatting

rename IniTest to ConfigFileTest to better reflect actual tests and add a few more test of the configTOML
disambiguate enable/disable by default to an enumeration, and to make room for a configurable option to allow subcommands to be triggered by a config file.
add a ConfigBase class to generally reflect a broader class of configuration files formats of similar nature to INI files

add configurable to app and allow it to trigger subcommands

add test of ini formatting

add section support to the config files so sections can be opened and closed and the callbacks triggered as appropriate.

add handling of option groups to the config file output

add subcommand and option group configuration to config file output

subsubcom test on config files

fix a few sign comparison warnings and formatting

start working on the book edits for configuration and a few more tests

more test to check for subcommand close in config files

more tests for coverage

generalize section opening and closing

add more tests and some fixes for different configurations

yet more tests of different situations related to configuration files

test more paths for configuration file sections

remove some unused code and fix some codacy warnings

update readme with updates from configuration files

more book edits and README formatting

remove extra space

Apply suggestions from code review

Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com>

fix some comments and documentation

fix spacing

Rename size_t -> std::size_t

Fix compiler warnings with -Wsign-conversion

Fix new warnings with -Wsign-conversion in PR
2019-12-31 11:28:25 -05:00