mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-11 06:44:18 +00:00
tools/unix/clang-format.sh to format all necessary files in the repo
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
fbe3f72fb1
commit
5063b511ae
18
tools/unix/clang-format.sh
Executable file
18
tools/unix/clang-format.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "Running clang-format on all repository files..."
|
||||
|
||||
XARGS_COMMAND='xargs -n1 -0 -P0 clang-format -i'
|
||||
|
||||
# Android
|
||||
find android/{app,sdk}/src -type f -name '*.java' -print0 | $XARGS_COMMAND
|
||||
find android/sdk/src/main/cpp -type f -name '*.[hc]pp' -print0 | $XARGS_COMMAND
|
||||
|
||||
# iOS
|
||||
find iphone -type f -name '*.[hc]pp' -o -name '*.[hm]' -o -name '*.mm' -print0 | $XARGS_COMMAND
|
||||
|
||||
# Core/C++
|
||||
find dev_sandbox generator libs qt tools -type f -name '*.[hc]pp' -print0 | $XARGS_COMMAND
|
||||
|
||||
git diff --exit-code
|
||||
Reference in New Issue
Block a user