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
9753f68a76
revert: Default value behaviour with conflicts and requirement validation
...
This feature is too immature at this stage in the release. See
clap-rs/clap Issue 3020 when bringing this feature back.
This reverts commit 301c6f765a
.
This reverts commit 43a4c90c86
.
This reverts commit 4e29777b21
.
This reverts commit 69957c4ddd
.
This reverts commit bdb1d324a5
.
This reverts commit b102da0cd2
.
This reverts commit 72429be14e
.
This reverts commit 0b7def675b
.
This reverts commit b86aa631be
.
This reverts commit 6b458c602d
.
2021-11-17 15:45:50 -06:00
Pavan Kumar Sunkara
72429be14e
Revert "Revert "Fixes group conflicting if two args with default values""
...
This reverts commit 4e370bb093
.
2021-11-11 21:33:50 +00:00
Pavan Kumar Sunkara
0b7def675b
Revert "Revert "Fixes arg conflicting with group whose arg has default value""
...
This reverts commit 706085d9c5
.
2021-11-11 21:33:50 +00:00
Pavan Kumar Sunkara
b86aa631be
Revert "Revert "Fixes group conflicting with arg which has default value""
...
This reverts commit 736cb28dd0
.
2021-11-11 21:33:50 +00:00
Pavan Kumar Sunkara
736cb28dd0
Revert "Fixes group conflicting with arg which has default value"
...
This reverts commit 8c76556ac4
.
2021-11-03 18:25:53 +00:00
Pavan Kumar Sunkara
706085d9c5
Revert "Fixes arg conflicting with group whose arg has default value"
...
This reverts commit 64a2866b09
.
2021-11-03 18:25:25 +00:00
Pavan Kumar Sunkara
4e370bb093
Revert "Fixes group conflicting if two args with default values"
...
This reverts commit 01869744c2
.
2021-11-03 18:24:50 +00:00
Pavan Kumar Sunkara
2984748762
Fix some test cases to print correct failure message
2021-10-29 18:48:23 +01:00
Pavan Kumar Sunkara
01869744c2
Fixes group conflicting if two args with default values
2021-10-26 22:18:00 +01:00
Pavan Kumar Sunkara
64a2866b09
Fixes arg conflicting with group whose arg has default value
2021-10-26 22:18:00 +01:00
Pavan Kumar Sunkara
8c76556ac4
Fixes group conflicting with arg which has default value
2021-10-26 22:18:00 +01:00
Pavan Kumar Sunkara
b21c15f8b6
Dedupe some tests and improve others
2021-10-26 22:17:59 +01:00
Morley, Jonathan
1d3a292d6b
assert on leading and trailing whitespace
2021-09-24 12:38:15 -04:00
Ajeet D'Souza
460459c771
fix(usage): Move positional args to end of usage string ( #2492 )
...
* Move positional args to end of USAGE
* Remove -- from usage string
2021-05-21 00:29:21 +05:30
CreepySkeleton
5020333037
Refactor coloring
2020-08-28 19:21:05 +03:00
tomjw64
27771ceeb7
Show arguments in conflict message in reverse order of input
2020-08-16 03:47:19 -05:00
tomjw64
826db05319
Add test for three argument conflict output
2020-08-15 04:43:12 -05:00
tomjw64
4372aa0fa6
Enable assertions on conflict_output_with_required
2020-08-15 04:16:23 -05:00
tomjw64
b3e523912f
Add new tests for usage including required args
2020-08-15 03:20:48 -05:00
tomjw64
fbb7a0f6e4
Re-enable conflict_output and conflict_output_rev
2020-08-15 03:16:47 -05:00
Pavan Kumar Sunkara
7bc282dd4e
Rename with_name to new for Arg & ArgGroup
2020-05-14 22:50:56 +02:00
CreepySkeleton
cdb184b76c
Add a test
2020-04-26 21:16:14 +03:00
CreepySkeleton
f69ec92a83
Improve panics
2020-04-24 22:34:23 +03:00
Pavan Kumar Sunkara
15edb69a0d
Address review comments
2020-04-10 00:33:16 +02:00
Pavan Kumar Sunkara
f0a216036b
Fix some issues
2020-04-09 19:41:33 +02:00
Pavan Kumar Sunkara
f632aedc72
Started on arg asserts
2020-04-09 16:51:32 +02:00
bors[bot]
e4a7f50128
Merge #1669
...
1669: refactor: Rename Arg::conflicts_with_everything to Arg::exclusive (#1… r=pksunkara a=CreepySkeleton
Co-authored-by: Gregor Pfeifer <gpfeifer@dxc.com>
2020-02-22 21:58:29 +00:00
Gregor Pfeifer
7781fd8813
refactor: Rename Arg::conflicts_with_everything to Arg::exclusive ( #1583 ) ( #1624 )
...
https://github.com/clap-rs/clap/pull/1624#issuecomment-571372359
2020-02-04 18:02:47 +03:00
Pavan Kumar Sunkara
b7f76d8e8d
Put the test helper in tests
2020-02-04 09:51:46 +01:00
Gregor Pfeifer
6180d42c00
feat: Add Arg::conflicts_with_everything
method #1583 ( #1624 )
...
* feat: Add `Arg::conflicts_with_everything` method #1583
* fix: Typo in src/build/arg/mod.rs
Co-Authored-By: Dylan DPC <dylan.dpc@gmail.com>
Co-authored-by: Dylan DPC <dylan.dpc@gmail.com>
2020-01-06 00:16:28 +05:30
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
Kevin K
03333800fe
refactor: remove code going to other crates and deprecations
2018-10-19 23:31:06 -04:00
Corentin Henry
4f602b7e86
replace Arg::from_usage by Arg::from
2018-04-21 11:59:19 -07:00
Kevin K
1ab10275e4
style: rustfmt run
2018-01-25 12:21:17 -05:00
Kevin K
f7a6955238
tests: adds tests to make sure args with default values can have conflicts
2017-10-24 12:23:29 -07:00
Kevin K
f967235a90
tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication
2017-01-02 23:05:50 -05:00
Kevin K
44f6b1edbf
tests: updates conflict tests to new more precise output
2016-10-31 00:35:13 -04:00
Kevin K
b42ca0b5ab
chore(Tests): had to remove external clap-test crate...sad face
2016-05-09 22:46:09 -04:00
Kevin K
852e58156c
tests: removes old python tests and replaces with rust tests
...
Closes #166
2016-05-09 19:14:11 -04:00
Kevin K
7fc18e685f
test(v2): fixing tests to pass under new v2 changes
2016-01-28 11:45:31 -05:00
Kevin K
7005cf8c47
style: removes trailing whitespace
2015-09-30 23:59:40 -04:00
Alexander Kuvaev
a4a00b03e3
tests: add tests for flag and groups conflicts
2015-09-06 13:46:58 +03:00