You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/10/14 07:13:00 UTC
[jira] [Commented] (SPARK-40797) Force grouped import onto single line with Scalafmt
[ https://issues.apache.org/jira/browse/SPARK-40797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617525#comment-17617525 ]
Apache Spark commented on SPARK-40797:
--------------------------------------
User 'grundprinzip' has created a pull request for this issue:
https://github.com/apache/spark/pull/38252
> Force grouped import onto single line with Scalafmt
> ---------------------------------------------------
>
> Key: SPARK-40797
> URL: https://issues.apache.org/jira/browse/SPARK-40797
> Project: Spark
> Issue Type: Improvement
> Components: Build
> Affects Versions: 3.4.0
> Reporter: Martin Grund
> Priority: Major
>
> When using the scalafmt.conf file as provided by the project repository to organize and optimize imports there is a case in which un-desired behavior appears.
> If the import group does not fit on a single line, Scalafmt will by default try to bin-pack and then break out over mulitple lines.
> For example:
> import org.apache.spark.sql.catalyst.analysis.\{UnresolvedAlias, UnresolvedAttribute, UnresolvedFunction, UnresolvedRelation, UnresolvedStar}{{{}{}}}will become
> import org.apache.spark.sql.catalyst.analysis.\{
> UnresolvedAlias,
> UnresolvedAttributed,
> ...
> }{{{}{}}}In previous code reviews this has been marked as departing from the consistency of the Spark code base even when using the provided scalafmt.conf.
>
> Scalafmt allows to configure this by setting an option
>
> {code:java}
> importSelectors = "singleLine"{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org