Three public members have no callers, and F5 is a fourth: decide each rather than test them #253

Open
opened 2026-09-06 19:20:39 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-09-06 19:20:39 +00:00 (Migrated from github.com)

Found by the first-ever instrumented coverage measurement (2026-09-06), from the union of the JVM
and device suites — the only view that can tell "no test calls this" from "only a device calls it".

Three public members have no callers anywhere in app/src/main, app/src/test or
app/src/androidTest
:

app/src/main/java/org/libremediaconverter/model/CopyPlanner.kt:28   val hasVideo
app/src/main/java/org/libremediaconverter/model/OutputFormat.kt:222 val videoCodec
app/src/main/java/org/libremediaconverter/model/OutputFormat.kt:223 val audioCodec

OutputFormat.container on the line directly above :222 is called, which is what makes the
other two visible rather than looking like a whole unused block.

This is the same family as docs/coverage-read-findings.md F5
(ConversionNotifications.areEnabled(), no callers) — and F5's three lines are in the same
32-line set, so the two should be decided together.

Why this is not "write a test"

Testing an uncalled getter asserts that Kotlin generates getters. The question is whether each
member is wanted: hasVideo reads as the natural pair to CopyPlanner's isPureRemux above
it and may be a genuine oversight at a call site; OutputFormat.videoCodec/audioCodec are
convenience delegates to spec, and callers may simply be reaching through spec instead.

Acceptance criterion

For each of the four (these three plus F5's areEnabled): delete it, or name the caller that
should exist and add it. If any is kept deliberately, it needs a KDoc line saying so — an
uncalled public member with no explanation is indistinguishable from a bug at the call site
that should have used it.

Found by the first-ever instrumented coverage measurement (2026-09-06), from the union of the JVM and device suites — the only view that can tell "no test calls this" from "only a device calls it". Three public members have **no callers anywhere in `app/src/main`, `app/src/test` or `app/src/androidTest`**: ``` app/src/main/java/org/libremediaconverter/model/CopyPlanner.kt:28 val hasVideo app/src/main/java/org/libremediaconverter/model/OutputFormat.kt:222 val videoCodec app/src/main/java/org/libremediaconverter/model/OutputFormat.kt:223 val audioCodec ``` `OutputFormat.container` on the line directly above :222 **is** called, which is what makes the other two visible rather than looking like a whole unused block. This is the same family as `docs/coverage-read-findings.md` **F5** (`ConversionNotifications.areEnabled()`, no callers) — and F5's three lines are in the same 32-line set, so the two should be decided together. ## Why this is not "write a test" Testing an uncalled getter asserts that Kotlin generates getters. The question is whether each member is **wanted**: `hasVideo` reads as the natural pair to `CopyPlanner`'s `isPureRemux` above it and may be a genuine oversight at a call site; `OutputFormat.videoCodec`/`audioCodec` are convenience delegates to `spec`, and callers may simply be reaching through `spec` instead. ## Acceptance criterion For each of the four (these three plus F5's `areEnabled`): delete it, or name the caller that should exist and add it. If any is kept deliberately, it needs a KDoc line saying so — an uncalled public member with no explanation is indistinguishable from a bug at the call site that should have used it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMediaConverter#253