Commit graph

2798 commits

Author SHA1 Message Date
CreepySkeleton
0b8f274078 Fix tests 2020-02-05 10:13:39 +03:00
CreepySkeleton
1b2c4344cb Fix visibility errors 2020-02-05 09:41:51 +03:00
David McNeil
62c4266daf Fix verbatim_doc_comment on fields
Signed-off-by: David McNeil <mcneil.david2@gmail.com>
2020-02-05 09:35:21 +03:00
CreepySkeleton
c40eb88d5b Less another one 2020-02-05 09:35:01 +03:00
CreepySkeleton
c7c7e5113c One less hack 2020-02-05 09:34:23 +03:00
Cecile Tonglet
8f3eb4623e Implemented: flatten on enums
Fixes #327
2020-02-05 09:10:59 +03:00
CreepySkeleton
596bdec856 Bugfix #324
Fixes https://github.com/TeXitoi/structopt/issues/324
2020-02-04 17:07:39 +03:00
CreepySkeleton
cf11d46373 Default value for default_value (yeah, sounds awkward) 2020-02-04 11:40:01 +03:00
CreepySkeleton
5aafe9eaaf Pre release tweaks and changelog 2020-02-04 11:10:47 +03:00
CreepySkeleton
3b11f9af25 Consistent doc comments (#296) 2020-02-03 18:20:08 +03:00
CreepySkeleton
0851fb0266 Introduce #[structopt(rename_all_env)] 2020-02-03 17:56:17 +03:00
bors[bot]
5dcc8e60b0
Merge #1658
1658: Faster CI r=CreepySkeleton a=pksunkara

* Moved away from appveyor to decrease the CI time using parallel jobs.
* Improved caching on travis (TODO: azure)

Don't mind the appveyor failing. I will remove those hooks once this PR is merged.

The total CI waiting time decreased from 1 hr to 15-20 mins.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-03 03:27:47 +00:00
Pavan Kumar Sunkara
6c338e42d0 Faster CI 2020-02-03 03:57:52 +01:00
bors[bot]
526fd73ded
Merge #1657
1657: added check for - r=CreepySkeleton a=Toothless204

Address #1600

Co-authored-by: Toothless204 <38069888+Toothless204@users.noreply.github.com>
2020-02-02 16:51:19 +00:00
Toothless204
ebdc0453eb
Update src/build/arg/mod.rs
make error message more descriptive

Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-02 12:19:55 +00:00
Toothless204
8b2a9928e8 added check for - 2020-02-02 11:48:35 +00:00
bors[bot]
6422930a18
Merge #1656
1656: Added tests for cargo macros, fixes #1478 r=pksunkara a=pksunkara

When you approve this PR, instead of merging it, please comment "bors r+". I want to test the bors workflow.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-02 09:44:59 +00:00
Pavan Kumar Sunkara
3fa39a55d2 Update changelog to reflect the correct minimum version 2020-02-02 09:31:09 +01:00
Pavan Kumar Sunkara
506f5e4965 Added tests for cargo macros, fixes #1478 2020-02-02 08:50:40 +01:00
Pavan Kumar Sunkara
a81618ab86 Update bors.toml 2020-02-02 08:30:14 +01:00
Pavan Kumar Sunkara
25a16ea762
Merge pull request #1654 from clap-rs/bors
Bors
2020-02-02 07:00:29 +01:00
Dylan DPC
922a531fa6
Update lib.rs 2020-02-02 02:02:10 +01:00
Dylan DPC
6aaeb2718b
Update Cargo.toml 2020-02-02 01:28:19 +01:00
Pavan Kumar Sunkara
9453f74335 Added bors config 2020-02-01 21:50:29 +01:00
Pavan Kumar Sunkara
bd5b5adfb5 Cache stuff on appveyor 2020-02-01 21:24:44 +01:00
Pavan Kumar Sunkara
2c323503aa
Merge pull request #1651 from clap-rs/bump-yaml
Update yaml-rust to 0.4.1
2020-02-01 19:18:23 +01:00
nazarov A. V
dc4d2faf76 Update yaml-rust to 0.4.3 2020-02-01 14:45:52 +03:00
Pavan Kumar Sunkara
4740b1e05b
Merge pull request #1648 from clap-rs/maintain
Some maintainance stuff
2020-02-01 12:23:50 +01:00
Pavan Kumar Sunkara
8199e96268 chore: Update coverage job 2020-02-01 06:55:47 +01:00
Pavan Kumar Sunkara
2a6005657e Apply suggestions from code review
Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-01 06:55:47 +01:00
Pavan Kumar Sunkara
53eb192c3f fix: CI configs 2020-02-01 06:48:50 +01:00
Pavan Kumar Sunkara
dd75cee72c fix: Clippy should pass 2020-02-01 06:48:50 +01:00
Daniel Eades
d23df44e84 refactor: remove deprecated 'Error::description' method 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
8e4a189ab0 fmt: Use standardized rustfmt rules 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
cfb60f7547 chore: Remove mention bot since it's not working' 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
c799e8d0ca chore: Updated contributing instructions and justfile 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
b3aa4540cb chore: Refactored appveyor config 2020-01-31 12:11:25 +01:00
Pavan Kumar Sunkara
9422677030 chore: Refactored travis config 2020-01-31 12:11:25 +01:00
CreepySkeleton
752262ee9a
Bump rustversion to stable release v1 #1647 2020-01-31 11:46:29 +03:00
lzutao
dbc7988d23
Bump rustversion to stable release v1 2020-01-31 14:58:00 +07:00
CreepySkeleton
8be0a94951
Merge pull request #1638 from pksunkara/derive
Subtree merge clap_derive into this repo
2020-01-31 02:28:58 +03:00
Pavan Kumar Sunkara
e1ae505c23
Merge pull request #1637 from danielthegray/use-USAGE-error-exit-code
imp: Add exitcode::USAGE exit code as suggested in #1327
2020-01-30 20:30:36 +01:00
Pavan Kumar Sunkara
afa9ec5e32 Address review comments
Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-01-19 06:08:22 +05:30
Pavan Kumar Sunkara
7e0d820aa6 Run clap_derive tests in CI 2020-01-18 19:04:11 +05:30
Pavan Kumar Sunkara
5e8f424dfe Merged clap_derive using git-subtree 2020-01-18 17:40:07 +05:30
Daniel Gray
a1445b0f3b imp: Add exitcode::USAGE exit code as suggested in #1327
The reason to do this is described well in issue #1327. It is also a
recommendation of the Rust book itself:
https://rust-cli.github.io/book/in-depth/exit-code.html
2020-01-17 11:20:45 -04:00
Luca Bruno
f3683a9792 output: get rid of an unsafe block (#1636)
* parse: fix build in debug mode

This fixes a build failure in debug mode, as the value to be printed
does not implement Display.

* output: get rid of an unsafe block

This get rid of an unsafe block which is not necessary, and only used
when building in debug mode.
2020-01-17 19:05:18 +05:30
danieleades
af45420027 style: format code with rustfmt (#1632)
> incidentally, how do we feel about adding a rustfmt check to the CI(s)?
yes we should be doing that. you can send another pr that adds the check to the Ci
2020-01-11 23:45:46 +05:30
Jeremy Stucki
2e1acb648c Refactor mkeymap (#1618)
* refactor(mkeymap): Use iterators

* refactor(mkeymap): Implement contains method

* refactor(mkeymap): Deprecate methods

Co-authored-by: Dylan DPC <dylan.dpc@gmail.com>
2020-01-09 23:00:22 +05:30
Pavan Kumar Sunkara
0352bb30c8 Ported all the commits from structopt (#23)
* Automatic naming of fields and subcommands (#143)

* Introduce smarter parsing of doc comments. (#146)

* Fix invalid structopt syntax error message (#154)

There was a typo preventing the probematic attr to be shown to the user.

* Fix spelling: occurences -> occurrences, (#158)

was found in comments and code, but required no user-facing API change.

* Remove line-ending periods from short help. (#161)

* Fix #168

* Support Option<Option<T>> field types (#190)

* Support Option<Vec<T>> field type (#191)

* Fix use of deprecated function

* Fix some clippy lints

* Update deprecated function and provide more info about the parsing error (#193)

* Improve ChangeLog as suggested by @ErichDonGubler (#194)

* [Casing] Change default from verbatim to kebab. (#204)

.. fixes TeXitoi/structopt#202

* Use trybuild for testing expected proc macro errors (#205)

* Custom attributes parser (#198)

* update README.md for 0.3

fix #208

* Small fixes: clippy and typos (#215)

* Add example for environment variables (#160) (#216)

* Support skipping struct fields (#213)

* Now error messages highlight the error location (#225)

* Minor fixes

* Change behavior of `about/author/version` and ad `no_version`

* Emit error about `raw` removal

* Update changelog

* Update keyvalue example (#234)

* Update documentation and changelog (#236)

* Update dependencies (#227)

* Bump minimum rustc version to 1.36

* Fix issues

* Fix structopt-derive permissions (#239)

* Fix #245 (#246)

* Emit dummy impls on error (#248)

* Fix changelog example (#250)

* Do not call .verison() when CARGO_PKG_VERSION is not set

* Update and improve docs

* Propagate span info from origin code to generated code

Most of `quote!` invocations are replaced with `quote_spanned!` ones.
Now everywhere - sometimes it's pointless, sometimes we don't have
any meaningless location to toke a span from, sometimes I just can't
workaround the current implementation - too much changes.

* Fix nightly tests

* Do not mangle `author` string inside `<...>`

* Support `skip = value` syntax

* Fix code formatting

* Fix nightly tests

* Run ui tests only on stable

* Add from_flag parser (#271)

* Clarify docs and error messages (#277)

* Fix parse for OptionVec (#279)

ref pull #191

* Fix #269 and #265 (#278)

* Pass the try_from_str functions a &str instead of a &String. (#282)

In most cases this doesn't matter, as &String is coerced to a &str, but
this fails for generic functions like CString::new.

* Add an example of a negative flag (i.e. --no-verbose)

Question from https://github.com/TeXitoi/structopt/issues/280

* Fix #283 (#284)

Fix #283

* Add `examples/README.md` and do some cleanup

* Handle special types correctly

* cargo clippy

* Handle inter-expansion top-level args properly

* Cleanup tests

* Update proc-macro-error to v0.4

* Offer helpful suggestion on `raw(...)` error

* Add `after_help` example

* Prohibit positional `bool` args

* Add tests/utils.rs

* fixed typo, removed misleading doc

* Remove CHANGELOG additions

* Rust 2018

* Addressed review

Co-authored-by: rnd <bruno.kirschner@online.de>
Co-authored-by: Robin Lambertz <github@roblab.la>
Co-authored-by: florianjacob <accounts+github@florianjacob.de>
Co-authored-by: Ted Driggs <ted.driggs@outlook.com>
Co-authored-by: Guillaume P. <TeXitoi@users.noreply.github.com>
Co-authored-by: Ivan Veselov <veselov@gmail.com>
Co-authored-by: Owen Walpole <owenthewizard@hotmail.com>
Co-authored-by: Robin Stocker <robin.stocker@gmail.com>
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>
Co-authored-by: kpcyrd <git@rxv.cc>
Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
Co-authored-by: Andy Weiss <wvvwwvw@gmail.com>
Co-authored-by: xiaoniu-578fa6bff964d005 <32661032+xiaoniu-578fa6bff964d005@users.noreply.github.com>
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Co-authored-by: Renê Couto e Silva <31329678+csrene@users.noreply.github.com>
2020-01-07 15:47:23 +05:30