Page 1 of 1

[INFO] New style checker tool

Posted: Sat May 18, 2019 3:05 pm
by Giovanni
Hi,

I added under /tools/style a small perl tool that is able to pick a lot of small style issues. useful when submitting code, it can check single files or whole subsystems.

It helped me fix a lot of small style issues in the code base.

It is not a general tool because it is hardwired on the ChibiOS style but feel free to customize and use it for your needs.

Giovanni

Re: [INFO] New style checker tool

Posted: Thu May 23, 2019 3:44 pm
by faisal
Have you had a chance to look into the various code style enforcement tools I emailed you about?

Re: [INFO] New style checker tool

Posted: Thu May 23, 2019 5:13 pm
by Giovanni
Hi,

Yes, I am looking into it as a more general quality solution, however it is not addressing the kind of small "style errors" I am after right now. Anyway, we have the script for that now :)

Giovanni

Re: [INFO] New style checker tool

Posted: Fri May 24, 2019 12:59 pm
by tfAteba
Hey All,

I'm happy to see that this tools it evolve, I try to improve it two years ago but I have no notion in perl so I prefer after some improvement to continue to work on my C program.

But I will give a try and a feedbak is necessary.

Thanks.

Re: [INFO] New style checker tool

Posted: Fri May 24, 2019 1:25 pm
by Giovanni
Perl is not my thing either, probably an expert could have made it better.

Giovanni

Re: [INFO] New style checker tool

Posted: Tue Jun 04, 2019 4:16 am
by meatball
Have you used uncrustify? It's multiplatform, and is widely configurable. I'm sure it wouldn't be too hard to setup a config file and add it to the repo. You can try it here: https://cdanu.github.io/uncrustify_conf ... index.html

Re: [INFO] New style checker tool

Posted: Tue Jun 04, 2019 4:45 am
by Giovanni
Hi,

Interesting, if is far more advanced but it is not exactly what I was trying to do. Mainly it is a formatter, I just wanted a checker able to operate on the whole codebase in one go. In addition it does not check for some kind of details I am interested in, like stye of comments, vertical spacing etc.

Giovanni

Re: [INFO] New style checker tool

Posted: Tue Jun 04, 2019 3:00 pm
by mobyfab