[ https://issues.apache.org/jira/browse/SPARK-40797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-40797: ------------------------------------ Assignee: Apache Spark > 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: Apache Spark > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org