From e016ca372fce2984c95438ecd3b18ea73df4151f Mon Sep 17 00:00:00 2001 From: shayyz-code Date: Wed, 29 Jul 2026 02:17:10 +0630 Subject: [PATCH 1/2] ci: enforce strict Clippy checks --- .github/workflows/pull-request.yml | 2 ++ TODO.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e308a07..5cdf28f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -56,5 +56,7 @@ jobs: run: cargo fmt --all -- --check - name: Check compilation run: cargo check --all-targets + - name: Run Clippy + run: cargo clippy --all-targets --all-features -- -D warnings - name: Run tests run: cargo test diff --git a/TODO.md b/TODO.md index 685c3a7..d6b91c3 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,7 @@ Snapshot: 2026-07-28. - `cargo fmt --all -- --check` passes and is enforced for pull requests. - `cargo check --all-targets` passes. - `cargo test` passes and is enforced for pull requests, including all 48 integration specifications and the library doctest. -- `cargo clippy --all-targets --all-features -- -D warnings` passes locally. +- `cargo clippy --all-targets --all-features -- -D warnings` passes and is enforced for pull requests. - The crate exposes checked file/source execution APIs and typed I/O, parse, and runtime error categories. - Lexer, parser, interpreter, type-inference, examples, mdBook documentation, and cargo-dist release assets exist. @@ -73,7 +73,7 @@ Snapshot: 2026-07-28. - [x] Fix the library doctest against the v0.1 API, make `cargo test` green, and require it in CI. - [x] Resolve strict Clippy findings in the interpreter without lint suppressions or behavior changes. - [x] Resolve the remaining strict Clippy findings in the lexer, parser, type inference, and symbol table. -- [ ] Require `cargo clippy --all-targets --all-features -- -D warnings` in pull-request CI. +- [x] Require `cargo clippy --all-targets --all-features -- -D warnings` in pull-request CI. - [ ] Separate generated mdBook output from sources and define one reproducible documentation build command. - [ ] Reconcile README commands, branch names, CI claims, supported features, and examples with executable behavior. - [ ] Add focused lexer/parser error tests for malformed strings, comments, UTF-8 input, and unexpected EOF. From ff6361dd34a38b98c5179b787ec695c6caba71bf Mon Sep 17 00:00:00 2001 From: shayyz-code Date: Wed, 29 Jul 2026 02:18:55 +0630 Subject: [PATCH 2/2] fix(ci): support latest stable Clippy --- src/interpreter.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index a477144..f81f4a4 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -120,7 +120,7 @@ impl Value { (Value::Int(a), Value::Int(b)) => Value::Int(a + b), (Value::Float(a), Value::Float(b)) => Value::Float(a + b), (Value::String(a), Value::String(b)) => Value::String(a + &b), - (a, b) => panic!("Adding mismatched types {:?} and {:?}", &a, &b), + (a, b) => panic!("Adding mismatched types {:?} and {:?}", a, b), } } @@ -128,7 +128,7 @@ impl Value { match (self, other) { (Value::Int(a), Value::Int(b)) => Value::Int(a - b), (Value::Float(a), Value::Float(b)) => Value::Float(a - b), - (a, b) => panic!("Subtracting mismatched types {:?} and {:?}", &a, &b), + (a, b) => panic!("Subtracting mismatched types {:?} and {:?}", a, b), } } @@ -136,7 +136,7 @@ impl Value { match (self, other) { (Value::Int(a), Value::Int(b)) => Value::Int(a * b), (Value::Float(a), Value::Float(b)) => Value::Float(a * b), - (a, b) => panic!("Multiplying mismatched types {:?} and {:?}", &a, &b), + (a, b) => panic!("Multiplying mismatched types {:?} and {:?}", a, b), } } @@ -165,7 +165,7 @@ impl Value { (Value::Float(a), Value::Float(b)) => Value::Boolean(a < b), (a, b) => panic!( "Comparison operator < on mismatched types {:?} and {:?}", - &a, &b + a, b ), } } @@ -176,7 +176,7 @@ impl Value { (Value::Float(a), Value::Float(b)) => Value::Boolean(a > b), (a, b) => panic!( "Comparison operator > on mismatched types {:?} and {:?}", - &a, &b + a, b ), } } @@ -191,7 +191,7 @@ impl Value { (a, b) => panic!( "Comparison operator == on mismatched types {:?} and {:?}", - &a, &b + a, b ), } } @@ -204,7 +204,7 @@ impl Value { (Value::String(a), Value::String(b)) => Value::Boolean(a != b), (a, b) => panic!( "Comparison operator != on mismatched types {:?} and {:?}", - &a, &b + a, b ), } }