[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16043769.gqpzGLO8mG@pinwheel>
Date: Fri, 03 Jul 2020 00:31:00 -0700
From: Danny Lin <danny@...ag0n.dev>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>,
Joe Perches <joe@...ches.com>,
Jonathan Corbet <corbet@....net>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] editorconfig: Add automatic editor configuration file
On Thursday, July 2, 2020 at 10:38 PM, Miguel Ojeda wrote:
> Hi Danny,
>
> On Fri, Jul 3, 2020 at 2:16 AM Danny Lin <danny@...ag0n.dev> wrote:
> > +[*]
> > +charset = utf-8
> > +end_of_line = lf
>
> While UTF-8 and LF are probably OK for all files, I am not 100% sure
about:
> > +insert_final_newline = true
> > +indent_style = tab
> > +indent_size = 8
>
> for other languages and non-code files we may have around. Perhaps it
> is best to avoid `[*]` unless we are sure?
Most of the other exceptions can be accomodated for with more specific
rules below the base [*] section. I just went through most of the
kernel's files and added rules for the vast majority of the exceptinos
to the 8-column tab indent style, though there are still some that
haven't been covered.
It looks like some types of files lack consistent indentation, e.g.
arch/mips/*/Platform and some shell scripts in scripts/ tools/testing/
selftests/ftrace/test.d/kprobe/*.tc. There are also some files that were
highly inconsistent even within themselves (e.g. drivers/gpu/drm/amd/
amdkfd/cwsr_trap_handler_gfx*.asm), so setting indentation settings to
something sane by default doesn't make them any worse. After all, no
automated code style tooling is perfect and there will be edge cases
where it breaks down.
That being said, I think most of the exceptions should be taken care of
now; please feel free to suggest a better way to deal with these.
>
> Cheers,
> Miguel
Powered by blists - more mailing lists