Update checkstyle to 10.0 and fix various related issues
- Put checkstyle files into checkstyle/ subfolder so that the gradle task does not implicitly depend on the whole project, fixing many warnings during build and possibly increasing build performance. - Remove unused SuppressionXpathFilter from config file. - Remove outdated suppressions from suppressions file.
This commit is contained in:
parent
e29aaaf162
commit
710964b47d
|
@ -98,7 +98,7 @@ android {
|
|||
}
|
||||
|
||||
ext {
|
||||
checkstyleVersion = '9.3'
|
||||
checkstyleVersion = '10.0'
|
||||
|
||||
androidxLifecycleVersion = '2.3.1'
|
||||
androidxRoomVersion = '2.4.2'
|
||||
|
@ -121,7 +121,7 @@ configurations {
|
|||
}
|
||||
|
||||
checkstyle {
|
||||
getConfigDirectory().set(rootProject.file("."))
|
||||
getConfigDirectory().set(rootProject.file("checkstyle"))
|
||||
ignoreFailures false
|
||||
showViolations true
|
||||
toolVersion = checkstyleVersion
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="${config_loc}/checkstyle-suppressions.xml" />
|
||||
<property name="file" value="${config_loc}/suppressions.xml" />
|
||||
<property name="optional" value="true"/>
|
||||
</module>
|
||||
|
||||
|
@ -180,12 +180,5 @@
|
|||
<module name="UpperEll"/>
|
||||
|
||||
<module name="SuppressWarningsHolder" />
|
||||
|
||||
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
|
||||
<module name="SuppressionXpathFilter">
|
||||
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
|
||||
default="checkstyle-xpath-suppressions.xml" />
|
||||
<property name="optional" value="true"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
|
@ -7,18 +7,10 @@
|
|||
files="LocalItemListAdapter.java"
|
||||
lines="232,304"/>
|
||||
|
||||
<suppress checks="FinalParameters"
|
||||
files="InfoListAdapter.java"
|
||||
lines="253,325"/>
|
||||
|
||||
<suppress checks="EmptyBlock"
|
||||
files="ContentSettingsFragment.java"
|
||||
lines="227,245"/>
|
||||
|
||||
<suppress checks="LineLength"
|
||||
files="WebMWriter.java"
|
||||
lines="156,158"/>
|
||||
|
||||
<suppress checks="FileLength"
|
||||
files="Player.java"/>
|
||||
|
Loading…
Reference in New Issue