diff --git a/.cargo/config.toml b/.cargo/config.toml index ba32123..a698528 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,6 @@ +[resolver] +incompatible-rust-versions = "fallback" + [target.x86_64-pc-windows-msvc] rustflags = ["-Ctarget-feature=+crt-static"] diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 6dd1153..dbf30f1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -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.*?(?\\d+\\.\\d+(\\.\\d+)?)', diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caa82e5..2ebed65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 lockfile: runs-on: ubuntu-latest steps: @@ -91,7 +91,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 @@ -137,7 +137,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 diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index d5a79c4..d27f9b8 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -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 @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68db968..656c68e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/Cargo.toml b/Cargo.toml index 5121285..883e91f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,12 +16,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" @@ -64,7 +64,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" @@ -89,6 +89,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 = "git-branch-stash-cli" description = "Manage snapshots of your working directory" @@ -135,12 +144,5 @@ git2 = { version = ">=0.16, <=0.20", default-features = false, features = ["vend serde_json = "1.0.116" itertools = "0.14.0" -[profile.dev] -panic = "abort" - -[profile.release] -panic = "abort" -codegen-units = 1 - [lints] workspace = true diff --git a/crates/git-branch-stash/Cargo.toml b/crates/git-branch-stash/Cargo.toml index c629e6b..39094a4 100644 --- a/crates/git-branch-stash/Cargo.toml +++ b/crates/git-branch-stash/Cargo.toml @@ -2,11 +2,10 @@ name = "git-branch-stash" description = "Manage snapshots of your working directory" version = "0.10.1" -documentation = "https://github.com/gitext-rs/git-branch-stash.git" categories = ["command-line-interface", "development-tools"] keywords = ["git", "cli"] -license.workspace = true repository.workspace = true +license.workspace = true edition.workspace = true rust-version.workspace = true include.workspace = true diff --git a/crates/git-branch-stash/src/lib.rs b/crates/git-branch-stash/src/lib.rs index a816872..53ce91e 100644 --- a/crates/git-branch-stash/src/lib.rs +++ b/crates/git-branch-stash/src/lib.rs @@ -4,9 +4,10 @@ pub mod config; -pub use git::*; -pub use snapshot::*; -pub use stack::*; +pub use git::GitRepo; +pub use snapshot::Branch; +pub use snapshot::Snapshot; +pub use stack::Stack; mod git; mod snapshot; diff --git a/deny.toml b/deny.toml index ee5ae89..2982ba3 100644 --- a/deny.toml +++ b/deny.toml @@ -94,6 +94,7 @@ allow = [ "CC0-1.0", "ISC", "OpenSSL", + "Zlib", ] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the