diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4151a9c..64ffd63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,3 +55,29 @@ jobs: - name: Run tests run: cargo test --verbose + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index 3ad6f6c..bc784c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -359,7 +359,7 @@ dependencies = [ [[package]] name = "fastcommit" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 72af0c3..404999a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastcommit" -version = "0.6.0" +version = "0.7.0" description = "AI-based command line tool to quickly generate standardized commit messages." edition = "2021" authors = ["longjin "] diff --git a/README.md b/README.md index cb72ecf..5df65a0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can install `fastcommit` using the following method: ```bash # Install using cargo -cargo install --git https://github.com/fslongjin/fastcommit --tag v0.6.0 +cargo install --git https://github.com/fslongjin/fastcommit --tag v0.7.0 ``` diff --git a/README_CN.md b/README_CN.md index cbf1a72..a184aca 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,7 +8,7 @@ ```bash # 使用 cargo 安装 -cargo install --git https://github.com/fslongjin/fastcommit --tag v0.6.0 +cargo install --git https://github.com/fslongjin/fastcommit --tag v0.7.0 ``` ## 使用 diff --git a/src/text_wrapper/text_wrapper.rs b/src/text_wrapper/text_wrapper.rs index a4d13d7..22baba4 100644 --- a/src/text_wrapper/text_wrapper.rs +++ b/src/text_wrapper/text_wrapper.rs @@ -57,6 +57,7 @@ impl WordWrapper for WordBoundaryWrapper { } // 字符包装器 +#[allow(dead_code)] pub struct CharacterWrapper; impl WordWrapper for CharacterWrapper {