Skip to content

Commit

Permalink
feat(ci): add linting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dj95 committed Mar 1, 2024
1 parent 3ae6231 commit 465048c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on: push
name: Clippy check

# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: '1.76.0'
profile: minimal
override: true
target: wasm32-wasi

- name: Install Clippy
run: rustup component add clippy

- name: Run Clippy
run: cargo clippy --all-targets --all-features
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test:
cargo component test -- --nocapture

lint:
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --all-features
cargo audit

release version:
Expand Down
1 change: 1 addition & 0 deletions src/widgets/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ fn run_command_if_needed(command_config: CommandConfig, name: &str, state: &Zell
ts.format(TIMESTAMP_FORMAT).to_string(),
);

#[allow(unused_variables)]
let command = commandline_parser(&command_config.command);
#[cfg(not(feature = "bench"))]
run_command(
Expand Down

0 comments on commit 465048c

Please sign in to comment.