The minimum spotless maven can do is:

remove unused import
correct import order
check license header

To use it is also easy after enabling it in maven pom:
mvn spotless:check // check the style
mvn spotless:apply // apply spotless fix

The difference though is the default setting of code style of spotless
differs from maven checkstyle (for example: import ordering is difference).
Spotless's style can be also configurable by a file so seems it's feasible
to match maven checkstyle.


-Rui

On Mon, Sep 16, 2019 at 3:10 PM Rui Wang <amaliu...@apache.org> wrote:

> Thanks. I will try to setup IDE then.
>
> I don't have a clear idea how to use spotless for maven. I could spend
> some time to explore it and if it's easy to setup, I will report it back to
> you.
>
>
> -Rui
>
> On Mon, Sep 16, 2019 at 12:51 PM Vladimir Sitnikov <
> sitnikov.vladi...@gmail.com> wrote:
>
>> Rui>Import order and length of a single line of code is too long were
>> what I
>> faced.
>>
>> I guess both of them could be configured in IDE.
>> Even though it might look boring/complicated, configuring import order in
>> IDE pays off quickly.
>>
>> Rui>In Apache Beam, we are using gradle and have adopted diffplug/spotless
>>
>> It looks like there's spotless-maven-plugin, so we might move certain
>> checkstyle rules to spotless even before we migrate to Gradle.
>> Do you have cycles to implement relevant Spotless configuration?
>>
>> Vladimir
>>
>

Reply via email to