git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 12 in “Add an EditorConfig file”
  1. Add an EditorConfig filebrian m. carlson, Sep 17, 2018
  2. Taylor BlauSep 17, 2018
  3. brian m. carlsonSep 20, 2018
  4. Junio C HamanoSep 19, 2018
  5. brian m. carlsonSep 20, 2018
  6. Junio C HamanoSep 20, 2018
  7. brian m. carlsonSep 21, 2018
  8. Junio C HamanoSep 24, 2018
  9. brian m. carlsonSep 27, 2018
  10. Eric SunshineSep 21, 2018
  11. Jeff KingSep 21, 2018
  12. brian m. carlsonSep 21, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.