1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-04 14:23:51 +00:00

1349 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
94f08d9c20 style: pre-commit.ci fixes 2025-05-02 14:47:50 +00:00
Philip Top
433ee18d0c update documentation and tests on prefix matching and clean up close match function. 2025-05-02 07:46:58 -07:00
pre-commit-ci[bot]
279e710544 style: pre-commit.ci fixes 2025-05-01 12:23:27 +00:00
Philip Top
72c78a2484 add some more tests and code cleanup 2025-05-01 05:22:48 -07:00
pre-commit-ci[bot]
f29420fb82 style: pre-commit.ci fixes 2025-04-30 15:04:03 +00:00
Philip Top
eec2211b0f refactor the close_match method into 2 different methods 2025-04-30 08:00:27 -07:00
pre-commit-ci[bot]
7c4a4d555f style: pre-commit.ci fixes 2025-04-30 12:34:38 +00:00
Philip Top
2175dc6c57 add prefix matching to be enabled by a flag in the app. 2025-04-30 05:34:06 -07:00
pre-commit-ci[bot]
bf467089b2 style: pre-commit.ci fixes 2025-04-28 13:31:18 +00:00
Philip Top
a5768acf08 clang-tidy fixes 2025-04-28 06:29:31 -07:00
pre-commit-ci[bot]
31a62ac3f2 style: pre-commit.ci fixes 2025-04-23 01:28:38 +00:00
Philip Top
ae0735c88c change to size_t for levenshteinDistance 2025-04-22 18:27:05 -07:00
Philip Top
2f59ab8cfa prototype separate function call for match and prefix matching 2025-04-22 18:27:05 -07:00
pre-commit-ci[bot]
77b33a879d style: pre-commit.ci fixes 2025-04-21 21:04:08 +00:00
Philip Top
b857f3516e clang-tidy fixes 2025-04-21 14:03:38 -07:00
pre-commit-ci[bot]
91ded76992 style: pre-commit.ci fixes 2025-04-21 16:29:15 +00:00
Philip Top
4373489273 fix pre-commit items 2025-04-21 09:28:20 -07:00
pre-commit-ci[bot]
3021257c04 style: pre-commit.ci fixes 2025-04-21 16:07:11 +00:00
Philip Top
0549f7c450 add an example of finding close matches 2025-04-21 09:06:14 -07:00
Philip Top
cbbf20ed93
Ci build update (#1151)
update ci build images, remove ubuntu 20.04 and update a few others, fix some newer clang-tidy warnings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-19 09:14:59 -07:00
Philip Top
70f98cb218
fuzzer failure --sub1.- interpreting as a short option (#1148)
and getting into odd situations

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-15 18:44:49 -07:00
huangqinjin
bc621a95ca
Fix compilation on VS2017 (#1143)
The compiler complains about C2131: expression did not evaluate to a
constant.

https://godbolt.org/z/a198P3bdM

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-13 07:17:59 -07:00
Philip Top
a8d6b84cfc
resolve ambiguity for vector<array> options (#1147)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-13 07:15:11 -07:00
pre-commit-ci[bot]
6fbdbaf308
chore(deps): pre-commit.ci autoupdate (#1142)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.7 →
v20.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.7...v20.1.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-20 06:36:49 -07:00
Philip Top
2d79205521
Fix some minor fuzzing issues. (#1138)
One in the fuzz check handling of NaN's and a pathway to generate a
HorribleError.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-11 18:21:46 -07:00
Philip Top
f871b625ee
Float parsing negative (#1140)
Fixes #1139 
Fix a bug relating to parsing negative floating point values with no
zero before decimal point in a context where an option could be
possible.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-11 07:08:38 -07:00
Philip Top
f75fd22ba3
add tests and fixes for array options (#1136)
Fixes #1135. Adds enable check to certain to_string functions as some
std::array operations were ambiguous.

The addition of the capability to convert tuples to strings created an
ambiguity in the case std::array, which acts like a tuple and a
container. So it worked with the container conversion before, but could
also work with the new tuple conversion. And we didn't have any tests to
catch this.

This PR resolves the ambiguity, and adds some tests to check that array
is handled well.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-07 07:47:56 -08:00
allcontributors[bot]
8fa8a0fa0c
📝 Add ComixHe as a contributor for code (#1137)
Adds @ComixHe as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1132#issuecomment-2702742598)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-03-05 20:34:07 -08:00
Comix
7ff65c16f2
fix: promoting uint8_t/int8_t to make it casting result printable (#1132)
The underlying type of uint8_t/int8_t is unsigned char and signed char,
but IOStreams was specified to treat them just like char.

so promoting the casting value to get the expected value.

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-03-05 20:07:50 -08:00
allcontributors[bot]
38e370f671
📝 Add gblanco92 as a contributor for code (#1131)
Adds @gblanco92 as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1129#issuecomment-2694425412)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-03-04 06:53:37 -08:00
Guillem Blanco
b0f63a4442
Fix spelling in Error.hpp (#1129)
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-03-03 05:39:43 -08:00
Philip Top
0eb88ed958
add option modifiers pathways to custom options in the fuzzer (#1128)
Next phase of the fuzzer, adds some mechanics for the fuzzer itself to
add modifiers on the options.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-03 04:54:46 -08:00
Philip Top
4160d259d9
update version and changelog for 2.5 release (#1121)
update readme, changelog, and version for 2.5 release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
v2.5.0
2025-02-27 04:25:31 -08:00
allcontributors[bot]
a48f049365
📝 Add jmarrec as a contributor for code (#1127)
Adds @jmarrec as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682507198)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 16:19:35 -08:00
allcontributors[bot]
091d4cfb3b
📝 Add nshaheed as a contributor for platform (#1126)
Adds @nshaheed as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682506808)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 14:10:38 -08:00
allcontributors[bot]
8d5d0967a0
📝 Add j-rivero as a contributor for platform (#1124)
Adds @j-rivero as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682497166)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 13:37:15 -08:00
allcontributors[bot]
8fcbddadd3
📝 Add krico as a contributor for code (#1125)
Adds @krico as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682503164)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 12:00:31 -08:00
allcontributors[bot]
65220bd28a
📝 Add jsoref as a contributor for doc (#1123)
Adds @jsoref as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682493678)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 08:34:26 -08:00
allcontributors[bot]
6193e56935
📝 Add LostInCompilation as a contributor for code (#1122)
Adds @LostInCompilation as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1121#issuecomment-2682455232)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 08:33:53 -08:00
pre-commit-ci[bot]
a05601a968
chore(deps): pre-commit.ci autoupdate (#1117)
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 24.10.0 →
25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0)
- [github.com/codespell-project/codespell: v2.4.0 →
v2.4.1](https://github.com/codespell-project/codespell/compare/v2.4.0...v2.4.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-04 06:09:44 -08:00
pre-commit-ci[bot]
5ed9783d78
chore(deps): pre-commit.ci autoupdate (#1116)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.6 →
v19.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.6...v19.1.7)
- [github.com/codespell-project/codespell: v2.3.0 →
v2.4.0](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.0)
<!--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>
2025-01-28 06:15:17 -08:00
Philip Top
92adf2c8c2
Allow trailing spaces on strings for conversions (#1115)
Allow trailing spaces on strings for conversions to floating point and
integers.

There was a potential confusing error that could occur if strings with
trailing spaces were converted to integer or floating point values. This
PR allows trailing spaces in the strings that would otherwise be
convertible to the appropriate numerical type.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-27 19:14:18 -08:00
Julien Marrec
10ac3e59a4
update macros for codecvt and support C++26 support on clang19 (#1113)
* Modifies #1100 
* That PR comes from https://github.com/phlptp/CLI11 and unfortunately I
have no way of opening a PR to that repo, pointing to that branch...

The commit you care about is
9a2884ad6a
@phlptp

where I fix the build error on LLVM 19 with C++26 after rooting the
actual template issue (see
https://github.com/CLIUtils/CLI11/issues/1098#issuecomment-2572715578)

It comes down to C++26 adding a tuple interface to std::complex
https://en.cppreference.com/w/cpp/numeric/complex/tuple_size

---------

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-11 05:42:24 -08:00
pre-commit-ci[bot]
7364157946
chore(deps): pre-commit.ci autoupdate (#1114)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.5 →
v19.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.5...v19.1.6)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-08 05:27:13 -08:00
Philip Top
74c86d4889
update copyright dates to 2025 (#1112) 2025-01-03 08:35:31 -08:00
Philip Top
f41e59b7f6
fix a fuzzing issue from a string as a bracket (#1110)
fix fuzzing issue

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-03 07:47:09 -08:00
Philip Top
d2b331f02a
Fix Issue #1090, (#1108)
max, min on positional was not respected, specifically max positionals
only filled up to min, and skipped over optional options.

Fixes #1090

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-30 12:34:47 -08:00
Philip Top
ecdcf633a5
Help priority adjustment (#1106)
Move the help generation priority higher so it triggers before config
file processing.

Fixes #1099

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-26 06:13:36 -08:00
Josh Soref
ef50bb35c3
Spelling (#1101)
This PR corrects misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling) (which is
an evolution of the script I used ages ago when I first made a PR
here...).

The misspellings have been reported at
https://github.com/jsoref/CLI11/actions/runs/12194174338#summary-34017587518

The action reports that the changes in this PR would make it happy:
https://github.com/jsoref/CLI11/actions/runs/12194174680#summary-34017588281

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-22 14:03:24 -08:00
pre-commit-ci[bot]
b71106f870
chore(deps): pre-commit.ci autoupdate (#1104)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.4 →
v19.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.4...v19.1.5)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-22 13:57:27 -08:00