diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy index d4d4d08c393..1cdeec762d2 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy @@ -94,6 +94,9 @@ class PrecommitTasks { project.checkstyle { config = project.resources.text.fromFile( PrecommitTasks.getResource('/checkstyle.xml'), 'UTF-8') + configProperties = [ + suppressions: PrecommitTasks.getResource('/checkstyle_suppressions.xml') + ] } for (String taskName : ['checkstyleMain', 'checkstyleTest']) { Task task = project.tasks.findByName(taskName) diff --git a/buildSrc/src/main/resources/checkstyle.xml b/buildSrc/src/main/resources/checkstyle.xml index b44c649a52b..4dd0534fa01 100644 --- a/buildSrc/src/main/resources/checkstyle.xml +++ b/buildSrc/src/main/resources/checkstyle.xml @@ -6,6 +6,10 @@ + + + + + + +