在哪里可以设置Eclipse C ++函数名称样式? [英] Where can I set the Eclipse C++ Function Name Style?

查看:154
本文介绍了在哪里可以设置Eclipse C ++函数名称样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命名约定的Codan分析给我不好的功能名称信息消息,因为它期望camelCase,我使用CamelCase。 (我知道我可以把它关掉,但我宁愿让它执行我的命名约定)。



我使用的是Eclipse / CDT Indigo。在Windows->首选项下,有一个C / C ++ - >代码样式 - >名称样式(见图),但在代码下它没有方法名称的选项。这是奇怪的,因为它有一个更具体的条目为Getter和Setter方法。 Codan在哪里获得用于验证的风格?



解决方案

在问题窗口中右键单击信息消息,然后选择自定义问题... 选项在上下文菜单的底部:





并将函数命名的模式更改为 ^ [AZ]




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?

解决方案

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

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

这篇关于在哪里可以设置Eclipse C ++函数名称样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆