1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 11:02:35 +01:00

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:
Stypox 2022-03-18 19:58:59 +01:00
parent e29aaaf162
commit 710964b47d
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
3 changed files with 3 additions and 18 deletions

View File

@ -98,7 +98,7 @@ android {
} }
ext { ext {
checkstyleVersion = '9.3' checkstyleVersion = '10.0'
androidxLifecycleVersion = '2.3.1' androidxLifecycleVersion = '2.3.1'
androidxRoomVersion = '2.4.2' androidxRoomVersion = '2.4.2'
@ -121,7 +121,7 @@ configurations {
} }
checkstyle { checkstyle {
getConfigDirectory().set(rootProject.file(".")) getConfigDirectory().set(rootProject.file("checkstyle"))
ignoreFailures false ignoreFailures false
showViolations true showViolations true
toolVersion = checkstyleVersion toolVersion = checkstyleVersion

View File

@ -22,7 +22,7 @@
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter --> <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="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"/> <property name="optional" value="true"/>
</module> </module>
@ -180,12 +180,5 @@
<module name="UpperEll"/> <module name="UpperEll"/>
<module name="SuppressWarningsHolder" /> <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>
</module> </module>

View File

@ -7,18 +7,10 @@
files="LocalItemListAdapter.java" files="LocalItemListAdapter.java"
lines="232,304"/> lines="232,304"/>
<suppress checks="FinalParameters"
files="InfoListAdapter.java"
lines="253,325"/>
<suppress checks="EmptyBlock" <suppress checks="EmptyBlock"
files="ContentSettingsFragment.java" files="ContentSettingsFragment.java"
lines="227,245"/> lines="227,245"/>
<suppress checks="LineLength"
files="WebMWriter.java"
lines="156,158"/>
<suppress checks="FileLength" <suppress checks="FileLength"
files="Player.java"/> files="Player.java"/>