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

1125 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
d3a8dfb065 style: pre-commit.ci fixes 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
b58e99f22e [precompile] Use a single Precompile.cpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
7a7e0822dd [precompile] Split Validators.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
4048596250 [precompile] Split StringTools.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
d1f0f483da [precompile] Split Split.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
c24bf75413 [precompile] Split Formatter.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
003e82579e [precompile] Split Config.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
3e5173d468 [precompile] Split Option.hpp 2022-08-23 11:42:02 -04:00
Daniel Herrera Castro
b56ae237e5 [precompiled] Initial proof-of-concept with App.cpp
- Add C11_COMPILE cmake option that creates a static lib instead of header-only
- Add C11_INLINE macro that depends on C11_COMPILE
- Split App.hpp into App.hpp and impl/App_inl.hpp
- Add App.cpp that compiles App_inl.hpp into an object file
- CMake modifications to handle impl headers differently for sinlge-header, headers-only, and compiled versions
2022-08-23 11:42:02 -04:00
Matt McCormick
c57000e582
fix: add missing Macros.hpp include to Error.hpp (#755)
* Add missing Macros.hpp include to Error.hpp

To address:

```
In file included from /ITKWebAssemblyInterface/include/itkPipeline.h:21:
In file included from /ITKWebAssemblyInterface-build/_deps/cli11-src/include/CLI/App.hpp:25:
In file included from /ITKWebAssemblyInterface-build/_deps/cli11-src/include/CLI/ConfigFwd.hpp:17:
/ITKWebAssemblyInterface-build/_deps/cli11-src/include/CLI/Error.hpp:75:5: error: unknown type name 'CLI11_NODISCARD'
    CLI11_NODISCARD int get_exit_code() const { return actual_exit_code; }
    ^
```

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-05 00:10:54 -04:00
pre-commit-ci[bot]
0b83055901
chore(deps): pre-commit.ci autoupdate (#754)
updates:
- [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0)
- [github.com/pre-commit/mirrors-clang-format: v14.0.5 → v14.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.5...v14.0.6)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-04 21:57:19 -04:00
dependabot[bot]
65ef491b11
chore: bump actions/checkout from 2 to 3 (#751)
* chore: bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Apply suggestions from code review

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
2022-07-04 09:40:38 -04:00
dependabot[bot]
5c1754222c
chore: bump actions/setup-python from 2 to 4 (#752)
* chore: bump actions/setup-python from 2 to 4

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Apply suggestions from code review

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
2022-07-04 09:40:06 -04:00
dependabot[bot]
a36ecd98d0
chore: bump actions/upload-artifact from 2 to 3 (#750)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-29 14:18:44 -04:00
Henry Schreiner
41cfea817e
chore: simpler dependabot (#749)
Ignores no longer needed after April 2022. Dependabot keeps the same style pinning now.
2022-06-29 02:02:34 -04:00
Henry Schreiner
6ae1e1ecc1
ci: set up coverage on GHA (#747)
* ci: set up coverage on GHA

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

* ci: update to newer codecov uploader

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

* ci: move to newer Windows image

* fix: better single file script help and usage strictness

* ci: revert update to windows-2022
2022-06-27 15:41:32 -04:00
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