1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53:52 +00:00

1215 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
f81c8b1b1d
chore(deps): pre-commit.ci autoupdate (#941)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 23.9.1 →
23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1)
- [github.com/pre-commit/mirrors-clang-format: v17.0.2 →
v17.0.3](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.2...v17.0.3)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-25 13:52:43 -07:00
Ryan Curtin
b840e47a69
A simple grammar fix: an -> a. (#939)
I was reading through the documentation, saw "an flag", and thought
"hey, I can be helpful!" So here's a PR. Thanks for CLI11!
2023-10-22 04:55:30 -07:00
pre-commit-ci[bot]
998ef31453
chore(deps): pre-commit.ci autoupdate (#936)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v16.0.6 →
v17.0.2](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.6...v17.0.2)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-17 16:22:08 -07:00
pre-commit-ci[bot]
9532482065
chore(deps): pre-commit.ci autoupdate (#932)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 →
v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-09 16:43:43 -07:00
Philip Top
dd4bbd8847
Coverage to 100% (#929)
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>
2023-10-07 08:20:29 -07:00
Philip Top
c99918ea5a
add additional tests for coverage, (#928)
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>
2023-10-06 08:38:47 -07:00
Philip Top
ff1ec84e35
Env validation (#926)
Fixes #925
2023-10-06 08:37:48 -07:00
pre-commit-ci[bot]
9e8bceb91d
chore(deps): pre-commit.ci autoupdate (#927)
<!--pre-commit.ci start-->
updates:
- [github.com/codespell-project/codespell: v2.2.5 →
v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.5...v2.2.6)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-10-03 17:48:27 -07:00
Andrey Zhukov
0d4e19133c
feat: unicode API rework (#923)
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>
2023-09-20 13:20:53 -04:00
Henry Schreiner
826415f8ba
fix: only use CPack if this is the main project (#902)
Alternative fix to, and closes #900.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-09-15 16:21:40 -04:00
Philip Top
f0e405545c
feat: add a reverse multi option policy (#918)
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>
2023-09-15 16:21:26 -04:00
Philip Top
c071cb6297
fix: CMake package and pkgconfig rework (#916)
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>
2023-09-15 16:21:15 -04:00
pre-commit-ci[bot]
c299ddb2b1
chore(deps): pre-commit.ci autoupdate (#922)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 23.7.0 →
23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-15 11:50:00 -04:00
pre-commit-ci[bot]
665d5d60d1
chore(deps): pre-commit.ci autoupdate (#921)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.2 →
v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.2...v3.0.3)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-05 06:37:15 -07:00
pre-commit-ci[bot]
837c965fce
chore(deps): pre-commit.ci autoupdate (#917)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.1 →
v3.0.2](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.1...v3.0.2)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-22 06:41:08 -07:00
pre-commit-ci[bot]
6da4ff5056
chore(deps): pre-commit.ci autoupdate (#915)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0 →
v3.0.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-12 11:31:02 -07:00
Philip Top
520c0c6091
test an arm64 build on azure (#914)
add a ci job for arm 64 build on visual studio
2023-08-04 17:45:45 -07:00
Peter Harris
9cd989087d
fix: build on Windows ARM64 (#913)
Regression introduced in commit 3cd730b18b563fdd48cd95dfb0174551aa18c3b3
2023-08-04 13:01:05 -07:00
Philip Top
792d892867
fix: out of range string detected by the fuzzer (#905)
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>
2023-07-11 08:46:41 -04:00
Philip Top
ccf141c49d
docs: move and update installation (#901)
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>
2023-07-11 08:43:16 -04:00
pre-commit-ci[bot]
bf4bdcaf39
chore(deps): pre-commit.ci autoupdate (#907)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 23.3.0 →
23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.9-for-vscode →
v3.0.0](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.9-for-vscode...v3.0.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-11 08:39:12 -04:00
Philip Top
ff648c81ee
environment variables and subcommands (#904)
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>
2023-07-09 08:46:33 -07:00
Philip Top
985a19f386
fix some doc and error strings (#899)
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>
2023-06-29 08:29:32 -07:00
Henry Schreiner
f07a8cc6fb
fix: increase min CMake to 3.5 (#898)
CMake 3.27 will start warning if this is older than 3.5.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-28 16:24:27 -04:00
Henry Schreiner
77722acb25
ci: add docs build to GHA (#897)
Restoring the docs build after we lost it with Travis.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-28 16:11:34 -04:00
Henry Schreiner
c8cd053b93
fix: tests were broken on Catch3 (#896)
These were invalid on an imported target (and was incorrect anyway).

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-28 15:41:08 -04:00
allcontributors[bot]
335ca29dcb
📝 Add trokhymchuk as a contributor for code (#895)
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>
2023-06-27 17:44:44 -07:00
Artem Trokhymchuk
dce7983efa
Fix possible UB in the sum_string_vector function (TypeTools.hpp) (#893)
Fixes #892 Undefined behavior in comparison of doubles.
2023-06-27 16:53:34 -07:00
Philip Top
a1135bb30c
Add environment variable processing to the configuration pointer. (#891)
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>
2023-06-27 11:40:22 -07:00
pre-commit-ci[bot]
84cad16974
chore(deps): pre-commit.ci autoupdate (#888)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v16.0.4 →
v16.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.4...v16.0.6)
- [github.com/codespell-project/codespell: v2.2.4 →
v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-22 08:00:27 -07:00
Philip Top
19393015db
prioritize wide strings over strings on MSVC (#876)
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>
2023-06-15 06:28:12 -07:00
Philip Top
f47ab71313
add additional complexity to the fuzzer (#874)
add some more fuzzing options and a subcommand
2023-06-14 17:43:31 -04:00
pre-commit-ci[bot]
0700bc1ac6
chore(deps): pre-commit.ci autoupdate (#883)
* chore(deps): pre-commit.ci autoupdate

updates:
- [github.com/pre-commit/mirrors-clang-format: v16.0.3 → v16.0.4](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.3...v16.0.4)

* ci: drop 18.04 runner

* ci: don't fail if codecov errors (it often does)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
2023-06-14 16:30:02 -04:00
pre-commit-ci[bot]
784fa3ebd3
chore(deps): pre-commit.ci autoupdate (#880)
updates:
- [github.com/pre-commit/mirrors-clang-format: v16.0.2 → v16.0.3](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.2...v16.0.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-09 16:46:53 -07:00
pre-commit-ci[bot]
4a14b78ff4
chore(deps): pre-commit.ci autoupdate (#870)
updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)
- [github.com/pre-commit/mirrors-clang-format: v16.0.0 → v16.0.2](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.0...v16.0.2)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.6 → v3.0.0-alpha.9-for-vscode](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.6...v3.0.0-alpha.9-for-vscode)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-25 07:08:48 -07:00
pre-commit-ci[bot]
a6c48261d4
chore(deps): pre-commit.ci autoupdate (#868)
updates:
- [github.com/pre-commit/mirrors-clang-format: v15.0.7 → v16.0.0](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.7...v16.0.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-28 04:52:34 -07:00
pre-commit-ci[bot]
65ede431b8
chore(deps): pre-commit.ci autoupdate (#865)
updates:
- [github.com/codespell-project/codespell: v2.2.2 → v2.2.4](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.2.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-14 00:57:43 -04:00
Volker Christian
eb4913d53e
Add REQUIRED to an app-name in case it is listed in the subcommand list of another app. (#860) 2023-03-13 11:55:04 -07:00
Philip Top
18a256ec85
ci: add CUDA versions (#864)
* 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
2023-03-13 14:29:38 -04:00
Henry Schreiner
8e4fd15a23
fix(tests): experimental support for external Catch3 (#827)
* fix(tests): experimental support for external Catch3

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* style: pre-commit.ci fixes

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-09 15:03:03 -05:00
Philip Top
0a615f854d
fix: issue found by fuzzing (#846)
* 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>
2023-03-09 15:02:49 -05:00
Peter Heywood
fc9cea6d76
fix(NVCC): warning supression pragma fix for CUDA >= 11.5 (#851)
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.
2023-03-09 15:01:17 -05:00
pre-commit-ci[bot]
484fa22cf3
chore(deps): pre-commit.ci autoupdate (#850)
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.4 → v3.0.0-alpha.6](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.4...v3.0.0-alpha.6)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-09 14:23:58 -05:00
Henry Schreiner
7a693edad0
ci: remove conan (#853)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-03-09 13:57:30 -05:00
Philip Top
89601ee253
fix: isolate definition of NOMINMA and skip undef if defined (#848) 2023-02-16 08:24:47 -05:00
Philip Top
69c79b0343
fix: parse config file remaining (#839)
* 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>
2023-02-11 05:42:46 -08:00
pre-commit-ci[bot]
d335ca1172
chore(deps): pre-commit.ci autoupdate (#843)
updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-02-10 12:27:10 -05:00
Robert Adam
60f0dcab3d
chore: Mark include files as SYSTEM (#844)
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
2023-02-10 08:51:56 -08:00
Philip Top
1ffded5eae
fix sanitizer CI builds (#840)
* 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>
2023-02-05 07:53:01 -08:00
pre-commit-ci[bot]
740392109b
chore(deps): pre-commit.ci autoupdate (#835)
updates:
- [github.com/pre-commit/mirrors-clang-format: v15.0.6 → v15.0.7](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.6...v15.0.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-25 05:09:47 -08:00