Skip to content

Commit f51a292

Browse files
authored
fully lint only explicitly to avoid unnecessary rebuilds (#6753)
* fully lint only explicitly to avoid unnecessary rebuilds
1 parent 7e0cdde commit f51a292

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/test-suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ jobs:
350350
- name: Check formatting with cargo fmt
351351
run: make cargo-fmt
352352
- name: Lint code for quality and style with Clippy
353-
run: make lint
353+
run: make lint-full
354354
- name: Certify Cargo.lock freshness
355355
run: git diff --exit-code Cargo.lock
356356
- name: Typecheck benchmark code without running it

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ test-full: cargo-fmt test-release test-debug test-ef test-exec-engine
204204
# Lints the code for bad style and potentially unsafe arithmetic using Clippy.
205205
# Clippy lints are opt-in per-crate for now. By default, everything is allowed except for performance and correctness lints.
206206
lint:
207-
RUSTFLAGS="-C debug-assertions=no $(RUSTFLAGS)" cargo clippy --workspace --benches --tests $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
207+
cargo clippy --workspace --benches --tests $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
208208
-D clippy::fn_to_numeric_cast_any \
209209
-D clippy::manual_let_else \
210210
-D clippy::large_stack_frames \
@@ -220,6 +220,10 @@ lint:
220220
lint-fix:
221221
EXTRA_CLIPPY_OPTS="--fix --allow-staged --allow-dirty" $(MAKE) lint
222222

223+
# Also run the lints on the optimized-only tests
224+
lint-full:
225+
RUSTFLAGS="-C debug-assertions=no $(RUSTFLAGS)" $(MAKE) lint
226+
223227
# Runs the makefile in the `ef_tests` repo.
224228
#
225229
# May download and extract an archive of test vectors from the ethereum

0 commit comments

Comments
 (0)