oclint规则 Unused(无用)
2016-09-05 10:50
645 查看
Unused¶
无用本地变量 UnusedLocalVariable¶
Since: 0.4检查声明了,却没有使用的本地变量.
定义类: oclint-rules/rules/unused/UnusedLocalVariableRule.cpp
Example:
int example(int a) { int i; // variable i is declared, but not used return 0; }
Suppress:
__attribute__((annotate("oclint:suppress[unused local variable]")))
无用的方法参数 UnusedMethodParameter¶
Since: 0.4检查无用方法参数.
定义类: oclint-rules/rules/unused/UnusedMethodParameterRule.cpp
Example:
int example(int a) // parameter a is not used { return 0; }
Suppress:
__attribute__((annotate("oclint:suppress[unused method parameter]")))
相关文章推荐
- oclint规则 Redundant(沉余)
- iOS开发-OCLint如何自定义静态扫描代码规则
- PMD规则之Unused Code Rules
- oclint 规则选择
- oclint规则
- oclint规则 Size(大小)
- oclint规则 索引
- oclint 基本规则介绍 Basic
- Visual Studio对无用引用(unused using)的处理方法
- OCLint的部分规则(Unuseed 部分)
- oclint规则 Cocoa
- [OCLint]OCLint代码检查规则
- OCLint的部分规则(Size 部分)
- oclint规则 Convention(公约)
- OCLint自定义规则的调试方法
- OCLint的部分规则(Redundant 部分)
- OCLint的部分规则(Naming 部分)
- OCLint的部分规则(Migration 部分)
- OCLint的部分规则(Empty 部分)
- oclint规则 Migration(迁移)