Re: [PATCH] Add an EditorConfig file
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Sep 21, 2018, 22:50 UTC
- Message-ID
- <20180921225039.GC432229@genre.crustytoothpaste.net>
- In-Reply-To
- <xmqqk1ng2rdo.fsf@gitster-ct.c.googlers.com>
On Thu, Sep 20, 2018 at 07:08:35AM -0700, Junio C Hamano wrote:
> My comment was that it would be confusing if they gave contradicting > suggestions to the end user. After letting EditorConfig to enforce > one style while typing and saving, if "make style" suggests to > format it differently, it would not be a great user experience.
Ah, okay. I understand your concern better now.
Show 6 quoted lines
> The ideal response would have been "Oh, of course EditorConfig folks > already thought about that, which is a natural thing to wish for, > and they have a tool to generate clang-format configuration from the > section for C language in any EditorConfig file---here is a link. > After all, tools like clang-format look like just another editor to > them ;-)".
No, I don't think there's such a tool. clang-format wants a lot of format settings that aren't in EditorConfig, and EditorConfig wants to address things that are not C source files.
Show 5 quoted lines
> But that is a response in a dream-world. If there is no such tool, > I am perfectly OK if the plan is to manually keep them (loosely) in > sync. I do not think it is good use of our time to try to come up > with such a tool (unless somebody is really interested in doing it, > that is).
Would it be helpful if I sent a script that ran during CI to ensure they stayed in sync for the couple places where they overlap? I'm happy to do so if you think it would be useful.
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204