Skip to content

Commit eec4d8f

Browse files
authored
Merge pull request #49 from epage/template
chore: Update from _rust template
2 parents 19c1903 + 4ff6d7b commit eec4d8f

File tree

8 files changed

+22
-12
lines changed

8 files changed

+22
-12
lines changed

.github/renovate.json5

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
run: cargo install sarif-fmt --locked
145145
- name: Check
146146
run: >
147-
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
147+
cargo clippy --workspace --all-features --all-targets --message-format=json
148148
| clippy-sarif
149149
| tee clippy-results.sarif
150150
| sarif-fmt

.github/workflows/pre-commit.yml

+2
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.x'
2729
- uses: pre-commit/[email protected]

CONTRIBUTING.md

+10-7
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

48-
Specifically, we would encouage
51+
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

+2-2
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"
@@ -100,8 +101,7 @@ include.workspace = true
100101

101102
[package.metadata.docs.rs]
102103
all-features = true
103-
rustdoc-args = ["--cfg", "docsrs"]
104-
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
104+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
105105

106106
[package.metadata.release]
107107
pre-release-replacements = [

README.md

+1-1
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/dir-diff

deny.toml

+1
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",

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
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+
1822
use std::cmp::Ordering;
1923
use std::path::Path;
2024

0 commit comments

Comments
 (0)