From 91c392e9f3dc7a1963cfd7328ca48a8b335cd364 Mon Sep 17 00:00:00 2001 From: Daniel Golding Date: Wed, 30 Apr 2025 08:56:18 +0200 Subject: [PATCH 1/2] ci: add lint workflow --- .github/workflows/test.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..18d9d5e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +name: Build and Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + codestyle: + name: Codestyle + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - run: cargo check + env: + RUSTFLAGS: '-D unused' + - run: cargo clippy -- -D clippy::all + - run: cargo fmt --check From 0961f5c2392dec3db0282283ca9d26112b637b01 Mon Sep 17 00:00:00 2001 From: Daniel Golding Date: Wed, 30 Apr 2025 09:13:53 +0200 Subject: [PATCH 2/2] chore: fix unused imports --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index de1bebc..998ca4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use anyhow::{Ok, Result}; use base64::prelude::*; -use clap::{ArgAction, Parser, Subcommand}; +use clap::{Parser, Subcommand}; use humantime::Duration; use pasetors::{ claims::Claims, @@ -9,7 +9,6 @@ use pasetors::{ version4::V4, }; use std::io::{self, Read}; -use std::str::FromStr; use thiserror::Error; #[derive(Error, Debug)]