Skip to content

Commit

Permalink
Merge pull request #49 from epage/template
Browse files Browse the repository at this point in the history
chore: Update from _rust template
  • Loading branch information
epage authored Feb 3, 2025
2 parents 19c1903 + 4ff6d7b commit eec4d8f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
matchManagers: [
'custom.regex',
],
matchPackageNames: [
matchDepNames: [
'STABLE',
],
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
run: cargo install sarif-fmt --locked
- name: Check
run: >
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
cargo clippy --workspace --all-features --all-targets --message-format=json
| clippy-sarif
| tee clippy-results.sarif
| sarif-fmt
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: pre-commit/[email protected]
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ appreciate any level you're willing to do.

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

## Bug Reports

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

## Pull Requests

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

We request that the commit history gets cleaned up.

We ask that commits are atomic, meaning they are complete and have a single responsibility.
PRs should tell a cohesive story, with test and refactor commits that keep the
A complete commit should build, pass tests, update documentation and tests, and not have dead code.

PRs should tell a cohesive story, with refactor and test commits that keep the
fix or feature commits simple and clear.

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

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,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"
Expand Down Expand Up @@ -100,8 +101,7 @@ include.workspace = true

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

[package.metadata.release]
pre-release-replacements = [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ at your option.

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
license, shall be dual-licensed as above, without any additional terms or
conditions.

[Crates.io]: https://crates.io/crates/dir-diff
Expand Down
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ allow = [
"MIT",
"MIT-0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"MPL-2.0",
"Unicode-DFS-2016",
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#![warn(clippy::print_stderr)]
#![warn(clippy::print_stdout)]

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;

use std::cmp::Ordering;
use std::path::Path;

Expand Down

0 comments on commit eec4d8f

Please sign in to comment.