mirror of
https://github.com/clap-rs/clap.git
synced 2026-01-25 03:26:18 +00:00
chore: Update from _rust/main template
This commit is contained in:
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[resolver]
|
||||
incompatible-rust-versions = "fallback"
|
||||
18
.github/renovate.json5
vendored
18
.github/renovate.json5
vendored
@@ -9,15 +9,15 @@
|
||||
customManagers: [
|
||||
{
|
||||
customType: 'regex',
|
||||
fileMatch: [
|
||||
'^rust-toolchain\\.toml$',
|
||||
'Cargo.toml$',
|
||||
'clippy.toml$',
|
||||
'^Makefile$',
|
||||
'^tests/derive_ui.rs$',
|
||||
'\\.clippy.toml$',
|
||||
'^\\.github/workflows/ci.yml$',
|
||||
'^\\.github/workflows/rust-next.yml$',
|
||||
managerFilePatterns: [
|
||||
'/^rust-toolchain\\.toml$/',
|
||||
'/Cargo.toml$/',
|
||||
'/clippy.toml$/',
|
||||
'/^Makefile$/',
|
||||
'/^tests/derive_ui.rs$/',
|
||||
'/\\.clippy.toml$/',
|
||||
'/^\\.github/workflows/ci.yml$/',
|
||||
'/^\\.github/workflows/rust-next.yml$/',
|
||||
],
|
||||
matchStrings: [
|
||||
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
|
||||
|
||||
@@ -3,29 +3,22 @@ exclude: |
|
||||
tests/.*|
|
||||
CHANGELOG.md
|
||||
)$
|
||||
default_install_hook_types: ["pre-commit", "commit-msg"]
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
stages: [commit]
|
||||
- id: check-json
|
||||
stages: [commit]
|
||||
- id: check-toml
|
||||
stages: [commit]
|
||||
- id: check-merge-conflict
|
||||
stages: [commit]
|
||||
- id: check-case-conflict
|
||||
stages: [commit]
|
||||
- id: detect-private-key
|
||||
stages: [commit]
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.16.20
|
||||
rev: v1.32.0
|
||||
hooks:
|
||||
- id: typos
|
||||
stages: [commit]
|
||||
- repo: https://github.com/crate-ci/committed
|
||||
rev: v1.0.20
|
||||
rev: v1.1.7
|
||||
hooks:
|
||||
- id: committed
|
||||
stages: [commit-msg]
|
||||
|
||||
14
Cargo.toml
14
Cargo.toml
@@ -21,12 +21,12 @@ include = [
|
||||
"Cargo.toml",
|
||||
"LICENSE*",
|
||||
"README.md",
|
||||
"benches/**/*",
|
||||
"examples/**/*"
|
||||
]
|
||||
|
||||
[workspace.lints.rust]
|
||||
rust_2018_idioms = { level = "warn", priority = -1 }
|
||||
unnameable_types = "allow"
|
||||
unreachable_pub = "warn"
|
||||
unsafe_op_in_unsafe_fn = "warn"
|
||||
unused_lifetimes = "warn"
|
||||
@@ -69,7 +69,7 @@ lossy_float_literal = "warn"
|
||||
macro_use_imports = "warn"
|
||||
mem_forget = "warn"
|
||||
mutex_integer = "warn"
|
||||
needless_continue = "warn"
|
||||
needless_continue = "allow"
|
||||
needless_for_each = "warn"
|
||||
negative_feature_names = "warn"
|
||||
path_buf_push_overwrite = "warn"
|
||||
@@ -78,6 +78,7 @@ rc_mutex = "warn"
|
||||
redundant_feature_names = "warn"
|
||||
ref_option_ref = "warn"
|
||||
rest_pat_in_fully_bound_structs = "warn"
|
||||
result_large_err = "allow"
|
||||
same_functions_in_if_condition = "warn"
|
||||
self_named_module_files = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
@@ -97,6 +98,15 @@ multiple_bound_locations = "allow"
|
||||
assigning_clones = "allow"
|
||||
blocks_in_conditions = "allow"
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort"
|
||||
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
# debug = "line-tables-only" # requires Cargo 1.71
|
||||
|
||||
[package]
|
||||
name = "clap"
|
||||
version = "4.5.39"
|
||||
|
||||
@@ -10,15 +10,16 @@ Builder implementation for clap.
|
||||
|
||||
Licensed under either of
|
||||
|
||||
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
|
||||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
|
||||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
|
||||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
|
||||
|
||||
at your option.
|
||||
|
||||
### Contribution
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
||||
dual licensed as above, without any additional terms or conditions.
|
||||
Unless you explicitly state otherwise, any contribution intentionally
|
||||
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
||||
license, shall be dual-licensed as above, without any additional terms or
|
||||
conditions.
|
||||
|
||||
See [CONTRIBUTING](CONTRIBUTING.md) for more details.
|
||||
|
||||
@@ -47,3 +47,7 @@ mod util;
|
||||
|
||||
const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \
|
||||
report at https://github.com/clap-rs/clap/issues";
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
@@ -106,3 +106,7 @@ pub use aot::generate_to;
|
||||
pub use aot::Generator;
|
||||
/// Deprecated, see [`aot::Shell`]
|
||||
pub use aot::Shell;
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
@@ -235,3 +235,7 @@ fn generate_completion(completions: &mut String, cmd: &Command, is_subcommand: b
|
||||
fn single_line_styled_str(text: &StyledStr) -> String {
|
||||
text.to_string().replace('\n', " ")
|
||||
}
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
@@ -10,15 +10,16 @@ Macro implementation for clap's derives.
|
||||
|
||||
Licensed under either of
|
||||
|
||||
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
|
||||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
|
||||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
|
||||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
|
||||
|
||||
at your option.
|
||||
|
||||
### Contribution
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
||||
dual licensed as above, without any additional terms or conditions.
|
||||
Unless you explicitly state otherwise, any contribution intentionally
|
||||
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
||||
license, shall be dual-licensed as above, without any additional terms or
|
||||
conditions.
|
||||
|
||||
See [CONTRIBUTING](CONTRIBUTING.md) for more details.
|
||||
|
||||
@@ -520,3 +520,7 @@ fn is_number(arg: &str) -> bool {
|
||||
None => true,
|
||||
}
|
||||
}
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
@@ -347,3 +347,7 @@ fn app_has_arguments(cmd: &clap::Command) -> bool {
|
||||
fn app_has_subcommands(cmd: &clap::Command) -> bool {
|
||||
cmd.get_subcommands().any(|i| !i.is_hide_set())
|
||||
}
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
@@ -87,6 +87,7 @@ allow = [
|
||||
"MIT",
|
||||
"MIT-0",
|
||||
"Apache-2.0",
|
||||
"BSD-2-Clause",
|
||||
"BSD-3-Clause",
|
||||
"MPL-2.0",
|
||||
"Unicode-DFS-2016",
|
||||
|
||||
@@ -100,3 +100,7 @@ pub mod _faq;
|
||||
pub mod _features;
|
||||
#[cfg(feature = "unstable-doc")]
|
||||
pub mod _tutorial;
|
||||
|
||||
#[doc = include_str!("../README.md")]
|
||||
#[cfg(doctest)]
|
||||
pub struct ReadmeDoctests;
|
||||
|
||||
Reference in New Issue
Block a user