You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/01/29 00:28:41 UTC
[GitHub] milleruntime opened a new pull request #52: Update checkstyle to
use import-control for API checking
milleruntime opened a new pull request #52: Update checkstyle to use import-control for API checking
URL: https://github.com/apache/accumulo-testing/pull/52
This should be easier to maintain than the regex (at least for 2.0) and the output is a lot more helpful:
<pre>
[ERROR] src/main/java/org/apache/accumulo/testing/stress/ScanOpts.java:[19,1] (imports) ImportControl: Disallowed import - org.apache.accumulo.core.cli.ClientOnDefaultTable.
[ERROR] src/main/java/org/apache/accumulo/testing/stress/WriteOptions.java:[19,1] (imports) ImportControl: Disallowed import - org.apache.accumulo.core.cli.ClientOnDefaultTable.
[ERROR] src/main/java/org/apache/accumulo/testing/stress/Write.java:[19,1] (imports) ImportControl: Disallowed import - org.apache.accumulo.core.cli.BatchWriterOpts.
</pre>
VS the old output
<pre>
[ERROR] src/main/java/org/apache/accumulo/testing/stress/ScanOpts.java:[19] (regexp) RegexpSinglelineJava: Accumulo non-public classes imported
[ERROR] src/main/java/org/apache/accumulo/testing/stress/WriteOptions.java:[19] (regexp) RegexpSinglelineJava: Accumulo non-public classes imported
[ERROR] src/main/java/org/apache/accumulo/testing/stress/Write.java:[19] (regexp) RegexpSinglelineJava: Accumulo non-public classes imported
</pre>
There are a lot of crazy things you can do with the [import-control checkstyle rule](http://checkstyle.sourceforge.net/config_imports.html#ImportControl) but this was the best I could come up with...
I also upgraded the checkstyle plugin to 3.0.0 and made it use the latest checkstyle dependency 8.17.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services