You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2022/10/14 08:54:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
Hyukjin Kwon resolved SPARK-40797.
----------------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
Issue resolved by pull request 38252
[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
> Assignee: Martin Grund
> Priority: Major
> Fix For: 3.4.0
>
>
> 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