forked from openequella/openEQUELLA-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: setup pre commit hook to check java format
* updates gradle wrapper to latest version to enable ghooks to be used. * enables ghooks plugin for gradle * adds google java format pre commit hook * adds test check file output to gitignore resolves openequella#25
- Loading branch information
1 parent
5962179
commit 811b162
Showing
5 changed files
with
15 additions
and
2 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,11 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify proper formatting. | ||
|
||
files=$(git diff --cached --name-only --diff-filter=ACM | paste -s -d",") | ||
# this only works if ignoreFailures is set to false (which it is by default) | ||
./gradlew verifyGJF -DverifyGoogleJavaFormat.include="$files" &>/dev/null && exit 0 | ||
|
||
echo "Some files are not formatted properly. Please run:" | ||
echo "./gradlew gJF -DgoogleJavaFormat.include=\"$files\"" | ||
exit 1 |
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ test*.properties | |
test*.xml | ||
*.log | ||
!src/test/**/*.log | ||
test-check-files-output/ |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jul 12 11:19:13 CDT 2019 | ||
#Tue Jun 09 16:59:18 MST 2020 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip |