diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f493b6..95a6d15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,3 +161,16 @@ jobs: components: rustfmt - name: Check formatting run: cargo fmt --all --check + + clippy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - name: Lint code with Clippy + run: cargo clippy -- -D warnings diff --git a/build.rs b/build.rs index 5ec0caf..56fddaf 100644 --- a/build.rs +++ b/build.rs @@ -26,7 +26,7 @@ fn generate_man() -> std::io::Result<()> { } fn generate_markdown() -> std::io::Result<()> { - let md = clap_markdown::help_markdown::(); + let md = clap_markdown::help_markdown::(); let mut f = fs::File::create("doc/CommandLineHelp.md")?; write!(f, "{md}")?; Ok(()) diff --git a/src/util.rs b/src/util.rs index fd7542b..30fc7be 100644 --- a/src/util.rs +++ b/src/util.rs @@ -28,7 +28,7 @@ pub fn stdin_or_file(path: &Path) -> Result>> { } pub fn is_yage_encoded(s: &str) -> bool { - s.starts_with("yage[") && s.ends_with("]") + s.starts_with("yage[") && s.ends_with(']') } pub fn decrypt_yaml(value: &sy::Value, identities: &[x25519::Identity]) -> Result {