From 0c37e8596946f3e542d761625da825ab3beffca4 Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Fri, 7 Jan 2022 09:29:49 -0800 Subject: [PATCH] Reduce output from `scalafmt`, and lower reflective access option threshold for Google Java Format. # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels] --- .../pants/backend/java/lint/google_java_format/rules.py | 8 ++++---- src/python/pants/backend/scala/lint/scalafmt/rules.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/python/pants/backend/java/lint/google_java_format/rules.py b/src/python/pants/backend/java/lint/google_java_format/rules.py index 2c201f30ea1..63a873d91fc 100644 --- a/src/python/pants/backend/java/lint/google_java_format/rules.py +++ b/src/python/pants/backend/java/lint/google_java_format/rules.py @@ -87,9 +87,9 @@ async def setup_google_java_format( toolcp_relpath: tool_classpath.digest, } - maybe_java16_or_higher_options = [] - if jdk_setup.jre_major_version >= 16: - maybe_java16_or_higher_options = [ + maybe_java11_or_higher_options = [] + if jdk_setup.jre_major_version >= 11: + maybe_java11_or_higher_options = [ "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", @@ -99,7 +99,7 @@ async def setup_google_java_format( args = [ *jdk_setup.args(bash, tool_classpath.classpath_entries(toolcp_relpath)), - *maybe_java16_or_higher_options, + *maybe_java11_or_higher_options, "com.google.googlejavaformat.java.Main", *(["--aosp"] if tool.aosp else []), "--dry-run" if setup_request.check_only else "--replace", diff --git a/src/python/pants/backend/scala/lint/scalafmt/rules.py b/src/python/pants/backend/scala/lint/scalafmt/rules.py index 52d7c1c478a..e387257f16f 100644 --- a/src/python/pants/backend/scala/lint/scalafmt/rules.py +++ b/src/python/pants/backend/scala/lint/scalafmt/rules.py @@ -170,6 +170,8 @@ async def setup_scalafmt_partition( ] if request.check_only: args.append("--list") + else: + args.append("--quiet") args.extend(request.files) process = Process(