Re: Code Style Checking Tool
Why don't you ask google about this?
PS. After decades of programming I never was in a situation when paranoid requirements to code style were in effect.
Re: Code Style Checking Tool
Quote:
Originally Posted by
Igor Vartanov
PS. After decades of programming I never was in a situation when paranoid requirements to code style were in effect.
Me neither!
Re: Code Style Checking Tool
there are "lint" type checkers which do static code analysis
like http://cppcheck.sourceforge.net/
they also have "style" checks, but that's not really about indents, type annotation, and/or expected casing. it's more to do about code design issues that will probably lead you to actual errors, but that aren't necessarily wrong per se.
if you are concerned about the actual aesthetics of the code, then there are to my knowledge no checkers, but there are code (re)stylers which will take a source and format it according to desire.
I'm not sure if any of them actually do hungarion annotation changes however.
have a look on google for "code beautifier"
Re: Code Style Checking Tool
Re: Code Style Checking Tool
Quote:
Originally Posted by
AlanCCC
Hi,
Are there any good free or commercial software that can check the C++ code style and find any codelines that violate a given code style specification? For example, whether the codeline is indented proplery, whether the variable is using Hungarian naming notation?
Thanks
Why do you need to check coding style to this detail? IME development teams have a coding style to which they should adhere (eg where to put {}, use of capitals, underscore etc in names etc etc) and any flagrant breaches are picked up as part of code review and then discussed with the individual concerned. Why do you want a tool to check coding style? How detailed is your style guidance? To get tabs, spaces, braces etc all looking the same just use a code styler that will format the code according to the rules given to it.
Are you concerned about how the program 'looks' (ie style) or whether good practice c++ code has been used (ie code standard). I could write some ugly awful c++ code but make it look 'nice' that would probably pass a style test but should be rejected by any competent c++ reviewer.
Re: Code Style Checking Tool
Quote:
Originally Posted by
AlanCCC
Are there any good free or commercial software that can check the C++ code style and find any codelines that violate a given code style specification?
I think it's quite a lot to this,
http://www.tiobe.com/index.php/conte...Standards.html