* [PATCH v2] .editorconfig: remove trim_trailing_whitespace option
@ 2024-06-11 7:27 Greg Kroah-Hartman
2024-06-11 8:16 ` Vincent MAILHOL
2024-06-13 6:16 ` Jani Nikula
0 siblings, 2 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-11 7:27 UTC (permalink / raw)
To: masahiroy
Cc: linux-kernel, linux-doc, Greg Kroah-Hartman, Danny Lin,
Íñigo Huguet, Mickaël Salaün, Vincent Mailhol
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 yet, just delete these lines from the
.editorconfig file so that we don't end up with diffs that are
automatically rejected by maintainers for containing things they
shouldn't.
Cc: Danny Lin <danny@kdrag0n.dev>
Cc: Íñigo Huguet <ihuguet@redhat.com>
Cc: Mickaël Salaün <mic@digikod.net>
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Fixes: 5a602de99797 ("Add .editorconfig file for basic formatting")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v2: - only remove the lines, don't move the whole file to Documentation
- add Fixes: tag
.editorconfig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.editorconfig b/.editorconfig
index 854773350cc5..29a30ccfc07b 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,7 +5,6 @@ root = true
[{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}]
charset = utf-8
end_of_line = lf
-trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 8
@@ -13,7 +12,6 @@ indent_size = 8
[*.{json,py,rs}]
charset = utf-8
end_of_line = lf
-trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
@@ -26,7 +24,6 @@ indent_size = 8
[*.yaml]
charset = utf-8
end_of_line = lf
-trim_trailing_whitespace = unset
insert_final_newline = true
indent_style = space
indent_size = 2
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] .editorconfig: remove trim_trailing_whitespace option
2024-06-11 7:27 [PATCH v2] .editorconfig: remove trim_trailing_whitespace option Greg Kroah-Hartman
@ 2024-06-11 8:16 ` Vincent MAILHOL
2024-06-13 6:16 ` Jani Nikula
1 sibling, 0 replies; 4+ messages in thread
From: Vincent MAILHOL @ 2024-06-11 8:16 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: masahiroy, linux-kernel, linux-doc, Danny Lin,
Íñigo Huguet, Mickaël Salaün
On Tue. 11 juin 2024 at 16:27, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> 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 yet, just delete these lines from the
> .editorconfig file so that we don't end up with diffs that are
> automatically rejected by maintainers for containing things they
> shouldn't.
>
> Cc: Danny Lin <danny@kdrag0n.dev>
> Cc: Íñigo Huguet <ihuguet@redhat.com>
> Cc: Mickaël Salaün <mic@digikod.net>
> Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Fixes: 5a602de99797 ("Add .editorconfig file for basic formatting")
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks, this v2 is way better!
Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> ---
> v2: - only remove the lines, don't move the whole file to Documentation
> - add Fixes: tag
>
>
> .editorconfig | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/.editorconfig b/.editorconfig
> index 854773350cc5..29a30ccfc07b 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -5,7 +5,6 @@ root = true
> [{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}]
> charset = utf-8
> end_of_line = lf
> -trim_trailing_whitespace = true
> insert_final_newline = true
> indent_style = tab
> indent_size = 8
> @@ -13,7 +12,6 @@ indent_size = 8
> [*.{json,py,rs}]
> charset = utf-8
> end_of_line = lf
> -trim_trailing_whitespace = true
> insert_final_newline = true
> indent_style = space
> indent_size = 4
> @@ -26,7 +24,6 @@ indent_size = 8
> [*.yaml]
> charset = utf-8
> end_of_line = lf
> -trim_trailing_whitespace = unset
> insert_final_newline = true
> indent_style = space
> indent_size = 2
> --
> 2.45.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] .editorconfig: remove trim_trailing_whitespace option
2024-06-11 7:27 [PATCH v2] .editorconfig: remove trim_trailing_whitespace option Greg Kroah-Hartman
2024-06-11 8:16 ` Vincent MAILHOL
@ 2024-06-13 6:16 ` Jani Nikula
2024-06-13 6:38 ` Greg Kroah-Hartman
1 sibling, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2024-06-13 6:16 UTC (permalink / raw)
To: Greg Kroah-Hartman, masahiroy
Cc: linux-kernel, linux-doc, Greg Kroah-Hartman, Danny Lin,
Íñigo Huguet, Mickaël Salaün, Vincent Mailhol
On Tue, 11 Jun 2024, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 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
Do you mean s/files/lines/?
BR,
Jani.
> editorconfig standard yet, just delete these lines from the
> .editorconfig file so that we don't end up with diffs that are
> automatically rejected by maintainers for containing things they
> shouldn't.
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] .editorconfig: remove trim_trailing_whitespace option
2024-06-13 6:16 ` Jani Nikula
@ 2024-06-13 6:38 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-13 6:38 UTC (permalink / raw)
To: Jani Nikula
Cc: masahiroy, linux-kernel, linux-doc, Danny Lin,
Íñigo Huguet, Mickaël Salaün, Vincent Mailhol
On Thu, Jun 13, 2024 at 09:16:14AM +0300, Jani Nikula wrote:
> On Tue, 11 Jun 2024, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > 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
>
> Do you mean s/files/lines/?
Yes. I'll edit this when I commit it as it's driving me crazy already
and I think it needs to get to Linus "soon" before we start to see lots
of busted patches sent to maintainers...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-13 6:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 7:27 [PATCH v2] .editorconfig: remove trim_trailing_whitespace option Greg Kroah-Hartman
2024-06-11 8:16 ` Vincent MAILHOL
2024-06-13 6:16 ` Jani Nikula
2024-06-13 6:38 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).