diff --git a/contrib/checkstyle/src/mill/contrib/checkstyle/CheckstyleXsltModule.scala b/contrib/checkstyle/src/mill/contrib/checkstyle/CheckstyleXsltModule.scala index 0fbc073644a..8a0b7021d2f 100644 --- a/contrib/checkstyle/src/mill/contrib/checkstyle/CheckstyleXsltModule.scala +++ b/contrib/checkstyle/src/mill/contrib/checkstyle/CheckstyleXsltModule.scala @@ -47,6 +47,12 @@ trait CheckstyleXsltModule extends CheckstyleModule { */ final override def checkstyleFormat: T[String] = "xml" + /** + * Folder containing the XSLT transformations. Defaults to `checkstyle-xslt` + * in the workspace root, but can be overriden on a per-module basis + */ + def checkstyleXsltfFolder = T.source(T.workspace / "checkstyle-xslt") + /** * Set of [[CheckstyleXsltReport]]s. * @@ -69,7 +75,7 @@ trait CheckstyleXsltModule extends CheckstyleModule { * }}} */ def checkstyleXsltReports: T[Set[CheckstyleXsltReport]] = T { - val dir = millSourcePath / "checkstyle-xslt" + val dir = checkstyleXsltfFolder().path if (os.exists(dir)) { val dest = T.dest