Re: [PATCH v2] Add .editorconfig file for basic formatting

From: Miguel Ojeda
Date: Tue Apr 04 2023 - 05:51:59 EST


Hi Íñigo,

On Tue, Apr 4, 2023 at 9:55 AM Íñigo Huguet <ihuguet@xxxxxxxxxx> 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.

Please see https://lore.kernel.org/lkml/20200703073143.423557-1-danny@xxxxxxxxxxx/
for a previous patch & discussion, as well as commit fa60ce2cb450
("treewide: remove editor modelines and cruft") for a related cleanup.
Cc'ing those that gave some feedback back then.

Danny's v2 patch has some extra extensions/languages it manages as
well as some docs, and yours handles things that one doesn't, like the
Rust files and `Makefile.*` cases. So it would be nice to get a
version that merges everything from both of you, likely as
co-developers.

It still remains important to see if somebody's workflow could break
due to this, especially for the catch-all section `[*]` and for
options like `trim_trailing_whitespace` which can actually break
things like patch files as you note in the changelog. Perhaps landing
it in linux-next for an extended period of time (e.g. a few kernel
cycles) is one way to find out, or we could start without the
"dangerous" options. What do others think?

By the way, for the next/merged version, in your side please keep
`!.editorconfig` sorted and in the other side please avoid the
duplicated `.tc` case (which I just noticed).

Cheers,
Miguel