|Subject:||Re: [Tinycc-devel] Reformatting Tinycc source code|
|Date:||Sat, 5 Dec 2020 13:01:42 +0100|
|User-agent:||Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.2.2|
Hi to all of you.
Just to say, I used to reformat about 30'000 lines with simple sed commands.... (changing my old habit of tabulations to 2 or 4 spaces).
It's quite simple, the only thing that matter is to hamonize the habits, everything else is superfluous.
Hi Antonio,Yes, I have also experienced that formatters can be "too eager at their job". I haven't really tried clang-format, but I will check it out just to compare with astyle, which has worked well for me over the years. I don't think i will need your scripts because I don't want to use much time on it, but thank you anyways.
On Fri, 4 Dec 2020 at 02:46, Antonio Prates <firstname.lastname@example.org> wrote:
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.
On Dec 3 2020, at 4:30 am, Steffen Nurpmeso <email@example.com> wrote:_______________________________________________Tyge Løvset wrote in<CAKmtvgTZtNJG5Qi5ef-BLOqZ2cG7nWtB9r3rU6MUSSijFmqq0w@mail.gmail.com" target="_blank" moz-do-not-send="true">CAKmtvgTZtNJG5Qi5ef-BLOqZ2cG7nWtB9r3rU6MUSSijFmqq0w@mail.gmail.com>:|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 ina git commit or so hook in a not too distant future, it arose onthe ML several times now.In hindsight of mixed codebases like groff or tcc however, ina world of plastics and artificiality, why not a godemiche.
--steffen||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
Tinycc-devel mailing list
_______________________________________________ Tinycc-devel mailing list Tinyccfirstname.lastname@example.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
|[Prev in Thread]||Current Thread||[Next in Thread]|