Hi, Chris In fact, from my perspective, I believe it is valuable for every developer to consciously pay attention to code style issues. Introducing code with an ugly style, or introducing many irrelevant code format changes in a few hundred or thousands of lines of code, is even more of a disaster.
I do not have any automatic scripts set up locally, and I will try to manually apply the code style rules before pushing to the remote repository (which takes about 20 seconds on my local machine). If I forget and it causes the CI to fail, then the failed CI serves as a reminder for me to pay attention to code style and other issues when pushing code to the remote. These occasional CI failures can continuously remind me to take this matter seriously, otherwise, I might gradually neglect it. BTW, I found a lot of apache projects are using spotless, such as Flink[1] and HBase[2]. [1] https://github.com/apache/flink/blob/master/pom.xml#L185 [2] https://github.com/apache/hbase/blob/master/pom.xml#L915 Best ------------- Xinyu Tan On 2024/08/21 06:29:09 Christofer Dutz wrote: > At apache every line of coffee needs to be traced back to a committer > (ideally one we have an icla on file) so as far as I know only on very few > Jenkins boxes are committed possible in some edge cases (such as staging a > generated website) > > I do think I see your argument. I'm one of the people who run the maven build > before committing. If someone doesn't, I see that could be a problem. However > we could simply run "mvn spottless:check" on any ci before sound the real > build. > > Chris > > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg> > ________________________________ > From: liyuheng <liyuheng55...@126.com> > Sent: Wednesday, August 21, 2024 5:20:12 AM > To: dev@iotdb.apache.org <dev@iotdb.apache.org> > Subject: Re: [DISCUSS] How about running spotless:apply instead of > spotless:check in the build? > > Why CI shouldn’t be allowed to commit changes to the codebase? > > And are you suggesting to change pom.xml from “<goal>check</goal>” to > “<goal>apply</goal>”? This will allow code that does not conform to the > spotless format to be submitted. > > Li Yuheng > > > 2024年8月19日 22:46,Christofer Dutz <christofer.d...@c-ware.de> 写道: > > > > Running that on the master branch in the CI wouldn’t be helpful, as the CI > > shouldn’t be allowed to commit changes to the codebase. > > That’s why I’m suggesting calling the “apply” instead of the “check” goal > > in our build. > > > > Chris > > > > Von: liyuheng <liyuheng55...@126.com> > > Datum: Montag, 19. August 2024 um 15:02 > > An: dev@iotdb.apache.org <dev@iotdb.apache.org> > > Betreff: Re: [DISCUSS] How about running spotless:apply instead of > > spotless:check in the build? > > Hi, Chris > > > > Auto spotless is a great idea. For my opinion, we can do auto spotless in > > master branch one time every day, and remove other spotless check. > > > > And +1 for spotless is still necessary. > >