在春天啓動的項目,我使用Apache的POM插件的CheckStyle如下圖所示:Eclipse和Apache的CheckStyle插件對準
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<configLocation>google_checks.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
</plugin>
在Eclipse Neon.1版本(4.6.1),我已經安裝了Eclipse的CheckStyle從下面的路徑插件:
固定的Eclipse插件強調所有Check作風問題之後,當我運行驗證行家的目標,我還是看到了進口依存度由M報相關的控制檯上許多檢查風格違規aven插件例如
D:\Data\Filter.java:4: warning: 'com.microsoft.aad.adal4j.AuthenticationContext' should be separated from previous import group.
D:\Data\Filter.java:39: warning: Import statement for 'org.springframework.beans.factory.annotation.Value' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.
我想知道爲什麼而Maven插件也都儘管使用google_checks.xml事實報道他們的Eclipse插件並沒有強調這些問題。如何對齊它們?