☰
  • 首页
  • 规则分类
  • 项目介绍
search
•••

不应存在拼写错误

6.1.8 ID_misspelling
目录 › next › previous

代码中不应存在拼写错误,尤其是供他人调用的代码,如命名空间名称、公共接口名称等,更不应存在拼写错误。

拼写错误会使用户对代码的质量产生疑虑,而且相关代码被大量引用后也不便于改正。

示例:

class A {
public:
    virtual void destory() = 0;  // Non-compliant, should be ‘destroy’
};

例中“destory”函数的名称有拼写错误,应改为“destroy”。

Copyright©2024 360 Security Technology Inc., Licensed under the Apache-2.0 license.