1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-01 13:13:53 +00:00

1109 Commits

Author SHA1 Message Date
Henry Schreiner
c781998273
chore: clang tidy updates (#742)
* chore: update clang-tidy

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

* refactor: address clang-tidy

* fix: C++11 support

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

* chore: two more clang-tidy fixes

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

* fix: get_inject_separator should be bool

* refactor: addressing review feedback

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Philip Top <phlptp@gmail.com>

* Apply suggestions from code review

* Update include/CLI/Config.hpp

* Update include/CLI/Config.hpp

* Update include/CLI/Config.hpp

* Update include/CLI/Config.hpp

Co-authored-by: Philip Top <phlptp@gmail.com>
2022-06-26 14:53:01 -04:00
pre-commit-ci[bot]
683ec61209
chore(deps): pre-commit.ci autoupdate (#745)
updates:
- [github.com/pre-commit/mirrors-clang-format: v14.0.4-1 → v14.0.5](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.4-1...v14.0.5)
- [github.com/pre-commit/mirrors-prettier: v2.6.2 → v2.7.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.6.2...v2.7.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-20 14:16:18 -07:00
pre-commit-ci[bot]
e067ae35c6
chore(deps): pre-commit.ci autoupdate (#743)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
- [github.com/pre-commit/mirrors-clang-format: v14.0.3 → v14.0.4-1](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.3...v14.0.4-1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-15 06:58:35 -07:00
Philip Top
443c1a946d
fix: wrap min and max for MSVC (#741)
* wrap min and max in parenthesis for Visual studio 2017 and earlier compatibility

* try pre-commit to detect min/max issues

* actually fix the identified issues from the new check

* more min/max fixes
2022-06-09 14:07:59 -04:00
Philip Top
020a21afc6
Fix an issue where an error was generated if just a file name was supplied to the split_program_name parsing (#740) 2022-06-05 19:36:30 -07:00
PeteAudinate
c692be41cf
fix: rename variable to avoid clash with optarg (#734)
https://linux.die.net/man/3/optarg
2022-05-24 15:23:09 -04:00
Philip Top
de215ef978
Incorrect subcommand callback trigger (#733)
* fix the issue where subcommand callbacks would be triggered multiple times if specified as configurable.

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-24 15:19:41 -04:00
shameekganguly
efbfd460a7
Include <functional> in FormatterFwd (#727)
Without this header, the project might not compile is some environments.

Signed-off-by: Shameek Ganguly <shameekarcanesphinx@gmail.com>
2022-05-20 14:52:42 -07:00
Henry Schreiner
516f603857 fix: bad formatting for footnote 2022-05-10 13:47:38 -04:00
Henry Schreiner
4f14dbde63 style: run pre-commit on linewidth 2022-05-10 13:47:38 -04:00
Henry Schreiner
c1465e6163 style: 80 char width 2022-05-10 13:47:38 -04:00
Henry Schreiner
0038ad4658 style: run prettier 2022-05-10 13:47:38 -04:00
Henry Schreiner
3c44bb9fdc chore: add prettier to styling 2022-05-10 13:47:38 -04:00
pre-commit-ci[bot]
6887978ec8
chore(deps): pre-commit.ci autoupdate (#729)
updates:
- [github.com/pre-commit/mirrors-clang-format: v14.0.1 → v14.0.3](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.1...v14.0.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-10 12:53:30 -04:00
pre-commit-ci[bot]
607ab9429f
chore(deps): pre-commit.ci autoupdate (#725)
* chore(deps): pre-commit.ci autoupdate

updates:
- [github.com/pre-commit/mirrors-clang-format: v13.0.1 → v14.0.1](https://github.com/pre-commit/mirrors-clang-format/compare/v13.0.1...v14.0.1)

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-18 18:12:20 -04:00
pre-commit-ci[bot]
e1cef53f91
chore(deps): pre-commit.ci autoupdate (#723)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.2.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v4.2.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-11 18:12:14 -04:00
Henry Schreiner
db49b5d864
chore: bump CMake action (#722) 2022-04-04 20:58:39 -04:00
pre-commit-ci[bot]
c4c709e7e8
chore(deps): pre-commit.ci autoupdate (#721)
updates:
- [github.com/psf/black: 22.1.0 → 22.3.0](https://github.com/psf/black/compare/22.1.0...22.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-04 16:55:08 -07:00
Philip Top
b9be5b9444
docs: update readme and changelog and version number (#718)
* Update readme and changelog and version number

* style: pre-commit.ci fixes

* fix missing references

* style: pre-commit.ci fixes

* merge in changes from non existent 2.1.3 patch release

* Update CHANGELOG.md

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>
v2.2.0
2022-03-26 23:35:05 -04:00
Philip Top
4cae08686d
docs: update copyright dates to 2022 (#717) 2022-03-26 21:54:49 -04:00
Henry Schreiner
ef692ec7c6
fix: support namespacing again in MakeSingleHeader (#707) 2022-03-21 18:56:51 -04:00
Philip Top
f7d26f26b2
feat: counting flags (#709)
* add a counting flag to address and issue with optional<bool>  and make the flags more consistent

* move the add_flag to a single operation and add a Sum multi option policy

* style: pre-commit.ci fixes

* remove sum_flag_vector overloads

* style: pre-commit.ci fixes

* add limits include

* style: pre-commit.ci fixes

* fix some other warnings

* update docs describing the multi_option_policy

* Apply suggestions from code review

Co-authored-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>
2022-03-21 18:56:35 -04:00
Philip Top
95e7f81d1d
fix: trigger on parse positional (#713)
* allow the trigger on parse modifier to work with positional arguments as well

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-21 17:51:08 -04:00
pre-commit-ci[bot]
10f3ab9025
chore(deps): pre-commit.ci autoupdate (#703)
* chore(deps): pre-commit.ci autoupdate

updates:
- [github.com/pre-commit/mirrors-clang-format: v13.0.0 → v13.0.1](https://github.com/pre-commit/mirrors-clang-format/compare/v13.0.0...v13.0.1)

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
2022-02-23 15:30:43 -05:00
RangeMachine
59159387e9
fix: MSVC C++20 macro typo (#706) 2022-02-23 11:51:34 -05:00
Philip Top
e29cb3f1b4
feat: support empty vector in TOML (#660)
* add tests which suppose to pass

* Update ConfigFileTest.cpp

* Update ConfigFileTest.cpp

* style: pre-commit.ci fixes

* add the possibility for an empty vector result if allowed.

* style: pre-commit.ci fixes

* add empty vector command line tests

* update book and readme

* add no default test

Co-authored-by: puchneiner <90352207+puchneiner@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-09 13:12:55 -05:00
Eli Schwartz
e8265f9102
meson: add support for testsuite (#701)
* meson: add support for testsuite

* meson: fix deprecation warning for run_command with unchecked return code

This would implicitly default to false, so if something bizarre happened
and the command errored out, meson would consider that fine. Now meson
emits a warning about this deprecated legacy behavior, suggests that it
will eventually change, and, most importantly, prevents a warning-free
build.

Suppress the warning by manually specifying the sensible behavior, which
is to fail on errors.

* meson: download catch2 on demand if a system version is unavailable

Produced by running `meson wrap install catch2` and checking the results
into git.

No modifications to the build files are expected; this makes use of
https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section

* style: pre-commit.ci fixes

* ci: add meson build to the CI

* ci: meson doesn't depend on ninja or or have a ninja extra

* ci: minor cleanup to Meson job

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-02-09 00:26:04 -05:00
Philip Top
256559401e
Add a transform/validator that checks for files on a default path. (#698)
* Add a transform/validator that checks for files on a default path.

* update docs and add tests and capability of chaining the FileOnDefaultPath transform

* style: pre-commit.ci fixes

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

* add test of "or" operation and few doc additions

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2022-01-31 15:07:54 -08:00
pre-commit-ci[bot]
cd10be7fff
chore(deps): pre-commit.ci autoupdate (#700)
updates:
- [github.com/psf/black: 21.12b0 → 22.1.0](https://github.com/psf/black/compare/21.12b0...22.1.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-31 14:40:32 -08:00
Philip Top
a5498bed17
feat: add an option to validate optional arguments like in a vector. (#668)
* add an option to validate optional arguments like in a vector.  This can resolve some issues with separating positionals from vector arguments

* style: pre-commit.ci fixes

* add some updates to the book

* style: pre-commit.ci fixes

* fix some precommit issues

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-28 11:15:55 -05:00
Philip Top
ba5ca8c4fc
remove the symbolic link in the meson test (#697)
* remove the symbolic link in the meson test

* update python version in meson test

* remove directory from git and add directory creation into azure scripts

* remove the generated symlink

* Update azure-pipelines.yml

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2022-01-28 06:49:20 -08:00
dependabot[bot]
291af01f28
chore: bump jwlawson/actions-setup-cmake from 1.11 to 1.12 (#695)
Bumps [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake) from 1.11 to 1.12.
- [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases)
- [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/v1.11...v1.12)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 06:12:29 -08:00
Philip Top
5ba63620dc
fix: update the range error output (#690)
* update the range error output to be able to be used by more types, and better printouts in some situations.

* style: pre-commit.ci fixes

* add test

* style: pre-commit.ci fixes

* fix the test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-05 15:36:15 -05:00
pre-commit-ci[bot]
9ec0ba78f6
chore(deps): pre-commit.ci autoupdate (#693) 2021-12-27 16:44:04 -05:00
Andreas Deininger
6b95ee8ab5
Fix logic in example 'option_groups', documentation: fix escaped colon glyph (#692)
* Documentation: fixing escaped colon sign

* Example option_groups:

* fix output logic
* add whitespace between format_type and string "format"
2021-12-24 12:29:46 -08:00
Andreas Deininger
b65367a15a
Documentation: add link to multifile subcommand example in repo (#691) 2021-12-15 10:44:08 -08:00
pre-commit-ci[bot]
3c7257d2ae
chore(deps): pre-commit.ci autoupdate (#681)
updates:
- [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-10 17:24:38 -08:00
Henry Schreiner
f897aad11a
fix: avoid a warning about useless move (#678)
* fix: avoid a warning about useless move

* style: pre-commit.ci fixes

* Update include/CLI/App.hpp

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-02 13:20:13 -05:00
Matt McCormick
612f4584b6
fix: add WASI build support (#679)
Addresses:

  wasm-ld: error:
  CMakeFiles/WebAssemblyInterfaceHeaderTest1.dir/test/WebAssemblyInterfaceHeaderTest1.cxx.o:
  undefined symbol:
  std::__2::__fs::filesystem::__status(std::__2::__fs::filesystem::path
  const&, std::__2::error_code*)

  /usr/wasi-sdk-14.0/share/wasi-sysroot/include/c++/v1/filesystem:256:3:
  error: "The Filesystem library is not supported by this configuration
  of libc++"
  # error "The Filesystem library is not supported by this configuration
  of libc++"
2021-12-02 13:19:48 -05:00
pre-commit-ci[bot]
52ee425d95
chore(deps): pre-commit.ci autoupdate (#671)
updates:
- [github.com/psf/black: 21.10b0 → 21.11b1](https://github.com/psf/black/compare/21.10b0...21.11b1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-26 23:13:40 -05:00
Philip Top
17e7d60c18
fix: several small fixes and added tests (#666)
* add a few tests related to github issues

* change how the default is displayed in the help message prev was =XXXX,  this was confusing in some cases particularly with flags or with multiple option names.    Now is [default=XXXX]  which makes it clearer what the value represents.

* Try to fix RTTI issue

* style: pre-commit.ci fixes

* Fix subcommand callbacks being called multiple times if in an option group

* style: pre-commit.ci fixes

* remove extra group call

* change [default=XXXXD] to just [XXXXX] for the default specification

* update changelog

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-21 23:44:04 -05:00
Philip Top
eba619fc68
fix: a potential stack overflow error (#665)
* Fix a potential stack overflow error if nameless subcommands have fallthough

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-18 00:44:10 -05:00
Philip Top
815553211b
fix and test some reported issues (#661) 2021-11-01 23:12:55 -04:00
Philip Top
728ac3a877
run some tests and fixes for C++20 (#663) 2021-11-01 23:10:44 -04:00
pre-commit-ci[bot]
16919dd1b2
chore(deps): pre-commit.ci autoupdate (#664) 2021-11-01 17:38:38 -04:00
Henry Schreiner
70f8072f9d
chore: bump version (#658)
* chore: update changelog for 2.1.2

* chore: bump version
v2.1.2
2021-10-18 10:14:21 -04:00
Henry Schreiner
4ebb25d10f
docs: fix Codecov badge 2021-10-17 22:44:48 -04:00
Henry Schreiner
b89dcd8716 docs: restore appveyor, remove travis file 2021-10-17 22:39:05 -04:00
Henry Schreiner
98d200bd8b chore: move to main 2021-10-17 22:39:05 -04:00
Henry Schreiner
a393e353ef
fix(build): simplify runs from master projects, require C++11 minimally if possible (#656) 2021-10-16 12:31:24 -04:00