Skip to content

fix(plugin): clear the detekt and ktlint errors failing preMerge - #903

Merged
kdroidFilter merged 1 commit into
NucleusFramework:nucleus-3.0from
sproctor:fix/ci-lint-errors
Nov 2, 2026
Merged

kdroidFilter merged 1 commit into
NucleusFramework:nucleus-3.0from
sproctor:fix/ci-lint-errors

Conversation

@sproctor

@sproctor sproctor commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Description

preMerge has been red on nucleus-3.0 since the Flathub work landed, which fails the gradle job on every PR and skips the jobs behind it (test-packaging, test-graalvm, tao-headful, tao-a11y). This fixes the three lint errors. Behaviour doesn't change.

Minimal reproduction

./gradlew preMerge

Setup: nucleus-3.0 at d975bba, Ubuntu locally, and the gradle job of that commit's run on GitHub (run 41461175754).

Actual result:

e: .../internal/FlathubRepository.kt:216:87 Calling !! on a nullable type will throw a NullPointerException at runtime in case the value is null. It should be avoided. [UnsafeCallOnNullableType]
e: .../tasks/AbstractGenerateFlathubRepositoryTask.kt:135:51 "%02x".format(it) uses implicitly default locale for string formatting. [ImplicitDefaultLocale]
examples/lab/app/build.gradle.kts:234:121 Exceeded max line length (120) (cannot be auto-corrected) (standard:max-line-length)

Root cause and fix

  • FlathubRepository: the URL list kept nullable values through a filter, so it needed !! afterwards. mapNotNull drops the nulls and keeps the type non-null.
  • AbstractGenerateFlathubRepositoryTask: uses Locale.ROOT, like the other %02x digests in the plugin.
  • examples/lab/app/build.gradle.kts: splits the screenshot base URL across two lines. The resulting string is the same.

Testing

On Ubuntu Linux: ./gradlew preMerge --continue fails with the three errors above before this change and passes after it.

Not tested: Flathub generation end to end, and macOS or Windows. Nothing here is platform-specific.

Checklist

  • Targets nucleus-3.0
  • Feature: discussed first in a GitHub discussion (linked above)
  • One change, no unrelated reformatting
  • ./gradlew preMerge passes
  • Public API has KDoc, apiDump committed if the API changed
  • I understand every line of this change and can answer review questions about it, whether or not AI tools were used
  • Breaking change (explain above)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kdroidFilter
kdroidFilter merged commit 3e0c8c6 into NucleusFramework:nucleus-3.0 Nov 2, 2026
17 checks passed
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