Regex Sonarqube和checkstyle插件。无法使用自定义规则(来自模板)
我已经在Sonar5.1中安装了checkstyle插件,我想检查我的java代码中是否存在一些字符串,例如注释中的BLOCKER 我创建了自定义com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineCheck规则并填充值 生成了checkstyle.xml。但sonar没有返回任何问题,但当我直接从checkstyle运行此规则时,会显示: java-jar checkstyle-6.4.1-all.jar-c checkstyle.xml src\main\java 正在启动审核。。。 java:5:警告:消息 审计完成 从sonarqube启动时有什么问题 checkstyle.xmlRegex Sonarqube和checkstyle插件。无法使用自定义规则(来自模板),regex,sonarqube,checkstyle,Regex,Sonarqube,Checkstyle,我已经在Sonar5.1中安装了checkstyle插件,我想检查我的java代码中是否存在一些字符串,例如注释中的BLOCKER 我创建了自定义com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineCheck规则并填充值 生成了checkstyle.xml。但sonar没有返回任何问题,但当我直接从checkstyle运行此规则时,会显示: java-jar checkstyle-6.4.1-all.jar-c checks
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"><!--
Generated by Sonar -->
<module name="Checker">
<module name="SuppressionCommentFilter" />
<module name="SuppressWarningsFilter" />
<module name="RegexpSingleline">
<property name="severity" value="warning" />
<property name="ignoreCase" value="true" />
<property name="format" value="BLOCKER" />
<property name="maximum" value="0" />
<property name="message" value="message" />
<property name="minimum" value="1" />
</module>
<module name="TreeWalker">
<module name="FileContentsHolder" />
<module name="SuppressWarningsHolder" />
</module>
</module>
我对它和RegexpSinglelineJavaCheck也有类似的问题。面临同样的问题。有什么解决办法吗??
/**
* Hello world!
* BLOCKER
*/
import java.util.*;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World! 2" );
}
}