Replace import-control checkstyle file with regex
Fix Eclipse build warnings by replacing checkstyle's import-control file with a simple regex rule. Fixes gh-4006
This commit is contained in:
parent
82fffe3062
commit
2a16c25977
|
@ -444,30 +444,6 @@
|
|||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>checkstyle-prepare</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${main.basedir}/spring-boot-parent/src/checkstyle</directory>
|
||||
<includes>
|
||||
<include>checkstyle-import-control.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE import-control PUBLIC "-//Puppy Crawl//DTD Import Control 1.1//EN" "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
|
||||
<import-control pkg="org.springframework.boot">
|
||||
|
||||
<allow pkg=".*" regex="true"/>
|
||||
|
||||
<!-- Use BDD Mockito -->
|
||||
<disallow class="org.mockito.Mockito.when"/>
|
||||
<disallow class="org.mockito.Mockito.doThrow"/>
|
||||
<disallow class="org.mockito.Mockito.doAnswer"/>
|
||||
|
||||
</import-control>
|
|
@ -83,9 +83,6 @@
|
|||
<property name="option" value="bottom" />
|
||||
<property name="sortStaticImportsAlphabetically" value="true" />
|
||||
</module>
|
||||
<module name="ImportControl">
|
||||
<property name="file" value="${checkstyle.build.directory}/checkstyle-import-control.xml"/>
|
||||
</module>
|
||||
|
||||
<!-- Javadoc Comments -->
|
||||
<module name="JavadocType">
|
||||
|
@ -130,6 +127,13 @@
|
|||
value="Line has leading space characters; indentation should be performed with tabs only." />
|
||||
<property name="ignoreComments" value="true" />
|
||||
</module>
|
||||
<module name="RegexpSinglelineJava">
|
||||
<property name="maximum" value="0"/>
|
||||
<property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" />
|
||||
<property name="message"
|
||||
value="Please use BDDMockto imports." />
|
||||
<property name="ignoreComments" value="true" />
|
||||
</module>
|
||||
<module name="Regexp">
|
||||
<property name="format" value="[ \t]+$" />
|
||||
<property name="illegalPattern" value="true" />
|
||||
|
|
Loading…
Reference in New Issue