Contributions are always welcome! And there is a multitude of ways in which you can help depending on what you like to do, or are good at. Anything from documentation, code cleanup, issue completion, new features, you name it, even filing issues is contributing and greatly appreciated!
Another really great way to help is if you find an interesting, or helpful way in which to use clap
. You can either add it to the examples/ directory, or file an issue and tell me. I'm all about giving credit where credit is due :)
There are a few goals of clap
that I‘d like to maintain throughout contributions. If your proposed changes break, or go against any of these goals we’ll discuss the changes further before merging (but will not be ignored, all contributes are welcome!). These are by no means hard-and-fast rules, as I'm no expert and break them myself from time to time (even if by mistake or ignorance :P).
clap
should be low since the main program is the star of the showpanic!
on developer error (e.g. apps and args), exit gracefully on end-user errorOur releases fall into one of:
#[doc(hidden)]
all deprecated items in the prior minor releaseIf your change does not fit within a “patch” release, please coordinate with the clap maintainers for how to handle the situation.
Some practices to avoid breaking changes
/// Deprecated in [Issue #XXX](https://github.com/clap-rs/clap/issues/XXX), replaced with [intra-doc-link]
#[deprecated(since = "X.Y.Z", note = "Replaced with
ITEM in Issue #XXX")]
unstable-<name>
feature flag with a stablization tracking issue (e.g. Multicall Tracking issue)To test with all features both enabled and disabled, you can run this command:
$ cargo test --features "wrap_help yaml regex unstable-replace"
Sometimes it's helpful to only run a subset of the tests, which can be done via:
$ cargo test --test <test_name>
During the CI process clap
runs against many different lints using clippy
.
In order to check the code for lints and to format it run:
$ cargo clippy --features "wrap_help yaml regex unstable-replace" -- -D warnings $ cargo fmt -- --check
Another helpful technique is to see the clap
debug output while developing features. In order to see the debug output while running the full test suite or individual tests, run:
$ cargo test --features debug # Or for individual tests $ cargo test --test <test_name> --features debug
git rebase
into concise commits and remove --fixup
s or wip
commits (git rebase -i HEAD~NUM
where NUM
is number of commits back to start the rebase)git push origin $your-branch
)master
! (You can also create the pull request first, and we'll merge when ready. This a good way to discuss proposed changes.)PR expectations:
We recognize that these are ideals and we don‘t want lack of comfort with git to get in the way of contributing. If you didn’t do these, bring it up with the maintainers and we can help work around this.
https://github.com/clap-rs/clap/issues/1464
)Yes, you can. In that case, you don't have to do anything except writing a comment on the issue saying that I do. The bounty will be reassigned to another issue.
Search for MSRV
, for example
$ rg --hidden MSRV
And update all of the references