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

Re: [PATCH] Add an EditorConfig file

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 20, 2018, 14:08 UTC
Message-ID
<xmqqk1ng2rdo.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180920000013.GZ432229@genre.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 6 quoted lines
> I think "make style" and the EditorConfig file are complementary.  "make
> style" autoformats code into a diff.  I agree that if we always used
> clang-format to format code, then this would be a non-issue in the
> EditorConfig file, since we'd just tell people to format their code and
> be done with it.  However, we don't automatically do that, so I think
> this still has value.
Oh, we agree on that 100%.  These are complementary.  

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.

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 ;-)".

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).

Thanks.
Previous: brian m. carlsonNext: brian m. carlson
Message 6 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.