Skip to content

chore: fix lint config noise and resolve 9.3.1 findings - #3048

Merged
StylianosGakis merged 3 commits into
developfrom
chore/lint-baseline-9.3.1-cleanup
Aug 13, 2026
Merged

chore: fix lint config noise and resolve 9.3.1 findings#3048
StylianosGakis merged 3 commits into
developfrom
chore/lint-baseline-9.3.1-cleanup

Conversation

@StylianosGakis

@StylianosGakis StylianosGakis commented Aug 12, 2026

Copy link
Copy Markdown
Member

Lint hygiene, split out from unrelated branch work. Two self-contained commits, reviewable individually.

Baseline regeneration was moved to the stacked follow-up PR #3049 (which is based on this branch), so this PR is only the substantive fixes.

1. Fix spurious UnknownIssueId noise from shared lint config

HedvigLintConventionPlugin disabled androidx.media3.common.util.UnstableApi, which is the opt-in annotation FQN, not a lint issue id (the id is UnsafeOptInUsageError, already handled correctly by lint.xml). Every module's baseline collected UnknownIssueId entries as a result. Since lint.xml is shared across all modules, it also references UnsafeOptInUsageError, which is only registered where a dependency bundles that check, producing more UnknownIssueId in other modules. Fixed by removing the bad disable entry and ignoring UnknownIssueId in the shared config.

2. Fix the 18 findings surfaced by lint 9.3.1

Pre-existing issues newly detected by newer lint checks (the stale baselines were built on lint 8.8.0). Fixed in code rather than baselined:

  • UseKtx (9): Uri.parse -> String.toUri; Bitmap.createBitmap/setPixel -> KTX createBitmap/Bitmap.set (app, feature-chat, feature-login)
  • UnusedResources (5): removed unused debug-only URL string resources (verified no source references)
  • ModifierParameter (1): modifier is now the first optional parameter in ReminderCardEnableNotifications
  • TextConcatSpace (1): stopped splitting a word across a string concatenation in design-showcase sample data
  • SystemPermissionTypo (1): suppressed locally on the debug-only receiver whose android:permission="@null" is deliberate (false positive)

Verified: :app, :feature-chat, :feature-login, :member-reminders-ui, :design-showcase all report "Lint found no errors or warnings".

The convention plugin disabled 'androidx.media3.common.util.UnstableApi',
which is the opt-in annotation FQN, not a lint issue id, so every module's
baseline collected UnknownIssueId entries. The media3 opt-in is already
handled correctly by lint.xml's UnsafeOptInUsageError + opt-in option.

Since lint.xml is shared across all modules, it also references
UnsafeOptInUsageError, which is only registered where a dependency bundles
that check; in other modules that reference produced UnknownIssueId too.
Ignore UnknownIssueId in the shared config and clear the affected baselines.
These were pre-existing issues detected by newer lint checks that the
stale baselines (generated on lint 8.8.0) never captured. Fixed in code
rather than baselined:

- UseKtx: Uri.parse -> String.toUri, Bitmap.createBitmap -> createBitmap
  KTX, Bitmap.setPixel -> Bitmap.set operator (app, feature-chat,
  feature-login).
- UnusedResources: remove 5 unused debug-only URL string resources.
- ModifierParameter: make modifier the first optional parameter in
  ReminderCardEnableNotifications.
- TextConcatSpace: stop splitting a word across a string concatenation
  in design-showcase sample data.
- SystemPermissionTypo: suppress locally on the debug-only receiver whose
  android:permission="@null" is deliberate (false positive).
@StylianosGakis
StylianosGakis requested a review from a team as a code owner August 12, 2026 20:15
@StylianosGakis
StylianosGakis force-pushed the chore/lint-baseline-9.3.1-cleanup branch from 7a5e3b4 to 9a5a65b Compare August 13, 2026 07:02
@StylianosGakis StylianosGakis changed the title chore: fix lint config noise, resolve 9.3.1 findings, unify baselines chore: fix lint config noise and resolve 9.3.1 findings Aug 13, 2026
The KMP-android variant registers no runnable lint task, so the shared lint
config applied to these modules is inert and their baselines are neither
enforced nor regenerable. Documented at the wiring site to prevent confusion.
@StylianosGakis
StylianosGakis merged commit 14426cf into develop Aug 13, 2026
4 checks passed
@StylianosGakis
StylianosGakis deleted the chore/lint-baseline-9.3.1-cleanup branch August 13, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants