Skip to content

Commit c954d6a

Browse files
authored
Merge pull request #177 from jabbink/fix/checkstyle
Fix the checkstyle config to not break other modules
2 parents 5a7fcc4 + c7e4b65 commit c954d6a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ protobuf {
6262
}
6363
}
6464

65-
def checkstyleOutputDir = "${project.rootDir}/build/reports/checkstyle/"
65+
def checkstyleOutputDir = "${project.projectDir}/build/reports/checkstyle/"
6666

6767
checkstyle {
6868
toolVersion = '7.0'
69-
configFile = file("${project.rootDir}/config/checkstyle.xml")
69+
configFile = file("${project.projectDir}/config/checkstyle.xml")
70+
configProperties = [ "suppressionFile" : file("${project.projectDir}/config/suppressions.xml")]
7071
reportsDir = file(checkstyleOutputDir)
7172

7273
ignoreFailures = false
@@ -115,4 +116,4 @@ task sourcesJar(type: Jar) {
115116

116117
artifacts {
117118
archives sourcesJar
118-
}
119+
}

config/checkstyle.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<module name = "Checker">
1818
<module name="SuppressionFilter">
19-
<property name="file" value="config/suppressions.xml"/>
19+
<property name="file" value="${suppressionFile}"/>
2020
</module>
2121

2222
<property name="charset" value="UTF-8"/>
@@ -204,4 +204,4 @@
204204
</module>
205205
<module name="CommentsIndentation"/>
206206
</module>
207-
</module>
207+
</module>

0 commit comments

Comments
 (0)