Parcourir la source

Fix remote cache misses for checkstyle tasks (#45512)

Mark Vieira il y a 6 ans
Parent
commit
ae5919b2c8

+ 1 - 5
buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

@@ -237,16 +237,12 @@ class PrecommitTasks {
         // on them. We also want `precommit` to depend on `checkstyle`.
         project.pluginManager.apply('checkstyle')
         project.checkstyle {
-            config = project.resources.text.fromFile(checkstyleConf, 'UTF-8')
-            configProperties = [
-                    suppressions: checkstyleSuppressions
-            ]
+            configDir = checkstyleDir
             toolVersion = CHECKSTYLE_VERSION
         }
 
         project.tasks.withType(Checkstyle).configureEach { task ->
             task.dependsOn(copyCheckstyleConf)
-            task.inputs.file(checkstyleSuppressions)
             task.reports {
                 html.enabled false
             }

+ 1 - 1
buildSrc/src/main/resources/checkstyle.xml

@@ -7,7 +7,7 @@
   <property name="charset" value="UTF-8" />
 
   <module name="SuppressionFilter">
-    <property name="file" value="${suppressions}" />
+    <property name="file" value="${config_loc}/checkstyle_suppressions.xml" />
   </module>
 
   <!-- Checks Java files and forbids empty Javadoc comments -->