kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Merge pull request #8073 from Stypox/bump-checkstyle
Update checkstyle to 10.0 and fix various related issuespull/8076/head
commit
70d9a77e9b
|
@ -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
|
||||
|
|
|
@ -228,6 +228,7 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
return count;
|
||||
}
|
||||
|
||||
@SuppressWarnings("FinalParameters")
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if (DEBUG) {
|
||||
|
@ -300,6 +301,7 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("FinalParameters")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) {
|
||||
if (DEBUG) {
|
||||
|
|
|
@ -682,6 +682,7 @@ public final class Player implements
|
|||
//////////////////////////////////////////////////////////////////////////*/
|
||||
//region Playback initialization via intent
|
||||
|
||||
@SuppressWarnings("MethodLength")
|
||||
public void handleIntent(@NonNull final Intent intent) {
|
||||
// fail fast if no play queue was provided
|
||||
final String queueCache = intent.getStringExtra(PLAY_QUEUE_KEY);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class PlayQueueItem implements Serializable {
|
|||
item.getUploaderUrl(), item.getStreamType());
|
||||
}
|
||||
|
||||
@SuppressWarnings("ParameterNumber")
|
||||
private PlayQueueItem(@Nullable final String name, @Nullable final String url,
|
||||
final int serviceId, final long duration,
|
||||
@Nullable final String thumbnailUrl, @Nullable final String uploader,
|
||||
|
|
|
@ -142,6 +142,7 @@ public class Mp4FromDashWriter {
|
|||
outStream = null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("MethodLength")
|
||||
public void build(final SharpStream output) throws IOException {
|
||||
if (done) {
|
||||
throw new RuntimeException("already done");
|
||||
|
|
|
@ -121,6 +121,7 @@ public class WebMWriter implements Closeable {
|
|||
clustersOffsetsSizes = null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("MethodLength")
|
||||
public void build(final SharpStream out) throws IOException, RuntimeException {
|
||||
if (!out.canRewind()) {
|
||||
throw new IOException("The output stream must be allow seek");
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE suppressions PUBLIC
|
||||
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||
<suppressions>
|
||||
<suppress checks="FinalParameters"
|
||||
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"/>
|
||||
|
||||
<suppress checks="FileLength"
|
||||
files="VideoDetailFragment.java"/>
|
||||
</suppressions>
|
|
@ -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>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE suppressions PUBLIC
|
||||
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||
<suppressions>
|
||||
<!-- Use @SuppressWarnings("...") if it is possible, only use this file if it is not -->
|
||||
|
||||
<suppress checks="FileLength"
|
||||
files="Player.java"/>
|
||||
|
||||
<suppress checks="FileLength"
|
||||
files="VideoDetailFragment.java"/>
|
||||
</suppressions>
|
Ładowanie…
Reference in New Issue