+1 in general. I like the `apply` part. I tried to follow styles from files, but apparently I am not able to confirm that before every prs. My eyes may be sensitive to inconsistent style in intra-function or intra-codeblock. But beyond that, it totally depends on my memories which are somewhat and sometimes fragile.
I tasted the pr, and want to list some minor "issues"(actually facts): * Both spotless and palantir do not support java 8. Possible minimum java 11. I don't have java 9 and java 10 installed. * No maven integration to validate/verify lifecycles. * palantir[1] has only IntelliJ plugin, I found no other IDEs listed. Seems that spotless and its formatters are moving towards java 11 and above. It might be hard to pin spotless to java 8 or integrate to maven lifecycle without affecting the minimum jre version. Anyway, I am neutral to aboves. I suggest we add a section for developers in README to guide environment setup and check (e.g. minimum jdk version, code style apply and IDE setup or others). Also, there are jiras related to this. I think we could supersede them if this is going well. * CURATOR-237[2]: [Parent] Create code style files for other IDEs * CURATOR-238[3]: Create code style file for NetBeans Besides above, will this go to a VOTE ? We need a community consensus on this. [1]: https://github.com/palantir/palantir-java-format [2]: https://issues.apache.org/jira/browse/CURATOR-237 [3]: https://issues.apache.org/jira/browse/CURATOR-238 Best, Kezhu Wang On Thu, May 18, 2023 at 10:14 AM tison <[email protected]> wrote: > > Hi Curators, > > According to the development and reviewing experience, I notice that new > contributions use a different code style in braces and line breaks (somehow > Java style vs. C# style). Also, the use of white space is inconsistent and > can be violated. > > To prevent further conflicts in code style, I make a patch to use the > spotless plugin to auto-format and check codestyle[1]. > > Looking forward to your feedback on if we should go in this direction. > > Best, > tison. > > [1] https://github.com/apache/curator/pull/463
