Skip to content

Commit d5991d2

Browse files
dependabot[bot]Copilotbramp
authored
chore(deps): bump com.puppycrawl.tools:checkstyle from 10.23.1 to 13.4.0 (#400)
* chore(deps): bump com.puppycrawl.tools:checkstyle from 10.23.1 to 13.4.0 Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.23.1 to 13.4.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-10.23.1...checkstyle-13.4.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 13.4.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: move checkstyle to Java 21+ profile and suppress new 13.x checks Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/0088c37e-67da-4af5-b202-91c7db9438bb Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * chore: plan to fix violations instead of suppressing them Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/0088c37e-67da-4af5-b202-91c7db9438bb Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * Fix checkstyle violations: TODO colons and snake_case field renames - Add missing colons to all TODO comments in src/main/**/*.java - Rename subtitle_codec → subtitleCodec in AbstractFFmpegStreamBuilder - Rename pass_directory → passDirectory, pass_prefix → passPrefix, user_agent → userAgent, read_at_native_frame_rate → readAtNativeFrameRate, extra_args → extraArgs in FFmpegBuilder - Rename last_pts → lastPts in Stream.java and Frame.java Build: passes with Java 17 and Java 21 Checkstyle: 0 violations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * Remove now-unnecessary TodoComment suppression for src/main All TODO comments in src/main have been updated to include colons, so the blanket suppression is no longer needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * revert: undo private/package-private field renames in builder and nut packages Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/86d0454c-0b0c-4c94-86f9-5a9aac6a30ed Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * plan: remove now-unnecessary SummaryJavadoc suppression Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/6ced5075-aa6e-49cb-88d9-80156cb38817 Co-authored-by: bramp <160627+bramp@users.noreply.github.com> * fix: fix Javadoc summaries in builder/ instead of suppressing SummaryJavadoc check Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/6ced5075-aa6e-49cb-88d9-80156cb38817 Co-authored-by: bramp <160627+bramp@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bramp <160627+bramp@users.noreply.github.com>
1 parent cd9df1c commit d5991d2

29 files changed

Lines changed: 76 additions & 72 deletions

checkstyle-suppressions.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
files="FF|CRC32"/>
1212

1313
<!-- Probe/builder/options/progress fields use snake_case to match FFmpeg's JSON API -->
14-
<suppress checks="MemberName"
14+
<suppress checks="MemberName|GoogleNonConstantFieldName"
1515
files="(probe|builder|options|progress)[\\/]"/>
1616
<suppress checks="ParameterName"
1717
files="(probe|builder|options|progress)[\\/]"/>
1818

1919
<!-- NUT format parser uses spec-matching names for readability -->
20-
<suppress checks="MemberName|ParameterName|LocalVariableName|AbbreviationAsWordInName"
20+
<suppress checks="MemberName|ParameterName|LocalVariableName|AbbreviationAsWordInName|GoogleNonConstantFieldName"
2121
files="nut[\\/]"/>
22+
2223
</suppressions>

pom.xml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
<dependency>
293293
<groupId>com.puppycrawl.tools</groupId>
294294
<artifactId>checkstyle</artifactId>
295-
<version>10.23.1</version>
295+
<version>13.4.0</version>
296296
</dependency>
297297
</dependencies>
298298
<configuration>
@@ -544,19 +544,6 @@
544544
</execution>
545545
</executions>
546546
</plugin>
547-
<plugin>
548-
<groupId>org.apache.maven.plugins</groupId>
549-
<artifactId>maven-checkstyle-plugin</artifactId>
550-
<executions>
551-
<execution>
552-
<id>checkstyle</id>
553-
<phase>verify</phase>
554-
<goals>
555-
<goal>check</goal>
556-
</goals>
557-
</execution>
558-
</executions>
559-
</plugin>
560547
</plugins>
561548
</build>
562549
</profile>
@@ -593,6 +580,22 @@
593580
</plugin>
594581
</plugins>
595582
</pluginManagement>
583+
<plugins>
584+
<!-- Checkstyle 13.x requires Java 21+, so bind it only here -->
585+
<plugin>
586+
<groupId>org.apache.maven.plugins</groupId>
587+
<artifactId>maven-checkstyle-plugin</artifactId>
588+
<executions>
589+
<execution>
590+
<id>checkstyle</id>
591+
<phase>verify</phase>
592+
<goals>
593+
<goal>check</goal>
594+
</goals>
595+
</execution>
596+
</executions>
597+
</plugin>
598+
</plugins>
596599
</build>
597600
</profile>
598601
</profiles>

src/main/java/net/bramp/commons/lang3/math/gson/FractionAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public class FractionAdapter extends TypeAdapter<Fraction> {
1818

1919
/** If set, 0/0 returns this value, instead of throwing a ArithmeticException. */
2020
@SuppressWarnings(
21-
"Immutable") // TODO Remove when https://github.com/google/error-prone/issues/512 is fixed
21+
"Immutable") // TODO: Remove when https://github.com/google/error-prone/issues/512 is fixed
2222
private final Fraction zeroByZero;
2323

2424
/** If set, N/0 returns this value, instead of throwing a ArithmeticException. */
2525
@SuppressWarnings(
26-
"Immutable") // TODO Remove when https://github.com/google/error-prone/issues/512 is fixed
26+
"Immutable") // TODO: Remove when https://github.com/google/error-prone/issues/512 is fixed
2727
private final Fraction divideByZero;
2828

2929
/** Constructs a FractionAdapter with default zero values for edge cases. */

src/main/java/net/bramp/ffmpeg/FFcommon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected BufferedReader wrapErrorInReader(Process p) {
7272
protected void throwOnError(Process p) throws IOException {
7373
try {
7474
if (ProcessUtils.waitForWithTimeout(p, 1, TimeUnit.SECONDS) != 0) {
75-
// TODO Parse the error
75+
// TODO: Parse the error
7676
throw new IOException(path + " returned non-zero exit status. Check stdout.");
7777
}
7878
} catch (TimeoutException e) {
@@ -83,7 +83,7 @@ protected void throwOnError(Process p) throws IOException {
8383
protected void throwOnError(Process p, FFmpegProbeResult result) throws IOException {
8484
try {
8585
if (ProcessUtils.waitForWithTimeout(p, 1, TimeUnit.SECONDS) != 0) {
86-
// TODO Parse the error
86+
// TODO: Parse the error
8787
final FFmpegError ffmpegError = null == result ? null : result.getError();
8888
throw new FFmpegException(
8989
path + " returned non-zero exit status. Check stdout.", ffmpegError);
@@ -143,7 +143,7 @@ public void run(List<String> args) throws IOException {
143143
assert (p != null);
144144

145145
try {
146-
// TODO Move the copy onto a thread, so that FFmpegProgressListener can be on this thread.
146+
// TODO: Move the copy onto a thread, so that FFmpegProgressListener can be on this thread.
147147

148148
// Now block reading ffmpeg's stdout. We are effectively throwing away the output.
149149
CharStreams.copy(wrapInReader(p), processOutputStream);

src/main/java/net/bramp/ffmpeg/FFmpeg.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public synchronized List<ChannelLayout> channelLayouts() throws IOException {
293293

294294
/** Creates a progress parser for the given listener. */
295295
protected ProgressParser createProgressParser(ProgressListener listener) throws IOException {
296-
// TODO In future create the best kind for this OS, unix socket, named pipe, or TCP.
296+
// TODO: In future create the best kind for this OS, unix socket, named pipe, or TCP.
297297
try {
298298
// Default to TCP because it is supported across all OSes, and is better than UDP because it
299299
// provides good properties such as in-order packets, reliability, error checking, etc.

src/main/java/net/bramp/ffmpeg/FFmpegUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static String toTimecode(long duration, TimeUnit units) {
6363
duration = Math.abs(duration);
6464
}
6565

66-
long nanoseconds = units.toNanos(duration); // TODO This will clip at Long.MAX_VALUE
66+
long nanoseconds = units.toNanos(duration); // TODO: This will clip at Long.MAX_VALUE
6767
long seconds = units.toSeconds(duration);
6868
long ns = nanoseconds - SECONDS.toNanos(seconds);
6969

src/main/java/net/bramp/ffmpeg/FFprobe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public FFmpegProbeResult probe(
7474
this.builder().setInput(mediaPath).setUserAgent(userAgent).addExtraArgs(extraArgs).build());
7575
}
7676

77-
// TODO Add Probe Inputstream
77+
// TODO: Add Probe Inputstream
7878
/** Probes media using the supplied arguments and returns the result. */
7979
public FFmpegProbeResult probe(List<String> args) throws IOException {
8080
checkIfFFprobe();

src/main/java/net/bramp/ffmpeg/builder/AbstractFFmpegOutputBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public T setAudioFilter(String filter) {
288288
@CheckReturnValue
289289
@Override
290290
public EncodingOptions buildOptions() {
291-
// TODO When/if modelmapper supports @ConstructorProperties, we map this
291+
// TODO: When/if modelmapper supports @ConstructorProperties, we map this
292292
// object, instead of doing new XXX(...)
293293
// https://github.com/jhalterman/modelmapper/issues/44
294294
return new EncodingOptions(
@@ -351,13 +351,13 @@ protected List<String> build(FFmpegBuilder parent, int pass) {
351351

352352
checkState(input != null, "Target size must be used with setInput(FFmpegProbeResult)");
353353

354-
// TODO factor in start time and/or number of frames
354+
// TODO: factor in start time and/or number of frames
355355

356356
double durationInSeconds = input.format.duration;
357357
long totalBitRate =
358358
(long) Math.floor((targetSize * 8) / durationInSeconds) - pass_padding_bitrate;
359359

360-
// TODO Calculate audioBitRate
360+
// TODO: Calculate audioBitRate
361361

362362
if (video_enabled && video_bit_rate == 0) {
363363
// Video (and possibly audio)

src/main/java/net/bramp/ffmpeg/builder/AbstractFFmpegStreamBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public abstract class AbstractFFmpegStreamBuilder<T extends AbstractFFmpegStream
104104
public long targetSize = 0; // in bytes
105105
public long pass_padding_bitrate = 1024; // in bits per second
106106

107-
public boolean throwWarnings = true; // TODO Either delete this, or apply it consistently
107+
public boolean throwWarnings = true; // TODO: Either delete this, or apply it consistently
108108

109109
/** Constructs a stream builder with no parent. */
110110
protected AbstractFFmpegStreamBuilder() {
@@ -759,7 +759,7 @@ protected void addVideoFlags(FFmpegBuilder parent, ImmutableList.Builder<String>
759759
args.add("-s", String.format("%dx%d", video_width, video_height));
760760
}
761761

762-
// TODO What if width is set but heigh isn't. We don't seem to do anything
762+
// TODO: What if width is set but heigh isn't. We don't seem to do anything
763763

764764
if (video_frame_rate != null) {
765765
args.add("-r", video_frame_rate.toString());

src/main/java/net/bramp/ffmpeg/builder/AudioCodec.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ public class AudioCodec {
213213
/** Monkey's Audio. */
214214
public static final String APE = "ape";
215215

216-
/** aptX (Audio Processing Technology for Bluetooth). */
216+
/** AptX (Audio Processing Technology for Bluetooth). */
217217
public static final String APTX = "aptx";
218218

219-
/** aptX HD (Audio Processing Technology for Bluetooth). */
219+
/** AptX HD (Audio Processing Technology for Bluetooth). */
220220
public static final String APTX_HD = "aptx_hd";
221221

222222
/** ATRAC1 (Adaptive TRansform Acoustic Coding). */
@@ -260,7 +260,7 @@ public class AudioCodec {
260260
/** Constrained Energy Lapped Transform (CELT). */
261261
public static final String CELT = "celt";
262262

263-
/** codec2 (very low bitrate speech codec). */
263+
/** Codec2 (very low bitrate speech codec). */
264264
public static final String CODEC2 = "codec2";
265265

266266
/** RFC 3389 Comfort Noise. */
@@ -344,7 +344,7 @@ public class AudioCodec {
344344
/** IAC (Indeo Audio Coder). */
345345
public static final String IAC = "iac";
346346

347-
/** iLBC (Internet Low Bitrate Codec). */
347+
/** ILBC (Internet Low Bitrate Codec). */
348348
public static final String ILBC = "ilbc";
349349

350350
/** IMC (Intel Music Coder). */

0 commit comments

Comments
 (0)