mirror of
https://github.com/touchHLE/touchHLE.git
synced 2026-01-31 01:25:24 +01:00
19 lines
451 B
Bash
Executable File
19 lines
451 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [[ "$1" = "--check" ]]; then
|
|
RUSTFMT_EXTRA='--check'
|
|
# "-Werror" ensures that warnings result in a non-zero exit status.
|
|
CLANG_FORMAT_EXTRA='--dry-run -Werror'
|
|
else
|
|
RUSTFMT_EXTRA=''
|
|
CLANG_FORMAT_EXTRA=''
|
|
fi
|
|
|
|
set -eux
|
|
|
|
cargo fmt $RUSTFMT_EXTRA
|
|
clang-format $CLANG_FORMAT_EXTRA -i \
|
|
`find src tests/TestApp_source \
|
|
-name '*.cpp' -or -name '*.hpp' \
|
|
-or -name '*.c' -or -name '*.h' -or -name '*.m'`
|