OCLint的部分规则(Unuseed 部分)

40 篇文章 0 订阅
17 篇文章 0 订阅

OCLint的部分规则(Unuseed 部分)

对OCLint的部分规则进行简单翻译解释,有部分进行了验证以及进一步分析、测试。OCLint其他相关内容如下:

--
OCLint-iOS-OC项目几种简单使用OCLint的部分规则(Basic 部分)
OCLint的部分规则(Unuseed 部分)OCLint的部分规则(Size 部分)
OCLint的部分规则(Redundant 部分)OCLint的部分规则(Naming 部分)
OCLint的部分规则(Migration 部分)OCLint的部分规则(Empty 部分)
OCLint的部分规则(Design 部分)OCLint的部分规则(Convention 部分)
OCLint的部分规则(CoCoa 部分)



1、unused local variable

      Since:0.4 定义类传送门~点击

This rule detects local variables that are declared, but not used.

简单解释:有局部变量没有使用。

    int example(int a) {
        int i;          // variable i is declared, but not used
        return 0;
    }

Suppress:
__attribute__((annotate("oclint:suppress[unused local variable]")))

2、unused method parameter

      Since:0.4 定义类传送门~点击

This rule detects parameters that are not used in the method.

简单解释:方法参数没有被使用.

    int example(int a)  // parameter a is not used {
        return 0;
    }

Suppress:
__attribute__((annotate("oclint:suppress[unused method parameter]")))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值