【问题标题】:How to modify an existing rule in SonarQube?如何修改 SonarQube 中的现有规则?
【发布时间】:2016-07-19 09:24:01
【问题描述】:

我想知道如何修改 SonarQube 中的现有规则。 例如这条规则:

( Remove this commented out code )
/* ..... commented code ..... /*

我想修改这条规则,忽略包含@any_thing的注释代码,如下所示:

//@anything
/* ..... commented code ..... /* 

或者像这样:

/* @anything 
 ..... commented code ..... /*

我该如何解决这个问题?

【问题讨论】:

    标签: php sonarqube sonar-runner sonarqube-4.5


    【解决方案1】:

    您不能修改现有规则。解决方法是write a custom rule

    但是,您应该首先认真考虑您想要实现的行为是否真的特定于您自己的环境。如果不是这种情况,您可以通过加入SonarQube google group 来建议更改现有规则。

    【讨论】:

      猜你喜欢
      • 2018-01-10
      • 2020-12-06
      • 2018-11-29
      • 1970-01-01
      • 2016-05-06
      • 2018-11-15
      • 1970-01-01
      • 1970-01-01
      • 2015-03-27
      相关资源
      最近更新 更多