remove old code since all arguments are quoted now and the code was not
being used, add coverage exclusion on some code that should never be
executed and add an additional test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Add some additional tests to try to get test coverage back to 100%
refactor the positional parsing to reduce code duplication
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes#845 as discussed.
Comparing the two approaches of getting `argv`:
1. The "old" way, through `CLI::argv()`:
✔️ Works automatically and almost everywhere
❌ Small abstraction overhead on macOS
❌ Does not work in weird edge-cases such as missing `/proc`
2. This PR, through `app.ensure_utf8`:
✔️ True zero-overhead abstraction: you don't pay for what you don't use
✔️ Less moving parts than the "old" approach, probably can't be broken
❌ Requires extra code to be written by the user (which is sad because
ideally everyone should use this by default)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
use it for the default in `set_config` and simplify and add more
flexibility to the the config processing, and potentially in other
options as well.
The reverse policy returns a vector but in reversed order from normal.
This is what we want in the config processing
Inspired by #862, and updated with recent code changes.
---------
Co-authored-by: Volker Christian <me@vchrist.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
add tests that exercise the CMake module and pkg-config files
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
about an out of range string conversion not being caught properly. This
commit changes the logic from an exception to using errno and a
non-throwing alternative.
Issue detected in
https://github.com/CLIUtils/CLI11/actions/runs/5500247554/jobs/10023032108
The problem string was set up as a test.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR includes updates from #774 and #613.
It updates the readme and docbook with some additional installation
instructions.
---------
Co-authored-by: Owen Parkins <oparkins@users.noreply.github.com>
Co-authored-by: Mengna Li <Adela0814@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Do not check environment variables if a subcommand has not been
triggered.
Fixes#903
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Update some doc strings and error output for clarity
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Adds @trokhymchuk as a contributor for code.
This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/893#issuecomment-1610366995)
[skip ci]
---------
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Fixes#890
Add parsing of environmental variables when supplied for the config file
option.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
to handle `std::filesystem::path` better widestring operations should be
preferred over regular strings.
Fix Issue #875
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* update tests
* update tested cmake version
* try the correct docker tag names
* try different order for cuda build
* reorder the builds
* use an install boost action
* install boost through apt
* Add the beginnings of a fuzzing system for CLI11. This commit adds the fuzzing code, a simple test, and two fixes to issues(seg faults) found by the initial round of fuzzing. It also adds a few tests and coverage issues uncovered in the process of developing the fuzz tests. As a side effect adjusts some of the azure tests to specify the vmImage which was being changed on azure.
* update license to match rest of code base
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
CUDA 11.5 deprecated (and CUDA 12.0 removed) diagnostic pragmas such as diag_suppress and diag_default.
Replacement pragmas were previxed with nv_, i.e. nv_diag_suppress
__NVCC_DIAG_PRAGMA_SUPPORT__ is defined if the prefixed versions are available.
* update the storage of remaining argument for config files, so that they work through the `remaining_for_passthrough` with values when parsed a second time.
* style: pre-commit.ci fixes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
When including CLI11 in a separate project (e.g. via FetchContent) cmake
will now mark the CLI11 include files as system includes, which prevents
compilers from issuing any warnings for stuff it found inside these
headers. This makes sure that downstream users are not confronted with
potential warning messages from CLI11, regardless of what kind of
obscure warnings they might have enabled for their projects.
Fixes#833
* update the sanitizers cmake tag reference and the dependabot.yml to specify branch and update time
* style: pre-commit.ci fixes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>