Skip to content

chore: Update from _rust/main template #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
006f98f
chore(ci): Report deprecations in the review
epage Nov 18, 2024
8100137
Update CONTRIBUTING.md
futreall Nov 29, 2024
dabd07a
Merge pull request #26 from futreall/main
epage Nov 29, 2024
b2aecee
docs(contrib): Fix language
epage Dec 2, 2024
15ede43
docs(readme): Add a hyphen
epage Dec 3, 2024
2f01ad6
chore(ci): Allow 2-clause BSD
epage Dec 16, 2024
e783559
docs(contrib): Try to remove ambiguity about commits/PRs
epage Dec 18, 2024
d159ec5
test: Verify readme
epage Jan 24, 2025
743e4b8
perf: Optimize release builds
epage Feb 20, 2025
9a2e0cc
chore: Ensure MSRV-aware resolver is used
epage Mar 5, 2025
f4ac56d
chore: Lint for unnameable_types like unreachable_pub
epage Mar 14, 2025
77d28b2
style: Extra continues can communicate intent
epage Apr 3, 2025
06061d8
chore(ci): Report more results
epage Apr 10, 2025
97755b3
chore(ci): Improve perf at the cost of coverage
epage May 1, 2025
d1a5627
chore: Update RenovateBot
epage May 7, 2025
8c5c6ad
chore: Fix regex for renovatebot
epage May 7, 2025
cf166e3
chore(pre-commit): Update default stages
epage May 20, 2025
a7bfa22
chore(pre-commit): Use default stages
epage May 20, 2025
65fdcf6
chore(pre-commit): Update hooks
epage May 20, 2025
7a72bd0
chore(pre-commit): Ensure commit-msg hook is installed
epage May 20, 2025
5e85d68
chore: Strip benches on publish
epage May 27, 2025
f9842b3
chore: Avoid MSRV problems out of the box
epage Jun 2, 2025
b8a7ea4
chore(deps): Update Rust Stable to v1.87 (#18)
renovate[bot] Jun 2, 2025
6a0f727
chore: Update from _rust/main template
epage Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[resolver]
incompatible-rust-versions = "fallback"
14 changes: 7 additions & 7 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
customManagers: [
{
customType: 'regex',
fileMatch: [
'^rust-toolchain\\.toml$',
'Cargo.toml$',
'clippy.toml$',
'\\.clippy.toml$',
'^\\.github/workflows/ci.yml$',
'^\\.github/workflows/rust-next.yml$',
managerFilePatterns: [
'/^rust-toolchain\\.toml$/',
'/Cargo.toml$/',
'/clippy.toml$/',
'/\\.clippy.toml$/',
'/^\\.github/workflows/ci.yml$/',
'/^\\.github/workflows/rust-next.yml$/',
],
matchStrings: [
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
msrv:
name: "Check MSRV"
runs-on: ubuntu-latest
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Default features
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
minimal-versions:
name: Minimal versions
runs-on: ubuntu-latest
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Downgrade dependencies to minimal versions
run: cargo +nightly generate-lockfile -Z minimal-versions
- name: Compile with minimal versions
run: cargo +stable check --workspace --all-features --locked
run: cargo +stable check --workspace --all-features --locked --keep-going
lockfile:
runs-on: ubuntu-latest
steps:
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --all-features --no-deps --document-private-items
run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
Expand Down 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 All @@ -155,7 +155,7 @@ jobs:
sarif_file: clippy-results.sarif
wait-for-processing: true
- name: Report status
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
latest:
name: "Check latest dependencies"
runs-on: ubuntu-latest
Expand All @@ -58,4 +58,4 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
15 changes: 4 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
default_install_hook_types: ["pre-commit", "commit-msg"]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-yaml
stages: [commit]
- id: check-json
stages: [commit]
- id: check-toml
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: detect-private-key
stages: [commit]
- repo: https://github.com/crate-ci/typos
rev: v1.16.20
rev: v1.32.0
hooks:
- id: typos
stages: [commit]
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
rev: v1.1.7
hooks:
- id: committed
stages: [commit-msg]
15 changes: 9 additions & 6 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 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)

Expand Down
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ include = [
"Cargo.lock",
"LICENSE*",
"README.md",
"benches/**/*",
"examples/**/*"
]

[workspace.lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
unnameable_types = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"
Expand Down Expand Up @@ -61,7 +61,7 @@ lossy_float_literal = "warn"
macro_use_imports = "warn"
mem_forget = "warn"
mutex_integer = "warn"
needless_continue = "warn"
needless_continue = "allow"
needless_for_each = "warn"
negative_feature_names = "warn"
path_buf_push_overwrite = "warn"
Expand All @@ -86,6 +86,15 @@ verbose_file_reads = "warn"
wildcard_imports = "warn"
zero_sized_map_values = "warn"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
codegen-units = 1
lto = true
# debug = "line-tables-only" # requires Cargo 1.71

[package]
name = "assert_cmd"
version = "2.0.17"
Expand Down Expand Up @@ -126,7 +135,6 @@ name = "bin_fixture"
predicates = { version = "3.0.1", default-features = false, features = ["diff"] }
predicates-core = "1.0.6"
predicates-tree = "1.0.1"
doc-comment = "0.3"
wait-timeout = "0.2.0"
bstr = "1.0.1"
anstream = { version = "0.6.7", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ coreyja

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/assert_cmd
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: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,6 @@ pub use crate::cmd::Command;
mod color;
use color::Palette;

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