+1 Thanks @zhouyifan279 for the work.
As I commented in the PR, my view is that a consistent style makes more sense to me than a style that just looks good. Thanks, Cheng Pan On Thu, Nov 18, 2021 at 8:08 PM 周一帆 <[email protected]> wrote: > > Hello Apache Kyuubi community, > > We'd like to have you vote on the proposal of using scalafmt code > style as the new code style checking rule. > > The VOTE will remain open for at least 72 hours. > > [] +1 Use scalafmt and refuse to merge PR if it voilates code style > [] 0 Either is OK > [] -1 Keep using current code style checking rule > > ##################################################################### > Here is some background knowledge about this proposal. > > Motivation > There are 2 reasons we want to use scalafmt: > 1. Automatically sort imported packages > Currently, there is no easy way for Kyuubi contributors to > automatically sort imported packages in source code. > IntelliJ IDEA‘s format result does not satisfy current checking rule. > 2. Control code style more preciselly by using maven plugin "spotless". > Spotless is already introduced to check and format java code in Kyuubi. > Working with scalafmt, it can also be used for scala code. > > Changes > After using scalafmt to format local branch, we found changes need > to notice. > The changes in code style can be found on this GitHub PR: > https://github.com/apache/incubator-kyuubi/issues/1383 > > We have not yet found any configurations to customize the behavior > about those changes. That means if we choose to use scalafmt, we will > have a much more strict code style. > > So we'd like to ask Kyuubi community to make the descison. > > ##################################################################### > Related Issue: > https://github.com/apache/incubator-kyuubi/issues/1383 > > Related PR: > https://github.com/apache/incubator-kyuubi/pull/1391 > > To learn more about scalafmt: > https://scalameta.org/scalafmt/ > > To learn more about spotless: > https://github.com/diffplug/spotless
