0

I am looking for a C++ coding style tool that will validate a coding style. I have looked through the other SO posts, googled and tried some tools, but none of them meet my desired goal.

What I am trying to do is to check if variable names of a certain type have the correct prefix. All of the tools I have looked at so far, do a good job in indenting, identifying undesired spaces and similar things.

I need for example:

bool bMyFlag (correct) bool MyFlag (error, boolean variable does not have "b" prefix)

uint32_t u4MyNumber (correct) uint32_t MyNumber (incorrect, uint32_t requires "u4" as the prefix)

class CBottle (correct) class Bottle (incorrect, a class should have a "C" as a prefix)

Is there a tool that I can give a specific rule set for cases like this? Any input would be greatly appreciated.

1 Answer 1

0

You might want to check list of coding style took here: https://en.m.wikipedia.org/wiki/List_of_tools_for_static_code_analysis?_e_pi_=7%2CPAGE_ID10%2C7752118043

See if any of tools there can supported your feature request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.