Skip to content

Commit

Permalink
Legitimately suppress remaining checkstyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Mar 18, 2022
1 parent 9ee52ae commit 494fec2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
15 changes: 15 additions & 0 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="LineLength"
files="BandcampExtractorHelper.java"
lines="54"/>

<suppress checks="LineLength"
files="ItagItem.java"
lines="19"/>
</suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Static data about various media formats support by NewPipe, eg mime type, extension
*/

@SuppressWarnings("MethodParamPad") // we want the media format table below to be aligned
public enum MediaFormat {
// @formatter:off
//video and audio combined formats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/**
* A list of supported services.
*/
@SuppressWarnings({"ConstantName", "InnerAssignment"}) // keep unusual names and inner assignments
public final class ServiceList {
private ServiceList() {
//no instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class YoutubeThrottlingDecrypter {
"b=a\\.get\\(\"n\"\\)\\)&&\\(b=(\\S+)\\(b\\),a\\.set\\(\"n\",b\\)");

private static final Map<String, String> N_PARAMS_CACHE = new HashMap<>();
private static String FUNCTION;
private static String FUNCTION_NAME;
@SuppressWarnings("StaticVariableName") private static String FUNCTION;
@SuppressWarnings("StaticVariableName") private static String FUNCTION_NAME;

private final String functionName;
private final String function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public InfoItemsPage<InfoItem> getPage(final Page page)
return new InfoItemsPage<>(collector, getNextPageFrom(continuations));
}

@SuppressWarnings("MethodLength")
private void collectMusicStreamsFrom(final InfoItemsSearchCollector collector,
@Nonnull final JsonArray videos) {
final TimeAgoParser timeAgoParser = getTimeAgoParser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public String getUrl(final String id) {
return "https://www.youtube.com/watch?v=" + id;
}

@SuppressWarnings("AvoidNestedBlocks")
@Override
public String getId(final String theUrlString)
throws ParsingException, IllegalArgumentException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ private static void extractStreams(final StreamInfo streamInfo, final StreamExtr
}
}

@SuppressWarnings("MethodLength")
private static void extractOptionalData(final StreamInfo streamInfo,
final StreamExtractor extractor) {
/* ---- optional data goes here: ---- */
Expand Down

0 comments on commit 494fec2

Please sign in to comment.