Search code examples
c++eclipsenaming-conventionseclipse-indigocodan

Where can I set the Eclipse C++ Function Name Style?


The Codan analysis for naming conventions is giving me "Bad function name" info messages beause it expects camelCase and I use CamelCase. (I know I can turn this off but I would rather have it enforce my naming conventions).

I'm using Eclipse/CDT Indigo. Under the Windows->Preferences there is a C/C++->Code Style->Name Style (see image), but under Code it doesn't have an option for Method names. This is strange since it has a more specific entry for Getter and Setter methods. Where is Codan getting the style it's using for validation?

screen shot of prefs dialog


Solution

  • Right click on info message in the Problems window, and select the Customize Problem... option at the bottom of the context menu:

    enter image description here

    and change the pattern for function naming to ^[A-Z]

    enter image description here