-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set `check = true` and `stdout = true` by default since that's what I'm guessing people will expect * Extract out `def checkstyleHandleErrors` and `def checkstyle0` for re-use between `CheckstyleModule` and `CheckstyleXsltModule`. This allows `def checkstyle` to throw errors and report to console while still generating the XSLT reports in `CheckstyleXsltModule` * Avoid reporting `no violations` when exit code is zero, because there may still be warnings * Integrate the example test from @m50d's checkstyle PR #3472, flesh it out, and integrate it into the docsite
- Loading branch information
Showing
18 changed files
with
530 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
= Linting Java Projects | ||
|
||
++++ | ||
<script> | ||
gtag('config', 'AW-16649289906'); | ||
</script> | ||
++++ | ||
|
||
This page will discuss common topics around working with test suites using the Mill build tool | ||
|
||
== ErrorProne | ||
|
||
include::example/javalib/linting/1-error-prone.adoc[] | ||
|
||
== Checkstyle | ||
|
||
include::example/javalib/linting/2-checkstyle.adoc[] | ||
|
||
== Jacoco Code Coverage | ||
|
||
Mill supports Java code coverage analysis via the mill-jacoco plugin. See the | ||
plugin repository documentation for more details: | ||
|
||
* https://github.com/lefou/mill-jacoco |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package build | ||
import mill._, javalib._ | ||
import $ivy.`com.lihaoyi::mill-contrib-checkstyle:` | ||
|
||
import mill.contrib.checkstyle._ | ||
|
||
object `package` extends RootModule with CheckstyleModule { | ||
def checkstyleVersion = "9.3" | ||
} | ||
|
||
/** Usage | ||
|
||
> ./mill checkstyle # run checkstyle to produce a report, defaults to warning without error | ||
...src/InputWhitespaceCharacters.java:3:23: Line contains a tab character... | ||
...src/InputWhitespaceCharacters.java:16:3: Line contains a tab character... | ||
...src/InputFileName1.java:2:1: Top-level class MyAnnotation1 has to reside in its own source file... | ||
...src/InputFileName1.java:13:1: Top-level class Enum1 has to reside in its own source file... | ||
...src/InputFileName1.java:26:1: Top-level class TestRequireThisEnum has to reside in its own source file... | ||
Audit done. | ||
|
||
> sed -i.bak 's/warning/error/g' checkstyle-config.xml # make checkstyle error on violations | ||
|
||
> ./mill checkstyle | ||
error: ...src/InputWhitespaceCharacters.java:3:23: Line contains a tab character... | ||
...src/InputWhitespaceCharacters.java:16:3: Line contains a tab character... | ||
...src/InputFileName1.java:2:1: Top-level class MyAnnotation1 has to reside in its own source file... | ||
...src/InputFileName1.java:13:1: Top-level class Enum1 has to reside in its own source file... | ||
...src/InputFileName1.java:26:1: Top-level class TestRequireThisEnum has to reside in its own source file... | ||
Audit done. | ||
|
||
> sed -i.bak 's/\t/ /g' src/InputWhitespaceCharacters.java | ||
|
||
> rm src/InputFileName1.java | ||
|
||
> ./mill checkstyle # after fixing the violations, checkstyle no longer errors | ||
Audit done. | ||
*/ |
Oops, something went wrong.