Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .githooks/pre-commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ test*.properties
test*.xml
*.log
!src/test/**/*.log
test-check-files-output/
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'com.gtramontina.ghooks.gradle' version '1.1.0'
}

apply plugin: 'eclipse'
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
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