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

1338 Commits

Author SHA1 Message Date
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
Philip Top
3cd730b18b
fix: windows.h include (#832)
* remove the windows.h includes so it doesn't conflict with other windows applications.  Or at least minimizes the potential conflicts

* style: pre-commit.ci fixes

* fix ordering of windows includes

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-21 12:12:10 -05:00
Andrey Zhukov
a227cd10fc
feat: unicode support (#804)
* Add unicode support tests

* Add unicode parse tests

* Implement #14

* Slim down Windows.h

* Fix documentation comments

* Fix clang-tidy and cpplint

* Update README

* Fix clang-tidy

* Fix to_path not being available on linux

* Add roundtrip encoding tests

* style: pre-commit.ci fixes

* Fix pre-commit.ci

* Fix codacy

* Exclude parse_unicode which should not contain a newline from pre-commit

* Remove a test which breaks CI

* Fix build in CI

* Replace broken execute_with tests

* Fix wide string conversions on all systems

* Fix system args on apple

* style: pre-commit.ci fixes

* Fix some includes

* Fix wrong size calculation and comments

* Add guards around codecvt

* Fix _Pragma not recognized on MSVC

* Fix bad macro check

* Fix include

* Fix narrow and widen when codecvt is missing

* Fix some weird bug in old MSVC

* Add dependent applications to meson-build

* Fix precompilation

* Fix lint

* Fix coverage

* Update README

* style: pre-commit.ci fixes

* Fix lint

* Fix coverage

* Fix optional braces offending clang

* Remove copied comments from Windows.h

* Suppress flawfinder detects

* Fix cmake config tests failing because of a missing lib

* chore: update copyright on new files to 2023

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>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-12 15:03:20 -05:00
Henry Schreiner
48624ead3c
chore: fix a couple more outdated copyright years (#829)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-05 18:01:12 -05:00
Henry Schreiner
48dce18d3a
fix: single header includes (#828)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-05 17:46:58 -05:00
Philip Top
4c7c8ddc45
feat: dot notation (#789)
* Allow using dot notation for subcommand arguments  such as --sub1.field

* add tests for dot notation for subcommands

* style: pre-commit.ci fixes

* add test for short form arguments in dot notation

* style: pre-commit.ci fixes

* add _pre_parse_callback_ support using dot notation

* style: pre-commit.ci fixes

* update cmake tests to include 3.24

* change line endings

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-04 10:05:40 -05:00
polistern
d3505540e7
feat: added usage message replacement feature (#786)
* fix: show newline before footer only if footer is set and not empty

* feat: added usage message replacement feature

* fix: tests corrected for new help message formatting
2023-01-04 10:04:54 -05:00
Henry Schreiner
291c58789c
chore: prepare for 2.3.2 (#824)
* chore: prepare for 2.3.2

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

* chore: bump versions for 2.3.2

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

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
v2.3.2
2023-01-03 19:12:23 -05:00
Philip Top
39a5f1981e
chore: update copyright year to 2023 (#825) 2023-01-03 17:29:37 -05:00
Volker Christian
082dbf0e6e
Print help message for the last parsed subcommand (#822)
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-01-02 07:14:19 -08:00
captainurist
3897109e51
Using ADL everywhere for lexical_cast (#820)
* Using ADL everywhere for lexical_cast

* Fixes in docs

* Add a test for old extension mechanism

* style: pre-commit.ci fixes

* Make gcc happy

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-01-02 07:09:27 -08:00
Philip Top
fbe1763675
add new CMAKE version support and fix CI test failure (#823) 2023-01-02 06:33:44 -08:00
pre-commit-ci[bot]
0f040f78cb
chore(deps): pre-commit.ci autoupdate (#817)
updates:
- [github.com/pre-commit/mirrors-clang-format: v15.0.4 → v15.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.4...v15.0.6)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-19 18:01:54 -08:00
pre-commit-ci[bot]
8c25115b55
chore(deps): pre-commit.ci autoupdate (#815)
updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-13 07:02:39 -08:00
Philip Top
75b19db1d8
fix: some GCC warnings and update codecov (#813)
* add some warning for GCC output

* fix some warnings

* style: pre-commit.ci fixes

* update ubuntu image used for cmake tests so it doesn't auto transition to 22.04

* try a few more warning flags

* install the correct files

* style: pre-commit.ci fixes

* fix install files

* add a few more things to pre-commit

* try a fix for codacy

* another try at codecov

* more coverage tweaks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-10 10:30:36 -05:00
Philip Top
71755e4f67
tweak the parsing of files for flags with disable_flag_override (#800)
* tweak the parsing of files for flags with disable_flag_override, basically allow true as a valid value to be interpreted as the default in that case

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-30 15:43:25 -08:00
Philip Top
ca9a128720
test for out of bounds long long (#807)
* test for out of bounds long long

* style: pre-commit.ci fixes

* change to use std types

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-30 15:41:34 -08:00
Ryan Sherlock
8f8344bff8
fix: make_description min option output (#808)
Include spacing between the number of minimum options required and the rest of the description.
2022-11-30 11:31:11 -08:00
pre-commit-ci[bot]
788c3f58cb
chore(deps): pre-commit.ci autoupdate (#799)
* chore(deps): pre-commit.ci autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
- [github.com/pre-commit/mirrors-clang-format: v14.0.6 → v15.0.4](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.6...v15.0.4)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.3 → v3.0.0-alpha.4](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.3...v3.0.0-alpha.4)

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-30 09:01:30 -08:00
DarkWingMcQuack
b16c8c8ce4
Update TypeTools.hpp (#803)
* Update TypeTools.hpp

fix #802 by using checking `std::ceil(val) == std::floor(val)` instead of `val == static_cast<std::int64_t>(val)` to avoid warnings-

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-21 08:05:04 -08:00
Henry Schreiner
c2ea58c7f9
chore: prepare for 2.3.1 (#797)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
v2.3.1
2022-10-31 23:54:32 -04:00
polistern
e2270dd6f8
fix: fixed footer newline behavior (#796)
* fix: show newline before footer only if footer is set and not empty

* chore: tests corrected for new help message formatting.
2022-10-28 21:15:18 -04:00
Philip Top
25274e2c7b
fix: missing function definition (#793)
* the get_option_group definition was missing from the splitting of the calls.

* style: pre-commit.ci fixes

* the get_option_group definition was missing from the splitting of the calls.

* style: pre-commit.ci fixes

* add test for missing function

* style: pre-commit.ci fixes

* add test for get_option_group

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 09:57:54 -04:00
Philip Top
4dbe4b4ec4
tests: add a few more coverage tests (#794)
* add a few more coverage tests

* style: pre-commit.ci fixes

* try to fix pre-commit issues

* update mdlint style as a test

* style: pre-commit.ci fixes

* fix test

* switch test to not generate warning

* add a few more tests

* tweak the conanfile and appveyor to debug issue

* update tests

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 00:23:22 -04:00
pre-commit-ci[bot]
90e6ee1aaa
chore(deps): pre-commit.ci autoupdate (#792)
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.2 → v3.0.0-alpha.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.2...v3.0.0-alpha.3)
- [github.com/markdownlint/markdownlint: v0.11.0 → v0.12.0](https://github.com/markdownlint/markdownlint/compare/v0.11.0...v0.12.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-25 05:53:46 -07:00
pre-commit-ci[bot]
b681d4d605
chore(deps): pre-commit.ci autoupdate (#790)
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.1 → v3.0.0-alpha.2](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.1...v3.0.0-alpha.2)
- [github.com/codespell-project/codespell: v2.2.1 → v2.2.2](https://github.com/codespell-project/codespell/compare/v2.2.1...v2.2.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-23 20:18:56 -07:00
dependabot[bot]
c4d3f39dbe
chore: bump jwlawson/actions-setup-cmake from 1.12 to 1.13 (#788)
Bumps [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake) from 1.12 to 1.13.
- [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases)
- [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/v1.12...v1.13)

---
updated-dependencies:
- dependency-name: jwlawson/actions-setup-cmake
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-11 10:28:29 -04:00
pre-commit-ci[bot]
e062023d97
chore(deps): pre-commit.ci autoupdate (#787)
updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.0 → v3.0.0-alpha.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.0...v3.0.0-alpha.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-10 22:10:52 -04:00