Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: lint

on:
pull_request:
push:
branches: [main]

jobs:
clippy:
name: clippy (rust)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Cache cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: lint-clippy-${{ hashFiles('**/Cargo.lock') }}

# Allow-list explained:
# - op_ref / needless_borrow / manual_range_contains / too_many_arguments:
# stylistic lints that fire in audited code byte-identical with
# lazorkit-protocol. Touching them changes audited bytes and
# triggers an unnecessary delta audit on cosmetic refactors.
# - unused_mut: same — appears in a test closure in state/action.rs.
# When the audit baseline rolls over, revisit and tighten this list.
- name: cargo clippy (devnet features)
run: |
cargo clippy --features devnet --all-targets -- \
-D warnings \
-A clippy::op_ref \
-A clippy::needless_borrow \
-A clippy::manual_range_contains \
-A clippy::too_many_arguments \
-A unused_mut

# tsc on tests-sdk is intentionally NOT included here.
#
# tests-sdk depends on `@lazorkit/sdk-legacy` via a `file:` link to the
# sibling lazorkit-protocol checkout, which doesn't exist in CI. Wiring
# this up cleanly requires switching to the npm-published version
# (^0.3.1+) once it lands, then restoring the tsc job.
#
# Type errors are still caught locally via `npx tsc --noEmit` from
# tests-sdk against the file: linked SDK.

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +10 to +55
Loading