Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce output from scalafmt, and lower reflective access option threshold for Google Java Format. #14109

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/scala/lint/scalafmt/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down