From 8db276fc5ba20df6c0c2f8f0073cbcb2781f1648 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 21 Oct 2024 10:35:12 +0800 Subject: [PATCH 01/10] docs: Cross-reference source code view --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 97c7ed79..0e9372da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ From e121dd6ef9e11dfa818a813bbaffb12a16cd174e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 21 Oct 2024 15:39:54 +0800 Subject: [PATCH 02/10] chore(ci): Fix STABLE updates See rust-lang/cargo#14704 --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index c1844208..7ab13b9f 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -32,7 +32,7 @@ matchManagers: [ 'custom.regex', ], - matchPackageNames: [ + matchDepNames: [ 'STABLE', ], extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version From afa23ae258a1a6ec9f2268cd0b57c20a88dea3be Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 1 Nov 2024 15:36:16 -0500 Subject: [PATCH 03/10] style: Ignore large Err variants --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 0e9372da..7e38ce35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" From 006f98fb3a3e4d4a3054c9fc0ea33906a3e42d44 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 18 Nov 2024 13:48:49 -0600 Subject: [PATCH 04/10] chore(ci): Report deprecations in the review --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d49017e7..9fb9591c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 From 810013723912ca4faf8fbc87fc2ed25b2a531516 Mon Sep 17 00:00:00 2001 From: futreall <86553580+futreall@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:16:58 +0200 Subject: [PATCH 05/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0318b82..e9fca37f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ 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. 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 it 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) From b2aecee7155c151f9b443db45957bf5075d5085d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Dec 2024 12:48:07 -0600 Subject: [PATCH 06/10] docs(contrib): Fix language --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9fca37f..ee501ec8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. From 15ede43536f52b96d69152522bf57156662960a3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 3 Dec 2024 12:54:52 -0600 Subject: [PATCH 07/10] docs(readme): Add a hyphen --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e6c4e79..ace2bb24 100644 --- a/README.md +++ b/README.md @@ -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/PROJECT From 2f01ad6725cc0dfe275b8120bab58ff07d2bffe2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 16 Dec 2024 14:07:22 -0600 Subject: [PATCH 08/10] chore(ci): Allow 2-clause BSD --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index b6ecbe9c..ee5ae89b 100644 --- a/deny.toml +++ b/deny.toml @@ -87,6 +87,7 @@ allow = [ "MIT", "MIT-0", "Apache-2.0", + "BSD-2-Clause", "BSD-3-Clause", "MPL-2.0", "Unicode-DFS-2016", From e783559994c5e56d4d3327443dd70abb0f95ef68 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 18 Dec 2024 08:44:02 -0600 Subject: [PATCH 09/10] docs(contrib): Try to remove ambiguity about commits/PRs --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee501ec8..8048d243 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 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 reviewers 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) From d159ec5290740054b9b344f995d453d37307e7ff Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 24 Jan 2025 11:54:12 -0600 Subject: [PATCH 10/10] test: Verify readme --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 2eabbd09..f66c1100 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,3 +4,7 @@ #![warn(clippy::print_stderr)] #![warn(clippy::print_stdout)] #![allow(non_snake_case)] // TODO: Delete me + +#[doc = include_str!("../README.md")] +#[cfg(doctest)] +pub struct ReadmeDoctests;