wangyum commented on a change in pull request #24065: [SPARK-27130][BUILD]
Automatically select profile when executing sbt-checkstyle
URL: https://github.com/apache/spark/pull/24065#discussion_r264631027
##########
File path: dev/run-tests.py
##########
@@ -180,9 +180,9 @@ def run_scala_style_checks():
run_cmd([os.path.join(SPARK_HOME, "dev", "lint-scala")])
-def run_java_style_checks():
+def run_java_style_checks(build_profiles):
Review comment:
How about?:
```python
def run_java_style_checks(build_profiles):
set_title_and_block("Running Java style checks", "BLOCK_JAVA_STYLE")
# The same profiles used for building are used to run Checkstyle by SBT
as well because
# the previous build looks reused for Checkstyle and affecting
Checkstyle. See SPARK-27130.
profiles = " ".join(build_profiles)
print("[info] Checking Java style using SBT with these profiles: ",
profiles)
run_cmd([os.path.join(SPARK_HOME, "dev", "sbt-checkstyle"), profiles])
```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]