Skip to content

Commit

Permalink
run clippy in the ci
Browse files Browse the repository at this point in the history
  • Loading branch information
glehmann committed Feb 3, 2024
1 parent a0f715a commit 799483a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn generate_man<C: clap::CommandFactory>() -> std::io::Result<()> {
}

fn generate_markdown<C: clap::CommandFactory>() -> std::io::Result<()> {
let md = clap_markdown::help_markdown::<Cli>();
let md = clap_markdown::help_markdown::<C>();
let mut f = fs::File::create("doc/CommandLineHelp.md")?;
write!(f, "{md}")?;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn stdin_or_file(path: &Path) -> Result<BufReader<Box<dyn Read>>> {
}

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<sy::Value> {
Expand Down

0 comments on commit 799483a

Please sign in to comment.