Skip to contentSkip to conversation

.editorconfig: move to Documentation/ directory

PATCH In review Greg Kroah-Hartman 3 participants 4 messages Jun 11, 2024 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 .editorconfig: move to Documentation/ directory

Some editors (like the vim variants), when seeing "trim_whitespace" decide to do just that for all of the whitespace in the file you are saving, even if it is not on a line that you have modified. This plays havoc with diffs and is NOT something that should be intended.

As the "only trim whitespace on modified files" is not part of the editorconfig standard, just move the whole thing off to the Documentation/ directory so that those that wish to use such a thing can pick it up from there.

Cc Danny Lin <[email protected]>
Cc Íñigo Huguet <[email protected]>
Cc Mickaël Salaün <[email protected]>
Cc Vincent Mailhol <[email protected]>
Cc Masahiro Yamada <[email protected]>
---
 .editorconfig => Documentation/.editorconfig | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename .editorconfig => Documentation/.editorconfig (100%)
Documentation/.editorconfig renamed from .editorconfig +0 -0
similarity index 100%
rename from .editorconfig
rename to Documentation/.editorconfig
Signature · 1 line
2.45.2
#1 lore raw
Quoted 4 lines · Greg Kroah-Hartman

Some editors (like the vim variants), when seeing "trim_whitespace" decide to do just that for all of the whitespace in the file you are saving, even if it is not on a line that you have modified. This plays havoc with diffs and is NOT something that should be intended.

If trim_trailing_whitespace is the only rule that has actually been a problem, how about removing it and leaving the rest of .editorconfig intact? The other rules are still useful to have as defaults.

Thanks,
Danny

Quoted 23 lines

As the "only trim whitespace on modified files" is not part of the editorconfig standard, just move the whole thing off to the Documentation/ directory so that those that wish to use such a thing can pick it up from there.

Cc Danny Lin <[email protected]>
Cc Íñigo Huguet <[email protected]>
Cc Mickaël Salaün <[email protected]>
Cc Vincent Mailhol <[email protected]>
Cc Masahiro Yamada <[email protected]>
---
 .editorconfig => Documentation/.editorconfig | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename .editorconfig => Documentation/.editorconfig (100%)
Documentation/.editorconfig renamed from .editorconfig +0 -0
similarity index 100%
rename from .editorconfig
rename to Documentation/.editorconfig
Signature · 1 line
2.45.2
#2 lore raw
Quoted 9 lines · Danny Lin
Quoted 4 lines · Greg Kroah-Hartman

Some editors (like the vim variants), when seeing "trim_whitespace" decide to do just that for all of the whitespace in the file you are saving, even if it is not on a line that you have modified. This plays havoc with diffs and is NOT something that should be intended.

If trim_trailing_whitespace is the only rule that has actually been a problem, how about removing it and leaving the rest of .editorconfig intact? The other rules are still useful to have as defaults.

Good idea, let me do v2 with that...

#3 lore raw
In reply to Danny Lin
Quoted 9 lines · Danny Lin
Quoted 4 lines · Greg Kroah-Hartman

Some editors (like the vim variants), when seeing "trim_whitespace" decide to do just that for all of the whitespace in the file you are saving, even if it is not on a line that you have modified. This plays havoc with diffs and is NOT something that should be intended.

If trim_trailing_whitespace is the only rule that has actually been a problem, how about removing it and leaving the rest of .editorconfig intact? The other rules are still useful to have as defaults.

+1

The trim_trailling_whitespace can be removed. IMHO the main point of the .editorconfig is to set up the correct indentation, that is to say the indent_style and indent_size parameters, and I don't think that anyone is having issues with these so far.

Quoted 17 lines

Thanks,
Danny

Quoted 14 lines

As the "only trim whitespace on modified files" is not part of the editorconfig standard, just move the whole thing off to the Documentation/ directory so that those that wish to use such a thing can pick it up from there.

Cc Danny Lin <[email protected]>
Cc Íñigo Huguet <[email protected]>
Cc Mickaël Salaün <[email protected]>
Cc Vincent Mailhol <[email protected]>
Cc Masahiro Yamada <[email protected]>
---
 .editorconfig => Documentation/.editorconfig | 0

This would not solve the issue, because it would still apply for anything under Documentation/*

Quoted 9 lines
Quoted 9 lines
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename .editorconfig => Documentation/.editorconfig (100%)
Documentation/.editorconfig renamed from .editorconfig +0 -1
similarity index 100%
rename from .editorconfig
rename to Documentation/.editorconfig
--

2.45.2