Merge pull request #16394 from nik9000/painless_generated_skip_checkstyle
Suppress checkstyle on generated files in painless
This commit is contained in:
commit
60552732d1
|
@ -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)
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
<module name="Checker">
|
||||
<property name="charset" value="UTF-8" />
|
||||
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="${suppressions}" />
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<!-- ~3500 violations
|
||||
<module name="LineLength">
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE suppressions PUBLIC
|
||||
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||
|
||||
<suppressions>
|
||||
<!-- These files are generated by ANTLR so its silly to hold them to our rules. -->
|
||||
<suppress files="org/elasticsearch/painless/PainlessLexer\.java" checks="." />
|
||||
<suppress files="org/elasticsearch/painless/PainlessParser(|BaseVisitor|Visitor)\.java" checks="." />
|
||||
</suppressions>
|
Loading…
Reference in New Issue