mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
4ea15ed85a
The logic can be slightly simplified, and the script doesn't require Bash after all.
16 lines
276 B
Bash
Executable File
16 lines
276 B
Bash
Executable File
#!/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
|