mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-23 15:24:35 +00:00
Move CI-only check-format script to .github/
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
clang-format --version
|
||||
|
||||
find . -type f -iname '*.[ch]pp' -exec clang-format -i {} +
|
||||
|
||||
if ! git diff-index --quiet HEAD --; then
|
||||
echo 'Unformatted files:'
|
||||
git diff-index --name-only HEAD --
|
||||
echo
|
||||
git diff HEAD --
|
||||
exit 1
|
||||
fi
|
||||
@@ -8,7 +8,7 @@ env:
|
||||
CLICOLOR_FORCE: 1
|
||||
|
||||
jobs:
|
||||
checkformat:
|
||||
check-format:
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
@@ -18,4 +18,4 @@ jobs:
|
||||
sudo apt install -Uyq clang-format
|
||||
- name: Check format
|
||||
run: |
|
||||
contrib/checkformat.sh
|
||||
.github/scripts/check-format.sh
|
||||
Reference in New Issue
Block a user