-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Android]add check style config. * [Android]update check style config. * [Android]update codes with checked style.
- Loading branch information
Showing
154 changed files
with
7,853 additions
and
3,804 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git commit" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message if | ||
# it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-commit". | ||
|
||
if git rev-parse --verify HEAD >/dev/null 2>&1 | ||
then | ||
against=HEAD | ||
else | ||
# Initial commit: diff against an empty tree object | ||
against=$(git hash-object -t tree /dev/null) | ||
fi | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
SCRIPT_ABS_PATH=`cd "$SCRIPT_DIR"; pwd` | ||
|
||
|
||
ANDROID_DIFF_FILES=`git diff --cached --name-only --diff-filter=ACM -- '*' | grep 'Android'` | ||
if [[ "$ANDROID_DIFF_FILES" != "" ]] | ||
then | ||
cd Android/APIExample | ||
echo "precommit >> current paht = $(pwd), diff files = $ANDROID_DIFF_FILES" | ||
./gradlew -Dorg.gradle.project.commit_diff_files="$ANDROID_DIFF_FILES" checkstyle detekt | ||
if [ $? -eq 0 ]; then | ||
echo "precommit >> checkstyle detekt OK." | ||
else | ||
echo "precommit >> checkstyle detekt Failed." | ||
exit 1 | ||
fi | ||
else | ||
echo "precommit >> No changing android files." | ||
fi | ||
|
||
|
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
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
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
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
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
3 changes: 0 additions & 3 deletions
3
Android/APIExample/app/src/main/java/io/agora/api/example/annotation/Example.java
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
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
Oops, something went wrong.