Skip to content

Commit c0490f7

Browse files
authored
Update google-java-format (#2570)
Also converted regex strings in the Python script to raw strings as future Python versions will start to reject them. See: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
1 parent a22a385 commit c0490f7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

3.44 MB
Binary file not shown.

java-format/google-java-format-diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def main():
6363
lines_by_file = {}
6464

6565
for line in sys.stdin:
66-
match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
66+
match = re.search(r"^\+\+\+\ (.*?/){%s}(\S*)" % args.p, line)
6767
if match:
6868
filename = match.group(2)
6969
if filename is None:
@@ -76,7 +76,7 @@ def main():
7676
if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
7777
continue
7878

79-
match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
79+
match = re.search(r"^@@.*\+(\d+)(,(\d+))?", line)
8080
if match:
8181
start_line = int(match.group(1))
8282
line_count = 1

java-format/google-java-format-git-diff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ where:
4040
show show the effect of the formatting as unified diff"
4141

4242
SCRIPT_DIR="$(realpath $(dirname $0))"
43-
JAR_NAME="google-java-format-1.19.2-all-deps.jar"
43+
JAR_NAME="google-java-format-1.23.0-all-deps.jar"
4444

4545
# Make sure we have a valid python interpreter.
4646
if [ -z "$PYTHON" ]; then

0 commit comments

Comments
 (0)