mqliang edited a comment on pull request #6807: URL: https://github.com/apache/incubator-pinot/pull/6807#issuecomment-821578169
> A lot of changes are not in sync with the intellij format. I think most of the developpers are using intellij to format the code. Let's try to make the plug-in the same behavior as auto-formatting with intellij The level of difficulty is extremely high: * Intellj is not an open source project, the formatter it used is built-in, so there is no intelllj-formater maven plugin. Which means we can not use intellj-code-style.xml directly. * The inability to work out a set of eclipse formatting rules that are equivalent to what we use in IntelliJ basically prevents us from using the eclipse plugin (the one we use in this PR). * IntelliJ can import eclipse code styles, but translation is not accurate enough, and the opposite direction is not supported. Imtellj can not export formatting rules as eclipse formatting rules neither. So we are unable to generate eclipse rules in an automatic way. So, what we can do is either: * Keep the import order and unused imports removal check we made in https://github.com/apache/incubator-pinot/pull/6782, but give up the code block auto-formatting. Let engineer manually format the file (github workflow can only detect violation at the imports section, code-block part violation can not be detected). Or * Forget about the IDE formatting, engineer don't need to manually format the file using IDE, but manually run `mvn spotless:format` to format (github workflow will fail and prompt engineer to run `mvn spotless:format` if there are any violations). Option 2 can force the whole codebase formatted in a consistent way, but not match the intellij auto-formatting behavior. -- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
