File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 2525 lint-rust :
2626 name : Lint Rust
2727 runs-on : " ubuntu-latest"
28+ permissions :
29+ # # Allow this job to potentially cancel the running workflow (on failure)
30+ actions : write
2831 steps :
2932 - uses : actions/checkout@v3
3033
3639 rust-cache : true
3740
3841 - name : Run lints
39- run : |
40- BUILD_SPIN_EXAMPLES=0 make lint
41- git diff --name-status --exit-code . || (echo "Git working tree dirtied by lints. Run 'make update-cargo-locks' and check in changes" && exit 1)
42+ run : BUILD_SPIN_EXAMPLES=0 make lint
4243
4344 - name : Cancel everything if linting fails
4445 if : failure()
Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ lint: lint-rust-examples-and-testcases
6060.PHONY : lint-rust-examples-and-testcases
6161lint-rust-examples-and-testcases :
6262 for manifest_path in $$ (find examples tests/testcases -name Cargo.toml); do \
63- cargo clippy --manifest-path " $$ {manifest_path}" -- -D warnings \
63+ echo " Linting $$ {manifest_path}" \
64+ && cargo clippy --manifest-path " $$ {manifest_path}" -- -D warnings \
6465 && cargo fmt --manifest-path " $$ {manifest_path}" -- --check \
66+ && (git diff --name-status --exit-code . || (echo " Git working tree dirtied by lints. Run 'make update-cargo-locks' and check in changes" && false)) \
6567 || exit 1 ; \
6668 done
6769
You can’t perform that action at this time.
0 commit comments