Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,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"
strategy:
Expand All @@ -68,7 +68,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
run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --keep-going
minimal-versions:
name: Minimal versions
runs-on: ubuntu-latest
Expand All @@ -86,7 +86,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 @@ -113,7 +113,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 @@ -159,7 +159,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 @@ -41,7 +41,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 @@ -60,4 +60,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
13 changes: 11 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,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 @@ -62,7 +62,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,3 +86,12 @@ uninlined_format_args = "warn"
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
1 change: 0 additions & 1 deletion crates/anstream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anstream"
version = "0.6.18"
description = "A simple cross platform library for writing colored text to a terminal."
homepage = "https://github.com/rust-cli/anstyle"
categories = ["command-line-interface"]
keywords = ["ansi", "terminal", "color", "strip", "wincon"]
repository.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/anstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ overhead stripping of ANSI escape codes.

Licensed under either of

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

at your option.

### Contribution
## [Contribute](../../CONTRIBUTING.md)

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/anstream
Expand Down
4 changes: 4 additions & 0 deletions crates/anstream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ pub fn stderr() -> Stderr {

/// Selection for overriding color output
pub use colorchoice::ColorChoice;

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;
1 change: 1 addition & 0 deletions crates/anstream/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ impl AsLockedWrite for crate::Buffer {
}

mod private {
#[allow(unnameable_types)]
pub trait Sealed {}

impl<T: Sealed + ?Sized> Sealed for &T {}
Expand Down
1 change: 0 additions & 1 deletion crates/anstyle-ansi-term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anstyle-ansi-term"
version = "1.0.3"
description = "Adapt between ansi_term and anstyle"
homepage = "https://github.com/rust-cli/anstyle"
categories = ["command-line-interface"]
keywords = ["ansi", "terminal", "color", "ansi_term"]
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-ansi-term/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 The rust-cli Developers
Copyright (c) Individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions crates/anstyle-ansi-term/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

Licensed under either of

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

at your option.

### Contribution
## [Contribute](../../CONTRIBUTING.md)

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/anstyle-ansi-term
Expand Down
4 changes: 4 additions & 0 deletions crates/anstyle-ansi-term/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ fn xterm_to_ansi_color(color: anstyle::Ansi256Color) -> ansi_term::Color {
fn rgb_to_ansi_color(color: anstyle::RgbColor) -> ansi_term::Color {
ansi_term::Color::RGB(color.0, color.1, color.2)
}

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;
1 change: 0 additions & 1 deletion crates/anstyle-crossterm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anstyle-crossterm"
version = "4.0.0"
description = "Adapt between crossterm and anstyle"
homepage = "https://github.com/rust-cli/anstyle"
categories = ["command-line-interface"]
keywords = ["ansi", "terminal", "color", "crossterm"]
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-crossterm/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 The rust-cli Developers
Copyright (c) Individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions crates/anstyle-crossterm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

Licensed under either of

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

at your option.

### Contribution
## [Contribute](../../CONTRIBUTING.md)

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/anstyle-crossterm
Expand Down
4 changes: 4 additions & 0 deletions crates/anstyle-crossterm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ fn rgb_to_ansi_color(color: anstyle::RgbColor) -> crossterm::style::Color {
b: color.2,
}
}

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;
1 change: 0 additions & 1 deletion crates/anstyle-git/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anstyle-git"
version = "1.1.2"
description = "Parse Git Style Descriptions"
homepage = "https://github.com/rust-cli/anstyle"
categories = ["command-line-interface"]
keywords = ["ansi", "terminal", "color", "git", "colorparse"]
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-git/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 Josh Triplett, 2022 The rust-cli Developers
Copyright (c) Individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions crates/anstyle-git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

Licensed under either of

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

at your option.

### Contribution
## [Contribute](../../CONTRIBUTING.md)

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.

### Special Thanks
Expand Down
4 changes: 4 additions & 0 deletions crates/anstyle-git/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,7 @@ mod tests {
test!("blue#123456" => UnknownWord "blue#123456");
}
}

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;
1 change: 0 additions & 1 deletion crates/anstyle-lossy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anstyle-lossy"
version = "1.1.3"
description = "Lossy conversion between ANSI Color Codes"
homepage = "https://github.com/rust-cli/anstyle"
categories = ["command-line-interface"]
keywords = ["ansi", "terminal", "color"]
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-lossy/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 Josh Triplett, 2022 The rust-cli Developers
Copyright (c) Individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading