Thanks Wenjun for the comment. I agree that we could fix the code style
incrementally instead of pushing a super big change and blowing up the CI.
Since I'm not familiar with DS CI, may I ask how much work we need to do in
the CI side if we pick up Spotless?

Thanks.

*Best Regards,*

*Chufeng (Eric) Gao*



Wenjun Ruan <[email protected]> 于2022年7月15日周五 16:03写道:

> +1.
>
> Since we have closed the checkstyle in CI in a long time, right now
> there is a lot of files breaking our checkstyle rule, but we have
> opened the checkstyle again, the code style will be fixed later.
>
> The problem with using checkstyle is that our checkstyle doesn't cover
> all code style, e.g. chained method call, method arguments alian... I
> am not sure if it can be improved by adding new checkstyle rules.
> In my knowledge, spotless can help to format the code in one command
> and doesn't need to rely on ide setting, this can help to make our
> code style really consistent.
>
> But I think if we use spotless, we still need to increment fix the
> code style, rather than fix it all in one PR.
>
> Thanks,
> Wenjun
>
> On Fri, Jul 15, 2022 at 2:53 PM Chufeng Gao <[email protected]> wrote:
> >
> > Hi developers,
> >
> > Currently, DS uses `Checkstyle` plugin for style and formatting checks.
> > However, there are tons of legacy formatting errors in the project
> popping
> > out every time we build the project. Thus, in practice, some developers
> > tend to use `-Dcheckstyle.skip` flag when building the project and this
> > make the `style check` a little bit awkward.
> >
> > Huge advantage of using `Spotless`[1][2] over `CheckStyle` is in addition
> > to check the formatting of the code it also has `apply` goal that fixes
> all
> > the style and formatting automatically. With `Spotless`, we could fix the
> > legacy formatting errors once for all and developers could fix new format
> > errors with a single line of command `mvn spotless:apply`.
> >
> > If you have any suggestions, you are very welcome to comment in this mail
> > thread or in issue #10963 [3]
> >
> > [1] https://github.com/diffplug/spotless
> > [2] https://github.com/diffplug/spotless/tree/main/plugin-maven
> > [3] https://github.com/apache/dolphinscheduler/issues/10963
> >
> > Thanks!
> >
> > Best Regards,
> >
> > Chufeng Gao
>

Reply via email to