aljoscha opened a new pull request #14488: URL: https://github.com/apache/flink/pull/14488
Please see the ML discussion for background: https://lists.apache.org/thread.html/rfb079ec4cfd35bcb93df9c2163aaa121e392282f0f3d9710c8ade811%40%3Cdev.flink.apache.org%3E. There was broad consensus in the discussion. The basic idea is that we use the Spotless plugin to format our code with `google-java-format` and we use CI to enforce that style. A note on checkstyle: There are still a lot of checkstyle rules that make sense and that are not covered by Spotless, such as disallowed imports and Javadocs rules. Also, the checkstyle suppression files are still valid and checkstyle still largely fails in the few modules where we have them without them. You can remove the suppressions to get a sense of the scale of the problem. I can't fix those issues in this PR. Note: when I'll actually merge this PR I have to rebase on latest master and reformat the code again and fix up the "ignores" file again. ## Brief change log The changes are clearly outlined in the individual commits, please have a look at those. Rough outline of changes: - move inline `CHECKSTYLE:OFF` comments to supressions file because inline comments in the imports don't work with the version of `google-java-format` we're using (which we have to use because we're using an older java version for our build - remove checkstyle checks that don't make sense after reformatting the code; it's the check for "tabs as indentation" - add checkstyle suppressions for things that break with reformatting; this is only about file length, some files are getting to long - fix formatting that doesn't work nicely with Spotless + Checkstyle, this is mostly about superfluous or missing `<p>` tags - actually reformat the code - add the Spotless plugin, I'm adding this after reformatting to ensure that the build passes at each intermediate step - add `.git-blame-ignore-revs` for ignoring the reformatting commit - update `.editorconfig` and update IDE setup instructions I did the reformatting commit as `Rufus Refactor <d...@flink.apache.org>` and all the other commits as myself. ## Verifying this change You can play around with the formatter, try and change a file and run the checks. If you "break" a file the CI build should break. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org