File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1515# build from the root of this repo:
1616FROM gcr.io/cloud-devrel-public-resources/java8
1717
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
1822ARG JAVA_FORMAT_VERSION=1.7
1923
2024RUN apt-get install -y --no-install-recommends jq
Original file line number Diff line number Diff line change 1515
1616set -e
1717
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+
1823# Find all the java files relative to the current directory and format them
1924# using google-java-format
2025list=" $( find . -name ' *.java' -not -path " .*/samples/snippets/generated/**/*" ) "
3338 fi
3439done
3540
41+ # This JAR file is downloaded by Dockerfile
3642cat $tmpfile | xargs java -jar /owlbot/google-java-format.jar --replace
3743
3844rm $tmpfile
You can’t perform that action at this time.
0 commit comments