Commit graph

5941 commits

Author SHA1 Message Date
Ed Page
3bd502024e chore: Release 2023-04-27 04:05:50 -05:00
Ed Page
bad2d76b75 docs: Update changelog 2023-04-27 04:05:31 -05:00
Ed Page
4b7dbfb811
Merge pull request #4866 from hds/v3-allow-almost-swapped
fix(derive): Allow `clippy::almost_swapped`
2023-04-27 18:33:40 -05:00
Hayden Stainsby
b8ca7349cd fix(derive): Allow clippy::almost_swapped
As of Rust 1.69, the `clippy::almost_swapped` lint was enhanced and now
triggers on certain derive macros inside clap. To avoid the need for the
user to allow these lints outside of the macro (which generally requires
a module level `allow`), the allow was added to the generated code for
the v4 branch in #4735.

This change backports that fix the the `v3-master` branch.

Fixes: #4857
2023-04-27 23:06:52 +02:00
Ed Page
f617f1328e chore: Release 2023-04-25 00:32:02 -05:00
Ed Page
c29364554f docs: Update changelog 2023-04-25 00:31:44 -05:00
Ed Page
b95af6419a
Merge pull request #4858 from hds/v3-no-deny-correctness
fix: Remove strict linting from generated code
2023-04-25 11:47:35 -05:00
Hayden Stainsby
f14f398bc3 fix: Remove strict linting from generated code
The `#[deny(correctness)]` attribute is inside some generated code (such
as the `Subcommand` derive macro). As of Rust 1.69.0, this is triggering
a clippy error in some uses. Due to the placement of the `deny`, it is
not possible for a user of clap to override it.

This change removes all the instances of this `deny` attribute. The same
was done on the `master` branch in #4739.

Fixes: #4857
2023-04-25 18:27:21 +02:00
Ed Page
708c00bd5f
Merge pull request #4859 from epage/ci
docs: Clean up so CI passes
2023-04-25 10:16:44 -05:00
Ed Page
f95385bf36 doc: Escape literals 2023-04-24 22:17:04 -05:00
Ed Page
c92e4b5f01 style: Resolve warning 2023-04-24 22:16:10 -05:00
Ed Page
cef5006e4f docs: Make more resilient across rust versions 2023-04-24 22:15:26 -05:00
Ed Page
08f8d6ca30 chore: Release 2022-10-24 11:52:36 -05:00
Ed Page
aa7ef199fb docs: Update changelog 2022-10-24 11:52:06 -05:00
Ed Page
c262fb7fc8 chore: Update release process 2022-10-24 11:51:42 -05:00
Ed Page
b93f917760
Merge pull request #4422 from crepererum/crepererum/issue4418b
fix: Require textwrap 0.16 (clap V3)
2022-10-24 11:48:53 -05:00
Marco Neumann
4b0a892a52 fix: Require textwrap 0.16
Version 0.15.1 was yanked because it should have been 0.16.

Fixes #4418.
2022-10-24 17:21:01 +02:00
Ed Page
9e3fa67e04 chore: Release 2022-09-16 09:30:31 -05:00
Ed Page
d188de0535 docs: Update changelog 2022-09-16 09:30:16 -05:00
Ed Page
48b2373569
Merge pull request #4221 from niyaznigmatullin/bump_terminal_size
chore(deps): bump `terminal_size` dependency to `0.2.1` and `textwrap` to `0.15.1`
2022-09-16 09:29:00 -05:00
Niyaz Nigmatullin
2fd55076e6 chore(deps): Bump terminal_size and textwrap 2022-09-16 15:47:34 +03:00
Ed Page
7de2f36e6b chore: Release 2022-09-12 17:02:47 -05:00
Ed Page
af47562311 docs: Roll back deprecation message
I got ahead of myself
2022-09-12 17:02:08 -05:00
Ed Page
1f053b9c9b
Merge pull request #4205 from epage/deprecations
docs: Expand on deprecation instructions
2022-09-12 16:34:36 -05:00
Ed Page
d1ff0632ad
Merge pull request #4204 from epage/map
feat(parser): TypedValueParseer::map for adapting value parsers
2022-09-12 16:23:05 -05:00
Ed Page
7272aa0950 docs: Expand on deprecation instructions 2022-09-12 16:16:36 -05:00
Ed Page
960c152b53 feat(parser): TypedValueParseer::map for adapting value parsers
This is a partial backport of #4095.  This was written to allow mapping
bools to other types but this will be useful for people using
`PossibleValue` with non-string types to upgrade to value parsers.
2022-09-12 15:40:58 -05:00
Ed Page
c361d01ad5 docs: Remove v4 from changelog 2022-09-07 11:35:39 -05:00
Ed Page
ddcd13b71b chore: Release 2022-09-01 20:22:50 -05:00
Ed Page
9d35abc22b docs: Update changelog 2022-09-01 20:22:33 -05:00
Ed Page
39aba08f88
Merge pull request #4171 from epage/helper2
feat(parser): Provide convenience accessors for Actions
2022-09-01 20:21:13 -05:00
Ed Page
2d5fea50b9 feat(parser): Provide convenience for SetTrue
I wanted to make `bool` a defaulted type parameter but
https://github.com/rust-lang/rust/issues/36887
2022-09-01 19:57:14 -05:00
Ed Page
d2a1f5a8f8 feat(parser): Provide convenience accessor for Counts 2022-09-01 19:57:10 -05:00
Ed Page
3c91438162 chore: Release 2022-08-30 21:40:05 -05:00
Ed Page
75f17b6215 docs: Update changelog 2022-08-30 21:39:57 -05:00
Ed Page
19c922260f
Merge pull request #4146 from Calder-Ty/bugfix/3861_backport
Backport Bugfix/3861 to V3: Mangen not showing possible values
2022-08-30 21:37:49 -05:00
Tyler Calder
f7af7659b8 fix: Add possible vals to man for positional args
Noticed that possible values would not show up for Positional arguments
as well. Decided to add the changes for those as well.
2022-08-30 19:37:47 -06:00
Ed Page
cf7f1fa583 chore: Release 2022-08-30 14:51:05 -05:00
Ed Page
754a949ee8 docs: Update changelog 2022-08-30 14:50:57 -05:00
Ed Page
4371a7b6cd
Merge pull request #4150 from epage/parent-usage
fix(usage): Don't include irrelevant parent args
2022-08-30 14:49:45 -05:00
Ed Page
ac5cd3795c fix(usage): Don't include irrelevant parent args
This was identified in https://github.com/clap-rs/clap/discussions/4134
2022-08-30 14:26:55 -05:00
Tyler Calder
9b4c276c01 fix: Use roff bullet lists for possible_values 2022-08-29 19:40:53 -06:00
Ed Page
19bc3b75f6 chore: Release 2022-08-29 11:27:59 -05:00
Ed Page
11f8ef8d10 docs: Update changelog 2022-08-29 11:27:37 -05:00
Ed Page
6987ae9145
Merge pull request #4139 from epage/help
fix(help): Command::print_help should respect disable_colored_help
2022-08-29 11:23:08 -05:00
Ed Page
a7d7602582 fix(help): Command::print_help should respect disable_colored_help 2022-08-29 11:01:24 -05:00
Tyler Calder
3d085b8507 fix: Take in account possible values being hidden
This makes sure we take into account the setting that possible args
is hidden

backporting to v3-master
2022-08-26 23:00:03 -06:00
Tyler Calder
17960a42f4 fix: Show possible values in generated man file
This adds feature parity for mangen with the standard help output. Users
will now see the list of possible values for value arguments.

One change that was made to make this possible was adding the method
`get_possible_values` to the public API for an arg. I tried to think of
a way to get around this, but because this is the interface that the
help generation uses, and it is part of the crate public interface
I thing adding it as a part of the public API might be for the best.

cherry-pick to backport this fix to v3

fixes: #3861
2022-08-26 22:54:02 -06:00
Ed Page
d3f0931267
Merge pull request #4124 from miguelff/v3-master
[Backport] Fix: Amend error message when deriving enums
2022-08-26 10:19:59 -05:00
Miguel Fernandez
dae2bb765f fix: Amend error message when deriving enums
Backported from v4. Original change: https://github.com/clap-rs/clap/pull/4118
2022-08-26 16:57:42 +02:00