I'm working for a company that has strict coding style guidelines but no automatic tool to validate them. I've looked around and the only tools I could find were lint like tools that seem to be aimed at verifying what the code does, and preventing bugs and not at making sure the coding style is correct.
What tool should we use, if at all?
NOTE: I'm looking for something for C code, although something that works for C++ would be good as well.
There are (or were) numerous tools for this. One of the oldest is
cb
(C Beautifier) that was around in ancient versions of Unix - meaning, in this case, Version 7 Unix:GNU
indent
is a vastly more complex and configurable beastie. There were commercial tools as well. For example, Abraxas Software provides a CodeCheck tool, for example; we used that briefly in the mid-90s, but the changes it wanted us to make were (very necessary, but) too intrusive for management.From a similar question: Vera++:
Please use VIM and enjoy the easiness. You can do anything related to source programming by simple commands. Also you can make the VIM more reliable and powerful by editing .vimrc file. The help in it will help you a lot.
/renjith g