svn commit: r366993 - head/sys/net

Pedro Giffuni pfg at FreeBSD.org
Sun Oct 25 18:14:24 UTC 2020


On 10/24/20 8:19 PM, Ed Maste wrote:
> On Sat, 24 Oct 2020 at 11:27, Warner Losh <imp at bsdimp.com> wrote:
>>> Given we already have nice .clang-format, that does most of the job, maybe it's worth considering looking into tweaking it further to fix this part?
>>> It would be nice if we could finally offload all formatting issues to the tool and focus on the actual code :-)
>> It would be nice if it produced one of the style(9) acceptable formats without disrupting things already acceptable.  That's been the big problem with the tweaks to date... some things are fixed, others break. It's getting a lot closer, though
> Upstream clang-format comes with a script that can integrate with git,
> adding a `git clang-format` command. It will apply formatting to
> modified lines, leaving unchanged ones alone.

I doubt any script can match style(9) perfectly. indent(1) with bde's 
flags came near in some edge cases but generally did a horrible job. 
Also, out style(9) is not mandatory for userland.

Pedro.



More information about the svn-src-head mailing list