Skip to content

Commit

Permalink
ci/check-style: check all files every time
Browse files Browse the repository at this point in the history
Lazy checks on only files in the diff have a habit of causing CI
failures on unrelated PRs. Performance-wise there is no noticable
slowdown.
  • Loading branch information
benma committed Dec 29, 2024
1 parent 3aba7b3 commit f1e03fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .ci/check-style
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ if git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} HEAD | grep
exit 1
fi

RUST_SOURCES=$(git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} HEAD | grep -E "^src/rust.*\.rs\$" | grep -v -E "^src/rust/vendor" | grep -v "^src/rust/bitbox02-rust/src/shiftcrypto\.bitbox02\.rs$" || true)
RUST_SOURCES=$(git ls-files | grep "^src/rust.*\.rs\$" | grep -v "^src/rust/vendor" | grep -v "^src/rust/bitbox02-rust/src/shiftcrypto\.bitbox02\.rs$" || true)
if [ -n "$RUST_SOURCES" ] ; then
echo $RUST_SOURCES
"$RUSTFMT" --check $RUST_SOURCES
fi

0 comments on commit f1e03fd

Please sign in to comment.