Go Down

Topic: Automated Arduino coding style & error checking? (Read 502 times) previous topic - next topic

doggenj

Oct 24, 2013, 04:03 pm Last Edit: Oct 24, 2013, 04:48 pm by doggenj Reason: 1
I have been wondering for a while why there are no tools to check Arduino code for common mistakes and errors.

Some ideas:


Coding style:
Arduino traps & tips:
http://www.gammon.com.au/forum/?id=12153
http://forum.arduino.cc//index.php?topic=190272.0

Maybe it could be interesting to start from cpplint (Google c++ coding style checker) and make a style checking tool for Arduino?
https://pypi.python.org/pypi/cpplint

Or maybe it could be interesting to see what Arduino can learn/use from MISRA-C?
http://www.embedded.com/electronics-blogs/beginner-s-corner/4023981/Introduction-to-MISRA-C
http://en.wikipedia.org/wiki/MISRA_C

Does anyone know about AVR Libc tools that offer similar features?
http://www.nongnu.org/avr-libc/

KeithRB

It is called the compiler.

Lint might be good, if it works with C++.

We could switch to clang, which has better error messages.

Go Up