public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Danny Lin <danny@kdrag0n.dev>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] editorconfig: Add automatic editor configuration file
Date: Fri, 03 Jul 2020 00:31:00 -0700	[thread overview]
Message-ID: <16043769.gqpzGLO8mG@pinwheel> (raw)
In-Reply-To: <CANiq72k2rrByxzj1c4azAVJq-V7BqQcmBwtm3XM9T8r3r3-ysQ@mail.gmail.com>

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@kdrag0n.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



  reply	other threads:[~2020-07-03  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  0:12 [PATCH] editorconfig: Add automatic editor configuration file Danny Lin
2020-07-03  5:38 ` Miguel Ojeda
2020-07-03  7:31   ` Danny Lin [this message]
2020-07-03  7:31     ` [PATCH v2] " Danny Lin
2020-07-03 12:29       ` Jonathan Corbet
2021-03-24 10:59         ` Rasmus Villemoes
2021-03-25  7:00           ` Masahiro Yamada
2021-03-25  9:44             ` Miguel Ojeda
2020-07-03 12:49       ` Matthew Wilcox
2020-07-03 17:22         ` Joe Perches
2020-07-03  7:49     ` [PATCH] " Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16043769.gqpzGLO8mG@pinwheel \
    --to=danny@kdrag0n.dev \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=corbet@lwn.net \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox