mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02:00
* Fix problems with the format tasks The format check is using python2, and if "python" doesn't exist on the path (or isn't python 2, or there is any other error in the python code or in the shell script...) the format check just succeeds. This change: - Refactors out the gradle code that finds a python3 executable and use it to get the python executable to be used for the format check. - Upgrades google-java-format-diff.py to python3 and removes #! line. - Fixes shell script to ensure that failures are propagated. - Suppresses error output when checking for python commands. Tested: - verified that python errors cause the build to fail - verified that introducing a bad format diff causes check to fail - verified that javaIncrementalFormatDryRun shows the diffs that would be introduced. - verified that javaIncrementalFormatApply reformats a file. - verified that well formatted code passes the format check. - verified that an invalid or missing PYTHON env var causes google-java-format-git-diff.sh to fail with the appropriate error. * Fix presubmit issues Omit the format presubmit when not in a git repo and remove unused "string" import. |
||
---|---|---|
.. | ||
google-java-format-1.8-all-deps.jar | ||
google-java-format-diff.py | ||
google-java-format-git-diff.sh |