mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-28 22:20:13 +00:00
Run format-text on keyboard PRs (#19656)
This commit is contained in:
parent
713003b7fd
commit
603c86b6a2
11
.github/workflows/lint.yml
vendored
11
.github/workflows/lint.yml
vendored
@ -39,6 +39,7 @@ jobs:
|
|||||||
QMK_KEYBOARDS=$(qmk list-keyboards)
|
QMK_KEYBOARDS=$(qmk list-keyboards)
|
||||||
|
|
||||||
exit_code=0
|
exit_code=0
|
||||||
|
|
||||||
for KB in $QMK_KEYBOARDS; do
|
for KB in $QMK_KEYBOARDS; do
|
||||||
KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)')
|
KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)')
|
||||||
if [[ -z "$KEYBOARD_CHANGES" ]]; then
|
if [[ -z "$KEYBOARD_CHANGES" ]]; then
|
||||||
@ -54,6 +55,16 @@ jobs:
|
|||||||
exit_code=$(($exit_code + $?))
|
exit_code=$(($exit_code + $?))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
qmk format-text ${{ steps.file_changes.outputs.all_changed_files}} || true
|
||||||
|
for file in ${{ steps.file_changes.outputs.all_changed_files}}; do
|
||||||
|
if ! git diff --quiet $file; then
|
||||||
|
echo "File '${file}' Requires Formatting"
|
||||||
|
echo "::error file=${file}::Requires Formatting"
|
||||||
|
exit_code=$(($exit_code + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [[ $exit_code -gt 255 ]]; then
|
if [[ $exit_code -gt 255 ]]; then
|
||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user