[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Reformatting Tinycc source code

From: Antonio Prates
Subject: Re: [Tinycc-devel] Reformatting Tinycc source code
Date: Fri, 4 Dec 2020 09:45:32 +0800

Hello Tyge,

While I was forking TCC on to the sugar project, I must say, for the record, I tried to pass all .C and .H sources through clang code formatter, with all kinds of different defaults and options, and to my surprise all of them broke the build !?! hehe

I literally spent hours playing with that. Don't ask me why a code formatter breaks code. It should not happen, yet, it happens with TCC. I tried to fix the compile errors, but each fix would force even more changes. So I never completed the goal and finally gave up on it.

My original plan for patching sugar sources was to run same script over TCC updates on my local to make the changes diff from formatted to formatted, witch should have been easy. In the end I had to go back and live with an unevenly formatted codebase, where each file will have it's own way... it's a detachment exercise for me, as any unformatted bracket sounds like a very annoying mistake to me :P

But if you want I can search for the script that would format it all, and you can try playing with it a bit more, to see if you can figure out why it does not build.

Best regards,

On Dec 3 2020, at 4:30 am, Steffen Nurpmeso <steffen@sdaoden.eu> wrote:
Tyge Løvset wrote in
|No problem, I should have read the CodingStyle file. @grischka, you are
|right, tabs are consistently 8 indents.
|It is also true that it is not blame-friendly, apart from blaming those who
|aren't following the style guides, of course ;)
||Doesn't really look much different to me except that it seems to create
||10233 changes which isn't really the git-blame friendly way of making
||not much difference ;)
|I guess I just regard this a little more important than you guys, I know
|some projects are even forcing all code through a formatter,
|which is too much imo, so it comes down to preference in the end.

Mind you, FreeBSD seems to be about to use the clang formatter in
a git commit or so hook in a not too distant future, it arose on
the ML several times now.
In hindsight of mixed codebases like groff or tcc however, in
a world of plastics and artificiality, why not a godemiche.

|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)

Tinycc-devel mailing list
Sent from Mailspring
reply via email to

[Prev in Thread] Current Thread [Next in Thread]