File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,22 @@ set -e
17
17
18
18
# Find all the java files relative to the current directory and format them
19
19
# using google-java-format
20
- find . -name ' *.java' | xargs java -jar /owlbot/google-java-format.jar --replace
20
+ list=" $( find . -name ' *.java' ) "
21
+ tmpfile=$( mktemp)
22
+
23
+ for file in $list ;
24
+ do
25
+ if [[ " $file " =~ " .*/samples/snippets/src/main/java/com/example/firestore/Quickstart.java" ]];
26
+ then
27
+ echo " File skipped formatting: $file "
28
+ elif [[ " $file " =~ " .*/samples/snippets/src/main/java/com/example/spanner/.*.java" ]];
29
+ then
30
+ echo " File skipped formatting: $file "
31
+ else
32
+ echo $file >> $tmpfile
33
+ fi
34
+ done
35
+
36
+ cat $tmpfile | xargs java -jar /owlbot/google-java-format.jar --replace
37
+
38
+ rm $tmpfile
You can’t perform that action at this time.
0 commit comments