[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=vTLT1PnbWu4pwNNyMO0S413G3O+_TLcCGLiDGr5fH7Q@mail.gmail.com>
Date: Fri, 14 Apr 2023 15:36:19 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Íñigo Huguet <ihuguet@...hat.com>
Cc: ojeda@...nel.org, masahiroy@...nel.org, jgg@...dia.com,
mic@...ikod.net, danny@...ag0n.dev, linux-kernel@...r.kernel.org,
corbet@....net, joe@...ches.com, linux@...musvillemoes.dk,
willy@...radead.org, Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3] Add .editorconfig file for basic formatting
On Fri, Apr 14, 2023 at 12:11 PM Íñigo Huguet <ihuguet@...hat.com> wrote:
>
> EditorConfig is a specification to define the most basic code formatting
> stuff, and it's supported by many editors and IDEs, either directly or
> via plugins, including VSCode/VSCodium, Vim, emacs and more.
Thanks -- v3 looks much safer!
To clarify the risks (it would be nice to detail these in the commit message):
- Did you sample files manually or did you automate the search (e.g.
grepping for spaces/tabs, for LF, etc.) to verify the current rules
match the files in the kernel tree?
- Would it be possible to go further than grepping and apply the
rules (e.g. trigger a "save") through the entire tree to see whether
there would be spurious changes?
If that comes out clean (or mostly clean), then we would be fairly
confident this will not surprise developers (and it would be nice to
have the script around for future updates of the `.editorconfig`).
Perhaps EditorConfig provides a script to check this already?
Otherwise perhaps it can be done with editorconfig-core-c or
editorconfig-vim or directly scripting on a couple editors?
- Are we sure the rules match the output of automated formatters we
are using? (e.g. for Rust we enforce `rustfmt`, and thus we need to
ensure the editor does not "fight" the formatter; otherwise developers
may need to run the formatter more).
Cc'ing Andrew since he applied originally the `.clang-format`.
Cheers,
Miguel
Powered by blists - more mailing lists