Commit graph

39 commits

Author SHA1 Message Date
Ed Page
c4144d7d6c docs: Update App references to Command 2022-02-14 15:33:49 -06:00
Ed Page
272f840178 feat: Replace core set of AppSettings with functions
This is a part of #2717

Some settings didn't get getters because
- They are transient parse settings (e.g. ignore errors)
- They get propagated to args and should be checked there

`is_allow_hyphen_values_set` is a curious case.  In some cases, we only
check the app and not an arg.  This seems suspicious.
2022-02-11 12:35:09 -06:00
Ed Page
eae3ffb599 docs: Emphasize Arg over ArgSettings 2021-11-29 09:54:04 -06:00
Ed Page
3c3a0b71d1 fix: Deprecate runtime usage parser
Fixes #8
2021-11-23 09:53:04 -06:00
Ed Page
4c4a2b86a0 refactor: Port over to arg! 2021-11-23 09:37:14 -06:00
Ed Page
88fff13e71 Revert rename of from_yaml / from_usage
Since usage parser and yaml are on the way to being deprecated (#8, #9),
doing a rename also seems excessive, so rolling it back.

Past relevant PRs:
- clap-rs/clap#1157
- clap-rs/clap#1257
2021-11-22 16:17:46 -06:00
Ed Page
4c7d29f464 test: Get benches passing 2021-11-22 16:09:39 -06:00
Ed Page
7e899cd340 Revert "Deprecate Arg::help in favour of Arg::about"
This reverts commits 24cb8b1..d0abb37 from clap-rs/clap#1840

This is part of #16.  clap-rs/clap#1840 wasn't the right call but we
don't have time to make the decision now, so instead of having one
option and changing it in 4.0, this reverts back to clap2 behavior.
2021-11-18 12:25:49 -06:00
Ed Page
0a53fafddf fix: Deprecate Macro API
Fixes #2835
2021-10-11 15:06:38 -05:00
Pavan Kumar Sunkara
bdc70c9fd9 Fix benchmarking issues 2021-09-23 17:17:15 +05:30
ldm0
886b873709 Demangle interlinking flags 2021-03-09 13:45:11 +00:00
Pavan Kumar Sunkara
6634444c3c Remove Arg::settings to be consistent with App 2021-02-12 10:42:38 +00:00
Marti Raudsepp
594c535ba2 Fix various typos in docs & code
Most errors detected and fixed with Topy (https://github.com/intgr/topy),
all verified by hand.
2020-07-19 03:10:28 +03:00
Pavan Kumar Sunkara
7bc282dd4e Rename with_name to new for Arg & ArgGroup 2020-05-14 22:50:56 +02:00
creativcoder
35fdb45adb Update bench tests with about and add inline to about methods 2020-04-27 20:00:36 +05:30
Pavan Kumar Sunkara
4860516555 Shorten some of the benches names 2020-03-05 10:22:37 +01:00
CreepySkeleton
d466a56aa1 Fix benches 2020-03-04 21:31:18 +03:00
CreepySkeleton
9d1cf49ca8 Move to criterion 2020-02-21 18:21:31 +03:00
Pavan Kumar Sunkara
5b3a0dff9c Remove extern & macro_use where possible 2020-02-07 07:34:01 +01:00
Alex van de Sandt
90bdd12764 Remove #[macro_use] from benchmarks 2020-02-03 12:01:36 -05:00
Pavan Kumar Sunkara
8e4a189ab0 fmt: Use standardized rustfmt rules 2020-01-31 18:37:56 +01:00
Oleksii Filonenko
1e39967044
Fix some clippy lints
- Manually fix some problems
- Run 'cargo fix --clippy'

Commits taken from similar PRs open at that time:

- Replace indexmap remove with swap_remove
  Resolves #1562 and closes #1563
- Use cognitive_complexity for clippy lint
  Resolves #1564 and closes #1565
- Replace deprecated trim_left_matches with trim_start_matches
  Closes #1539

Co-authored-by: Antoine Martin <antoine97.martin@gmail.com>
Co-authored-by: Brian Foley <bpfoley@users.noreply.github.com>
2019-10-29 21:46:25 -04:00
Erick Tryzelaar
cacc23473c Remove v2 depecated features.
This patch:

* Removes the `ArgSettings::Global` variant, and replaces all
  users of it to `Arg::global(...)`. The variant itself is lifted up
  into a field on Arg. This was deprecated in clap 2.32.0.
* Removes AppFlags::PropagateGlobalValuesDown. This was deprecated in
  clap 2.27.0.
* Removes `Arg::empty_values`. This was deprecated in clap 2.30.0.
* Removes `ArgMatches::usage`. This was deprecated in clap 2.32.0.
2019-06-19 17:04:29 -07:00
Kevin K
20c72525d2 style: cargo fmt run 2018-11-14 12:05:06 -05:00
Kevin K
f6ce7d5cc2
refactor: makes benches compile on v3 2018-11-13 22:16:02 -05:00
Kevin K
03333800fe refactor: remove code going to other crates and deprecations 2018-10-19 23:31:06 -04:00
Kevin K
94872e00a5
refactor(Arg): changes Arg::short to accept a char instead of &str
Closes #1303
2018-07-23 15:10:12 -04:00
Corentin Henry
4f602b7e86 replace Arg::from_usage by Arg::from 2018-04-21 11:59:19 -07:00
Kevin K
41572e4d2d
benches: partially updates the benches to new arg.setting calls 2018-02-03 15:06:58 -05:00
Kevin K
1ab10275e4
style: rustfmt run 2018-01-25 12:21:17 -05:00
Kevin K
9c3cb9834c
bench: adds a bench with short circuiting some calls via ArgsNegateSubcommands 2017-01-02 14:38:17 -05:00
tormol
cd516006e3 imp: Stabilize clap_app!
It was de-stabilized in 2.0.0 but hasn't been changed since.

This commit also updates docs to reflect that the "unstable" feature does nothing now.
2016-10-16 21:33:52 +02:00
Kevin K
60a61ddde6 tests(Benches): fixes failing bench marks 2016-01-28 11:45:31 -05:00
Kevin K
0031d78564 refactor(v2): improving macros for code dedup 2016-01-28 11:45:31 -05:00
Kevin K
7fc18e685f test(v2): fixing tests to pass under new v2 changes 2016-01-28 11:45:31 -05:00
Kevin K
8988853fb8 imp(ArgMatcher): huge refactor and deduplication of code
Tons of code has been moved into functions, deduplicated, made much
easier to read, maintain, and understand. Comments still need to be
added, but that will happen shortly. Modules have also been moved around
to follow Rust conventions and best practices.

All functionality remains exactly the same
2015-11-11 10:26:05 -05:00
James McGlashan
13712da1d3 fix: Macro benchmarks 2015-09-10 22:23:58 +10:00
Kevin K
87f3a47eaa tests: adds benches for builder vs from_usage 2015-09-09 22:15:25 -04:00
SungRim Huh
f93dab93e0 tests(benchmark): add more benchmarks 2015-09-01 11:00:51 -05:00
Renamed from benches/benchmarks.rs (Browse further)