public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] .editorconfig: move to Documentation/ directory
@ 2024-06-11  6:49 Greg Kroah-Hartman
  2024-06-11  6:53 ` Danny Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-11  6:49 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, 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 <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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 .editorconfig => Documentation/.editorconfig | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename .editorconfig => Documentation/.editorconfig (100%)

diff --git a/.editorconfig b/Documentation/.editorconfig
similarity index 100%
rename from .editorconfig
rename to Documentation/.editorconfig
-- 
2.45.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] .editorconfig: move to Documentation/ directory
  2024-06-11  6:49 [PATCH] .editorconfig: move to Documentation/ directory Greg Kroah-Hartman
@ 2024-06-11  6:53 ` Danny Lin
  2024-06-11  7:26   ` Greg Kroah-Hartman
  2024-06-11  7:56   ` Vincent MAILHOL
  0 siblings, 2 replies; 4+ messages in thread
From: Danny Lin @ 2024-06-11  6:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, masahiroy
  Cc: linux-kernel, linux-doc, Íñigo Huguet,
	Mickaël Salaün, Vincent Mailhol

On Mon, Jun 10, 2024 at 11:49 PM, Greg Kroah-Hartman 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.

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

>
> 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 <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>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  .editorconfig => Documentation/.editorconfig | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  rename .editorconfig => Documentation/.editorconfig (100%)
>
> diff --git a/.editorconfig b/Documentation/.editorconfig
> similarity index 100%
> rename from .editorconfig
> rename to Documentation/.editorconfig
> -- 
> 2.45.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] .editorconfig: move to Documentation/ directory
  2024-06-11  6:53 ` Danny Lin
@ 2024-06-11  7:26   ` Greg Kroah-Hartman
  2024-06-11  7:56   ` Vincent MAILHOL
  1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-11  7:26 UTC (permalink / raw)
  To: Danny Lin
  Cc: masahiroy, linux-kernel, linux-doc, Íñigo Huguet,
	Mickaël Salaün, Vincent Mailhol

On Mon, Jun 10, 2024 at 11:53:46PM -0700, Danny Lin wrote:
> On Mon, Jun 10, 2024 at 11:49 PM, Greg Kroah-Hartman 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.
> 
> 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...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] .editorconfig: move to Documentation/ directory
  2024-06-11  6:53 ` Danny Lin
  2024-06-11  7:26   ` Greg Kroah-Hartman
@ 2024-06-11  7:56   ` Vincent MAILHOL
  1 sibling, 0 replies; 4+ messages in thread
From: Vincent MAILHOL @ 2024-06-11  7:56 UTC (permalink / raw)
  To: Danny Lin
  Cc: Greg Kroah-Hartman, masahiroy, linux-kernel, linux-doc,
	Íñigo Huguet, Mickaël Salaün

On Tue. 11 June 2024 at 15:53, Danny Lin <danny@kdrag0n.dev> wrote:
> On Mon, Jun 10, 2024 at 11:49 PM, Greg Kroah-Hartman 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.
>
> 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.

> Thanks,
> Danny
>
> >
> > 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 <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>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  .editorconfig => Documentation/.editorconfig | 0

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

> >  1 file changed, 0 insertions(+), 0 deletions(-)
> >  rename .editorconfig => Documentation/.editorconfig (100%)
> >
> > diff --git a/.editorconfig b/Documentation/.editorconfig
> > similarity index 100%
> > rename from .editorconfig
> > rename to Documentation/.editorconfig
> > --
> > 2.45.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-11  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  6:49 [PATCH] .editorconfig: move to Documentation/ directory Greg Kroah-Hartman
2024-06-11  6:53 ` Danny Lin
2024-06-11  7:26   ` Greg Kroah-Hartman
2024-06-11  7:56   ` Vincent MAILHOL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox