Another solution is to use Spotless to modify the format of all the code, and 
then fix CheckStyle.xml, still using CheckStyle in DolphinScheduler. This does 
not require modifying the CI logic.

> 在 2022年7月15日,14:52,Chufeng Gao <[email protected]> 写道:
> 
> 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