Skip to content

Commit bdadcfa

Browse files
Stypoxlitetex
authored andcommitted
Legitimately suppress remaining checkstyle warnings
1 parent 740a37a commit bdadcfa

File tree

7 files changed

+22
-2
lines changed

7 files changed

+22
-2
lines changed

checkstyle/suppressions.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE suppressions PUBLIC
3+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
4+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
5+
<suppressions>
6+
<!-- Use @SuppressWarnings("...") if it is possible, only use this file if it is not -->
7+
8+
<suppress checks="LineLength"
9+
files="BandcampExtractorHelper.java"
10+
lines="54"/>
11+
12+
<suppress checks="LineLength"
13+
files="ItagItem.java"
14+
lines="19"/>
15+
</suppressions>

extractor/src/main/java/org/schabi/newpipe/extractor/MediaFormat.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Static data about various media formats support by NewPipe, eg mime type, extension
3030
*/
3131

32+
@SuppressWarnings("MethodParamPad") // we want the media format table below to be aligned
3233
public enum MediaFormat {
3334
// @formatter:off
3435
//video and audio combined formats

extractor/src/main/java/org/schabi/newpipe/extractor/ServiceList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
/**
3232
* A list of supported services.
3333
*/
34+
@SuppressWarnings({"ConstantName", "InnerAssignment"}) // keep unusual names and inner assignments
3435
public final class ServiceList {
3536
private ServiceList() {
3637
//no instance

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingDecrypter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public class YoutubeThrottlingDecrypter {
3939
"b=a\\.get\\(\"n\"\\)\\)&&\\(b=(\\S+)\\(b\\),a\\.set\\(\"n\",b\\)");
4040

4141
private static final Map<String, String> N_PARAMS_CACHE = new HashMap<>();
42-
private static String FUNCTION;
43-
private static String FUNCTION_NAME;
42+
@SuppressWarnings("StaticVariableName") private static String FUNCTION;
43+
@SuppressWarnings("StaticVariableName") private static String FUNCTION_NAME;
4444

4545
private final String functionName;
4646
private final String function;

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMusicSearchExtractor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ public InfoItemsPage<InfoItem> getPage(final Page page)
279279
return new InfoItemsPage<>(collector, getNextPageFrom(continuations));
280280
}
281281

282+
@SuppressWarnings("MethodLength")
282283
private void collectMusicStreamsFrom(final MultiInfoItemsCollector collector,
283284
@Nonnull final JsonArray videos) {
284285
final TimeAgoParser timeAgoParser = getTimeAgoParser();

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public String getUrl(final String id) {
8181
return "https://www.youtube.com/watch?v=" + id;
8282
}
8383

84+
@SuppressWarnings("AvoidNestedBlocks")
8485
@Override
8586
public String getId(final String theUrlString)
8687
throws ParsingException, IllegalArgumentException {

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ private static void extractStreams(final StreamInfo streamInfo, final StreamExtr
211211
}
212212
}
213213

214+
@SuppressWarnings("MethodLength")
214215
private static void extractOptionalData(final StreamInfo streamInfo,
215216
final StreamExtractor extractor) {
216217
/* ---- optional data goes here: ---- */

0 commit comments

Comments
 (0)