-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21a137a
commit 57c790a
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Script taken from here: https://github.com/citra-emu/citra | ||
# and is distributed under the same license as the original script | ||
|
||
# Default clang-format points to default 3.5 version one | ||
CLANG_FORMAT=clang-format | ||
$CLANG_FORMAT --version | ||
|
||
cd $SMING_HOME/.. | ||
|
||
# Get list of modified files | ||
files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE | grep '^[^.]*[.]\(c\|cpp\|h\)$' | grep -e Sming/SmingCore -e samples || true)" | ||
|
||
for f in $files_to_lint; do | ||
|
||
d=$(diff -u "$f" <($CLANG_FORMAT "$f") || true) | ||
if ! [ -z "$d" ]; then | ||
echo "!!! $f not compliant to coding style, here is the fix:" | ||
echo "$d" | ||
fail=1 | ||
fi | ||
done | ||
|
||
if [ "$fail" = 1 ]; then | ||
exit 1 | ||
fi |