I am fine with fixing the import order. the patch is still huge, but it is doable
I will review the patch and give my feedback thanks Enrico Il giorno ven 29 lug 2022 alle ore 05:48 ZhangJian He <shoot...@gmail.com> ha scritto: > > https://github.com/apache/bookkeeper/pull/3311 is ready for review. > > Thanks > ZhangJian He > > On Sun, 5 Jun 2022 at 16:43, ZhangJian He <shoot...@gmail.com> wrote: > > > Hi community, I want to open a discussion about importOrder in bookkeeper. > > > > Currently, we use puppycrawl checkstyle 6.19, which is not strictly verify > > the import order. > > In the recently checkstyle version, it needs a strictly ImportOrder verify > > if configs[1]. > > In simple terms, our config ImportOrder is `static import, SPACE LINE, > > import` > > > > We have 2100+ files specify former order. There are 300+ files need to add > > or remove SPACE_LINE to specify this order. > > We have two options > > 1. Remove the ImportOrder config > > 2. modify 300+files to specify this ImportOrder > > > > I prefer the second options for these two reasons. > > 1. ImportOrder makes a better cooperation in community. > > 2. These 300+ files only changes spaceline. It's not a big change(I > > think), but looks scary(changed many files) > > > > ## reference > > 1. ImportOrder checkstyle config for now > > ``` > > <module name="ImportOrder"> > > <property name="severity" value="error"/> > > <!-- This ensures that static imports go first. --> > > <property name="option" value="top"/> > > <property name="separated" value="true"/> > > <property name="sortStaticImportsAlphabetically" value="true"/> > > <property name="tokens" value="STATIC_IMPORT, IMPORT"/> > > <message key="import.ordering" > > value="Import {0} appears after other imports that it should > > precede"/> > > </module> > > ``` > >