You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Piotr Nowojski (Jira)" <ji...@apache.org> on 2020/10/26 20:32:00 UTC

[jira] [Comment Edited] (FLINK-19671) Update EditorConfig file to be useful

    [ https://issues.apache.org/jira/browse/FLINK-19671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17220979#comment-17220979 ] 

Piotr Nowojski edited comment on FLINK-19671 at 10/26/20, 8:31 PM:
-------------------------------------------------------------------

I've just stumbled across this issue. Suddenly IntelliJ was inserting everywhere double indentations, when it was not supposed to be doing. It was super annoying for me to modify any pre-existing code with single indentations (It took me quite a bit of time to figure what has happened and found this as the root cause). Before I figured out and disabled {{.editorconfig}} changes in the IntelliJ, I wasted a lot of time manually reverting all of the changes, and still [~AHeise] found some more unintentional changes...

https://github.com/apache/flink/pull/13741/commits/1e26fb076f97cb27397a1d76d26aff11790e438f#r511927651
https://github.com/apache/flink/pull/13741#discussion_r511925956

[~aljoscha] after reading the mailing list discussion about using this "rachet" thing, I didn't find anywhere where we agreed upon changing the continuation indent from 4 to 8. It looks like it's invalid with our coding style, and currently doing much much more harm than good.

Moreover. If we want to change our coding style, and automate the formatting, ehh fine +0.1 from my side (I don't like braking the {{git blame}}/InltelliJ's annotations). But I agree with [~chesnay]. -1 for any gradual change. And big -1 for a change like this, that's only affecting the exact particular lines of code that I touched, even unknowingly, via copy pasting or refactoring/changing signatures etc.
 


was (Author: pnowojski):
I've just stumbled across this issue. Suddenly IntelliJ was inserting everywhere double indentations, when it was not supposed to be doing. It was super annoying for me to modify any pre-existing code with single indentations (It took me quite a bit of time to figure what has happened and found this as the root cause). Before I figured out and disabled {{.editorconfig}} changes in the IntelliJ, I wasted a lot of time manually reverting all of the changes, and still [~AHeise] found some more unintentional changes...

https://github.com/apache/flink/pull/13741/commits/1e26fb076f97cb27397a1d76d26aff11790e438f#r511927651
https://github.com/apache/flink/pull/13741#discussion_r511925956

[~aljoscha] after reading the mailing list discussion about using this "rachet" thing, I didn't find anywhere where we agreed upon changing the continuation indent from 4 to 8. It looks like it's invalid with our coding style, and currently doing much much more harm than good.

Moreover. If we want to change our coding style, and automate the formatting +1. But I agree with [~chesnay]. -1 for any gradual change. And big -1 for a change like this, that's only affecting the exact particular lines of code that I touched, even unknowingly, via copy pasting or refactoring/changing signatures etc.
 

> Update EditorConfig file to be useful
> -------------------------------------
>
>                 Key: FLINK-19671
>                 URL: https://issues.apache.org/jira/browse/FLINK-19671
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Major
>              Labels: pull-request-available
>
> We should update our {{.editorconfig}} file to format Java code according to a style that passes our checkstyle rules and also applies our import ordering. This will greatly simplify development because developers can just "re-format code" in IntelliJ and be done with it.
> See the ML discussion for more background: https://lists.apache.org/thread.html/r481bb622410718cd454d251b194c7c1ad358e5d861fdacc9a4be3b5b%40%3Cdev.flink.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)