Skip to content

Commit 0a2dff3

Browse files
authored
Merge pull request #378 from epage/template
chore: Update from _rust template
2 parents 0de225b + 24bff7e commit 0a2dff3

File tree

17 files changed

+47
-24
lines changed

17 files changed

+47
-24
lines changed

.github/renovate.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
matchManagers: [
3333
'custom.regex',
3434
],
35-
matchPackageNames: [
35+
matchDepNames: [
3636
'STABLE',
3737
],
3838
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
run: cargo install sarif-fmt --locked
152152
- name: Check
153153
run: >
154-
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
154+
cargo clippy --workspace --all-features --all-targets --message-format=json
155155
| clippy-sarif
156156
| tee clippy-results.sarif
157157
| sarif-fmt

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ appreciate any level you're willing to do.
77

88
Need some new functionality to help? You can let us know by opening an
99
[issue][new issue]. It's helpful to look through [all issues][all issues] in
10-
case its already being talked about.
10+
case it's already being talked about.
1111

1212
## Bug Reports
1313

1414
Please let us know about what problems you run into, whether in behavior or
1515
ergonomics of API. You can do this by opening an [issue][new issue]. It's
16-
helpful to look through [all issues][all issues] in case its already being
16+
helpful to look through [all issues][all issues] in case it's already being
1717
talked about.
1818

1919
## Pull Requests
2020

21-
Looking for an idea? Check our [issues][issues]. If it's look more open ended,
21+
Looking for an idea? Check our [issues][issues]. If the issue looks open ended,
2222
it is probably best to post on the issue how you are thinking of resolving the
2323
issue so you can get feedback early in the process. We want you to be
2424
successful and it can be discouraging to find out a lot of re-work is needed.
@@ -41,15 +41,18 @@ As a heads up, we'll be running your PR through the following gauntlet:
4141
Not everything can be checked automatically though.
4242

4343
We request that the commit history gets cleaned up.
44+
4445
We ask that commits are atomic, meaning they are complete and have a single responsibility.
45-
PRs should tell a cohesive story, with test and refactor commits that keep the
46+
A complete commit should build, pass tests, update documentation and tests, and not have dead code.
47+
48+
PRs should tell a cohesive story, with refactor and test commits that keep the
4649
fix or feature commits simple and clear.
4750

4851
Specifically, we would encourage
4952
- File renames be isolated into their own commit
50-
- Add tests in a commit before their feature or fix, showing the current behavior.
53+
- Add tests in a commit before their feature or fix, showing the current behavior (i.e. they should pass).
5154
The diff for the feature/fix commit will then show how the behavior changed,
52-
making it clearer to reviewrs and the community and showing people that the
55+
making the commit's intent clearer to reviewers and the community, and showing people that the
5356
test is verifying the expected state.
5457
- e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520)
5558

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ rc_mutex = "warn"
7070
redundant_feature_names = "warn"
7171
ref_option_ref = "warn"
7272
rest_pat_in_fully_bound_structs = "warn"
73+
result_large_err = "allow"
7374
same_functions_in_if_condition = "warn"
7475
self_named_module_files = "warn"
7576
semicolon_if_nothing_returned = "warn"

crates/snapbox-macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ include.workspace = true
1515

1616
[package.metadata.docs.rs]
1717
all-features = true
18+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
1819

1920
[features]
2021
default = []

crates/snapbox-macros/README.md

Lines changed: 4 additions & 4 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

18-
## Contribution
18+
### 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/snapbox

crates/snapbox-macros/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#![warn(clippy::print_stderr)]
33
#![warn(clippy::print_stdout)]
44

5+
#[doc = include_str!("../README.md")]
6+
#[cfg(doctest)]
7+
pub struct ReadmeDoctests;
8+
59
#[cfg(feature = "color")]
610
pub use anstream::eprint;
711
#[cfg(feature = "color")]

crates/snapbox/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ include.workspace = true
1515

1616
[package.metadata.docs.rs]
1717
all-features = true
18-
rustdoc-args = ["--cfg", "docsrs"]
19-
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
18+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
2019

2120
[package.metadata.release]
2221
pre-release-replacements = [

crates/snapbox/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ See the [docs](http://docs.rs/snapbox) for more.
1919

2020
Licensed under either of
2121

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

2525
at your option.
2626

27-
## Contribution
27+
### Contribution
2828

2929
Unless you explicitly state otherwise, any contribution intentionally
3030
submitted for inclusion in the work by you, as defined in the Apache-2.0
31-
license, shall be dual licensed as above, without any additional terms or
31+
license, shall be dual-licensed as above, without any additional terms or
3232
conditions.
3333

3434
[Crates.io]: https://crates.io/crates/snapbox

crates/snapbox/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
#![warn(clippy::print_stderr)]
6565
#![warn(clippy::print_stdout)]
6666

67+
#[doc = include_str!("../README.md")]
68+
#[cfg(doctest)]
69+
pub struct ReadmeDoctests;
70+
6771
mod macros;
6872

6973
pub mod assert;

crates/trycmd/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ include.workspace = true
1616

1717
[package.metadata.docs.rs]
1818
all-features = true
19-
rustdoc-args = ["--cfg", "docsrs"]
20-
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
19+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
2120

2221
[package.metadata.release]
2322
pre-release-replacements = [

crates/trycmd/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ at your option.
4848

4949
Unless you explicitly state otherwise, any contribution intentionally
5050
submitted for inclusion in the work by you, as defined in the Apache-2.0
51-
license, shall be dual licensed as above, without any additional terms or
51+
license, shall be dual-licensed as above, without any additional terms or
5252
conditions.
5353

5454
[Crates.io]: https://crates.io/crates/trycmd

crates/trycmd/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@
229229
#![warn(clippy::print_stderr)]
230230
#![warn(clippy::print_stdout)]
231231

232+
#[doc = include_str!("../README.md")]
233+
#[cfg(doctest)]
234+
pub struct ReadmeDoctests;
235+
232236
pub mod cargo;
233237
pub mod schema;
234238

crates/tryfn/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ include.workspace = true
1616

1717
[package.metadata.docs.rs]
1818
all-features = true
19-
rustdoc-args = ["--cfg", "docsrs"]
20-
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
19+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
2120

2221
[package.metadata.release]
2322
pre-release-replacements = [

crates/tryfn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ at your option.
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/tryfn

crates/tryfn/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
//! }
4040
//! ```
4141
42+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
43+
#![warn(clippy::print_stderr)]
44+
#![warn(clippy::print_stdout)]
45+
46+
#[doc = include_str!("../README.md")]
47+
#[cfg(doctest)]
48+
pub struct ReadmeDoctests;
49+
4250
use libtest_mimic::Trial;
4351

4452
pub use snapbox::data::DataFormat;

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ allow = [
8787
"MIT",
8888
"MIT-0",
8989
"Apache-2.0",
90+
"BSD-2-Clause",
9091
"BSD-3-Clause",
9192
"MPL-2.0",
9293
"Unicode-DFS-2016",

0 commit comments

Comments
 (0)