File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 15
15
# build from the root of this repo:
16
16
FROM gcr.io/cloud-devrel-public-resources/java8
17
17
18
+ # The OwlBot Java postprocessor does not rely on project's Java formatter.
19
+ # When you upgrade the formatter version, see the issue below for the required
20
+ # changes:
21
+ # https://github.com/googleapis/synthtool/issues/1502
18
22
ARG JAVA_FORMAT_VERSION=1.7
19
23
20
24
RUN apt-get install -y --no-install-recommends jq
Original file line number Diff line number Diff line change 15
15
16
16
set -e
17
17
18
+ # Why OwlBot Java postprocessor does not use the formatter defined in pom.xml?
19
+ # It's because the postprocessor runs in a privileged (albeit limited)
20
+ # environment. We limit the risk of running somebody else's malicious Maven
21
+ # plugin code in the environment.
22
+
18
23
# Find all the java files relative to the current directory and format them
19
24
# using google-java-format
20
25
list=" $( find . -name ' *.java' -not -path " .*/samples/snippets/generated/**/*" ) "
33
38
fi
34
39
done
35
40
41
+ # This JAR file is downloaded by Dockerfile
36
42
cat $tmpfile | xargs java -jar /owlbot/google-java-format.jar --replace
37
43
38
44
rm $tmpfile
You can’t perform that action at this time.
0 commit comments