[cfe-dev] [RFC] Adding support for clang-format making further code modifying changes

MyDeveloper Day via cfe-dev cfe-dev at lists.llvm.org
Tue Aug 10 13:41:11 PDT 2021


Whilst I understand the desire to introduce a new binary, its basically
ends up being clang-format underneath, it feels artificial to go this
route, and we did play with this concept but it wasn't universally accepted
either

I kind of agree, but those of us who want these features would simply
rename the binary to clang-format.exe anyway. it would likely read the same
.clang-format file it feels like a decision we'd reverse further down the
line.

At the end of the day, it's exactly why I guess we didn't make a new tool
for "include sorting" or "namespace commenter"

The benefit of keeping it all in clang-format is that it's highly
integrated into external tools so we don't need to reinvent the wheel

MyDeveloperDay


On Tue, Aug 10, 2021 at 7:45 PM Andrew Tomazos <andrewtomazos at gmail.com>
wrote:

> On Tue, Aug 10, 2021 at 12:34 PM Aaron Ballman via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> I think the idea of a separate tool that's built on top of
>> clang-format (consuming clang-format as a library with additional
>> formatting features) has the most appeal to me.
>
>
> Right.  Another reason that this may be a good idea is the name
> "clang-format".  The word "format" appeals to the term "code formatting",
> which is generally accepted to cover only whitespace-related issues
> (indentation, line width, spacing, vertical alignment, etc).  Issues that
> involve rearranging tokens and syntax, with no semantic impact, are
> considered to be, by definition, beyond the scope of "code formatting" and
> more issues of "code style" or "coding style".
>
> If you don't like clang-reshape for the new program name, here is a quick
> brainstorm of some alternatives:
>
>     clang-style
>     clang-styler
>     clang-syntactor
>     clang-syntaxer
>     clang-restyle
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210810/afd1bd24/attachment.html>


More information about the cfe-dev mailing list