ci: add clippy job and crate-level lint attributes - #75
Merged
arisu6804 merged 2 commits intoJul 22, 2026
Conversation
- Add a dedicated clippy CI job that runs cargo clippy --all-targets with -D warnings on every push and pull request to main. - Split the existing single fmt job into three parallel jobs: fmt, clippy, and test — each with explicit toolchain components. - Add #![deny(clippy::all)] and #![warn(clippy::pedantic)] to lib.rs. - Allow known-safe casts (cast_possible_truncation, cast_possible_wrap, cast_precision_loss, cast_sign_loss) and module_name_repetitions. - Document the three CI checks in README.md under a new ## CI section. Closes StreamPay-Organization#56
Two test functions were missing their closing : - test_create_stream_zero_start_rejects_end_before_now (line 888) - test_supply_recovers_after_full_withdraw_allowing_new_stream (line 1068) This caused to fail with 'unclosed delimiter', which in turn blocked the clippy and test CI jobs from running.
Contributor
|
Merged — thanks @ifygreg01-best! CI is green on this repo now. 🚀 |
arisu6804
added a commit
that referenced
this pull request
Jul 22, 2026
…y job passes PR #75 added a clippy CI job plus #![warn(clippy::pedantic)]. Under -D warnings the pedantic lints (must_use_candidate, doc_markdown, ...) fail the build across code not written for them. Kept the meaningful deny(clippy::all) and removed the pedantic warn so CI is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #56
Adds a dedicated Clippy CI job so every push and pull request to
mainis linted automatically, and enforces the same rules at the crate level so localcargo clippyis always consistent with CI.Changes
.github/workflows/ci.ymlfmtjob into three parallel jobs:fmt,clippy, andtest.clippyjob runscargo clippy --all-targets -- -D warnings.src/lib.rs#![deny(clippy::all)]— hard error on all standard lints.#![warn(clippy::pedantic)]— surfaces pedantic lints as warnings.#![allow(...)]for known-safe patterns identified by code review:cast_possible_truncation,cast_possible_wrap,cast_precision_loss,cast_sign_loss— u64→i128/u128/u32 casts in vesting math and ID counters are bounded by construction.module_name_repetitions—error::Error,types::Stream, etc. are intentional.README.md## CIsection documenting the three checks and themake lintshortcut.Testing
The new
clippyCI job will run automatically on this PR. Local verification requirescargo clippy --all-targets -- -D warnings.