Skip to content

Commit

Permalink
.ci/check-style: exclude rust from C style checks
Browse files Browse the repository at this point in the history
Some Rust vendored deps can contain C code. We don't need to lint
these.

The drivers filter is removed because it does not exist anymore.
  • Loading branch information
benma committed Jun 20, 2023
1 parent fbd1dd8 commit e70fbcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .ci/check-style
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ if test -t 1; then
fi
fi

if git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} | grep -v -E "(^src/(drivers|ui/fonts)|.*ugui.*|.*base32.*)" | grep -E "^(src|test)" | grep -E "\.(c|h)\$" | xargs -n1 "$CLANGFORMAT" -output-replacements-xml | grep -c "<replacement " >/dev/null; then
if git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} | grep -v -E "(^src/(rust|ui/fonts)|.*ugui.*|.*base32.*)" | grep -E "^(src|test)" | grep -E "\.(c|h)\$" | xargs -n1 "$CLANGFORMAT" -output-replacements-xml | grep -c "<replacement " >/dev/null; then
echo -e "${red}Not $CLANGFORMAT clean${normal}"
# Apply CF to the files
git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} | grep -v -E "(^src/(drivers|ui/fonts)|.*ugui.*|.*base32.*)" | grep -E "^(src|test)" | grep -E "\.(c|h)\$" | xargs -n1 "$CLANGFORMAT" -i
git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} | grep -v -E "(^src/(rust|ui/fonts)|.*ugui.*|.*base32.*)" | grep -E "^(src|test)" | grep -E "\.(c|h)\$" | xargs -n1 "$CLANGFORMAT" -i
# Print list of files that weren't formatted correctly
echo -e "Incorrectly formatted files:"
git --no-pager diff --name-only
Expand Down

0 comments on commit e70fbcc

Please sign in to comment.