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
[INFO] New style checker tool
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] New style checker tool
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
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
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] New style checker tool
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.
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.
regards,
Theo.
Theo.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] New style checker tool
Perl is not my thing either, probably an expert could have made it better.
Giovanni
Giovanni
Re: [INFO] New style checker tool
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
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [INFO] New style checker tool
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
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
-
- Posts: 483
- Joined: Sat Nov 19, 2011 6:47 pm
- Location: Le Mans, France
- Has thanked: 21 times
- Been thanked: 30 times
Re: [INFO] New style checker tool
Give Clang-Format a try, it's very nice and well documented
https://clang.llvm.org/docs/ClangFormat ... tions.html
https://github.com/Sarcasm/run-clang-format
https://clang.llvm.org/docs/ClangFormat ... tions.html
https://github.com/Sarcasm/run-clang-format
Return to “Development and Feedback”
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 25 guests