Skip to content

Commit 3618528

Browse files
committed
chore: Update from _rust/main template
2 parents d227164 + 271edc6 commit 3618528

15 files changed

Lines changed: 57 additions & 56 deletions

File tree

.github/renovate.json5

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
customManagers: [
1010
{
1111
customType: 'regex',
12-
fileMatch: [
13-
'^rust-toolchain\\.toml$',
14-
'Cargo.toml$',
15-
'clippy.toml$',
16-
'\\.clippy.toml$',
17-
'^\\.github/workflows/ci.yml$',
18-
'^\\.github/workflows/rust-next.yml$',
12+
managerFilePatterns: [
13+
'/^rust-toolchain\\.toml$/',
14+
'/Cargo.toml$/',
15+
'/clippy.toml$/',
16+
'/\\.clippy.toml$/',
17+
'/^\\.github/workflows/ci.yml$/',
18+
'/^\\.github/workflows/rust-next.yml$/',
1919
],
2020
matchStrings: [
2121
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Build
5151
run: cargo test --workspace --no-run
5252
- name: Test
53-
run: cargo hack test --feature-powerset --workspace
53+
run: cargo hack test --each-feature --workspace
5454
msrv:
5555
name: "Check MSRV"
5656
runs-on: ubuntu-latest
@@ -64,7 +64,7 @@ jobs:
6464
- uses: Swatinem/rust-cache@v2
6565
- uses: taiki-e/install-action@cargo-hack
6666
- name: Default features
67-
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
67+
run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
6868
minimal-versions:
6969
name: Minimal versions
7070
runs-on: ubuntu-latest
@@ -82,7 +82,7 @@ jobs:
8282
- name: Downgrade dependencies to minimal versions
8383
run: cargo +nightly generate-lockfile -Z minimal-versions
8484
- name: Compile with minimal versions
85-
run: cargo +stable check --workspace --all-features --locked
85+
run: cargo +stable check --workspace --all-features --locked --keep-going
8686
lockfile:
8787
runs-on: ubuntu-latest
8888
steps:
@@ -109,7 +109,7 @@ jobs:
109109
- name: Check documentation
110110
env:
111111
RUSTDOCFLAGS: -D warnings
112-
run: cargo doc --workspace --all-features --no-deps --document-private-items
112+
run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
113113
rustfmt:
114114
name: rustfmt
115115
runs-on: ubuntu-latest
@@ -155,7 +155,7 @@ jobs:
155155
sarif_file: clippy-results.sarif
156156
wait-for-processing: true
157157
- name: Report status
158-
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
158+
run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
159159
coverage:
160160
name: Coverage
161161
runs-on: ubuntu-latest

.github/workflows/rust-next.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Build
4141
run: cargo test --workspace --no-run
4242
- name: Test
43-
run: cargo hack test --feature-powerset --workspace
43+
run: cargo hack test --each-feature --workspace
4444
latest:
4545
name: "Check latest dependencies"
4646
runs-on: ubuntu-latest
@@ -58,4 +58,4 @@ jobs:
5858
- name: Build
5959
run: cargo test --workspace --no-run
6060
- name: Test
61-
run: cargo hack test --feature-powerset --workspace
61+
run: cargo hack test --each-feature --workspace

.pre-commit-config.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1+
default_install_hook_types: ["pre-commit", "commit-msg"]
12
repos:
23
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
4+
rev: v5.0.0
45
hooks:
56
- id: check-yaml
6-
stages: [commit]
77
- id: check-json
8-
stages: [commit]
98
- id: check-toml
10-
stages: [commit]
119
- id: check-merge-conflict
12-
stages: [commit]
1310
- id: check-case-conflict
14-
stages: [commit]
1511
- id: detect-private-key
16-
stages: [commit]
1712
- repo: https://github.com/crate-ci/typos
18-
rev: v1.16.20
13+
rev: v1.32.0
1914
hooks:
2015
- id: typos
21-
stages: [commit]
2216
- repo: https://github.com/crate-ci/committed
23-
rev: v1.0.20
17+
rev: v1.1.7
2418
hooks:
2519
- id: committed
26-
stages: [commit-msg]

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ include = [
1414
"Cargo.lock",
1515
"LICENSE*",
1616
"README.md",
17-
"benches/**/*",
1817
"examples/**/*"
1918
]
2019

2120
[workspace.lints.rust]
2221
rust_2018_idioms = { level = "warn", priority = -1 }
22+
unnameable_types = "warn"
2323
unreachable_pub = "warn"
2424
unsafe_op_in_unsafe_fn = "warn"
2525
unused_lifetimes = "warn"
@@ -62,7 +62,7 @@ lossy_float_literal = "warn"
6262
macro_use_imports = "warn"
6363
mem_forget = "warn"
6464
mutex_integer = "warn"
65-
needless_continue = "warn"
65+
needless_continue = "allow"
6666
needless_for_each = "warn"
6767
negative_feature_names = "warn"
6868
path_buf_push_overwrite = "warn"
@@ -94,4 +94,4 @@ panic = "abort"
9494
panic = "abort"
9595
codegen-units = 1
9696
lto = true
97-
debug = "line-tables-only"
97+
# debug = "line-tables-only" # requires Cargo 1.71

crates/lexarg-error/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#![warn(clippy::print_stderr)]
1616
#![warn(clippy::print_stdout)]
1717

18-
#[doc = include_str!("../README.md")]
19-
#[cfg(doctest)]
20-
pub struct ReadmeDoctests;
21-
2218
/// Collect context for creating an error
2319
#[derive(Debug)]
2420
pub struct ErrorContext<'a> {
@@ -96,3 +92,9 @@ impl std::fmt::Display for ErrorContext<'_> {
9692
Ok(())
9793
}
9894
}
95+
96+
#[doc = include_str!("../README.md")]
97+
#[cfg(doctest)]
98+
pub struct ReadmeDoctests;
99+
100+

crates/lexarg-parser/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#![warn(clippy::print_stderr)]
1717
#![warn(clippy::print_stdout)]
1818

19-
#[doc = include_str!("../README.md")]
20-
#[cfg(doctest)]
21-
pub struct ReadmeDoctests;
22-
2319
mod ext;
2420

2521
use std::ffi::OsStr;
@@ -417,6 +413,7 @@ fn ceil_char_boundary(s: &str, curr_boundary: usize) -> Option<usize> {
417413
mod private {
418414
use super::OsStr;
419415

416+
#[allow(unnameable_types)]
420417
pub trait Sealed {}
421418
impl<const C: usize, S> Sealed for [S; C] where S: AsRef<OsStr> + std::fmt::Debug {}
422419
impl<S> Sealed for &'_ [S] where S: AsRef<OsStr> + std::fmt::Debug {}
@@ -873,3 +870,7 @@ mod tests {
873870
}
874871
}
875872
}
873+
874+
#[doc = include_str!("../README.md")]
875+
#[cfg(doctest)]
876+
pub struct ReadmeDoctests;

crates/lexarg/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#![warn(clippy::print_stderr)]
1717
#![warn(clippy::print_stdout)]
1818

19-
#[doc = include_str!("../README.md")]
20-
#[cfg(doctest)]
21-
pub struct ReadmeDoctests;
22-
2319
/// Simplify parsing of arguments
2420
pub mod prelude {
2521
pub use crate::Arg::*;
@@ -190,3 +186,7 @@ impl<T> OptionContextExt<T> for Option<T> {
190186
})
191187
}
192188
}
189+
190+
#[doc = include_str!("../README.md")]
191+
#[cfg(doctest)]
192+
pub struct ReadmeDoctests;

crates/libtest-lexarg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ include.workspace = true
1111

1212
[package.metadata.docs.rs]
1313
all-features = true
14-
rustdoc-args = ["--cfg", "docsrs"]
14+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
1515

1616
[package.metadata.release]
1717
pre-release-replacements = [

crates/libtest-lexarg/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010

1111
Licensed under either of
1212

13-
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
14-
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
13+
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
14+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
1515

1616
at your option.
1717

1818
### Contribution
1919

2020
Unless you explicitly state otherwise, any contribution intentionally
2121
submitted for inclusion in the work by you, as defined in the Apache-2.0
22-
license, shall be dual licensed as above, without any additional terms or
22+
license, shall be dual-licensed as above, without any additional terms or
2323
conditions.
2424

2525
[Crates.io]: https://crates.io/crates/lexarg

0 commit comments

Comments
 (0)