oclint规则 Naming(命名)

来源:互联网 发布:九九乘法表c语言编程 编辑:程序博客网 时间:2024/06/05 19:15

Naming¶

长变量名称 LongVariableName¶

Since: 0.7

变量名太长影响可读性

定义类: oclint-rules/rules/naming/LongVariableNameRule.cpp

Example:

void aMethod(){    int reallyReallyLongIntegerName;}

Thresholds:

LONG_VARIABLE_NAME
变量名阀值, 默认 20.

短变量名 ShortVariableName¶

Since: 0.7

短变量名不利于理解. 

定义类: oclint-rules/rules/naming/ShortVariableNameRule.cpp

Example:

void aMethod(int i)  // i is short{    int ii;          // ii is short}

Thresholds:

SHORT_VARIABLE_NAME
变量名阀值, 默认值 3.
0 0
原创粉丝点击