ci: add Spotless/detekt quality gate and a Linux test leg - #28
Conversation
Closes #3. B — Formatting + static analysis (§7.1/§7.2): - Add Spotless (com.diffplug.spotless 8.8.0) with ktlint 1.8.0 over src/**/*.kt and the Gradle build scripts. ktlint reads .editorconfig, keeping that file the single source of Kotlin style. - Add detekt 1.23.8 (buildUponDefaultConfig=true) with a small config/detekt/detekt.yml. KMP has no main/test source sets, so detekt is pointed at the src/ tree directly. - Run spotlessApply and commit the reformatting (pure ktlint churn across the codec, all whitespace/wrapping — no behavior change) BEFORE wiring the check, so CI's spotlessCheck is green from the first run. - Pre-existing findings in the RFC 8878 engine (lifted verbatim from TAKPacket-SDK) are captured in config/detekt/baseline.xml so the gate blocks NEW issues while the engine is cleaned up incrementally. - Add a per-file .editorconfig override turning max-line-length off for the Base64/hex fixtures in TestVectors.kt. D — Linux test leg (§4.2/§5.1): - Add an ubuntu-latest job that actually EXECUTES the JVM/JS/Wasm/linuxX64 tests (jvmTest jsTest wasmJsTest wasmWasiTest linuxX64Test) plus spotlessCheck, detekt and apiCheck. The existing macos-latest job (required status check) is kept unchanged for the Apple/native targets. - Reuse the repo's SHA-pinned action refs; cache ~/.konan for linuxX64Test. New CI job name: "Quality gate & Linux tests (JVM/JS/Wasm/linuxX64)". Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #3.
Wires the two standard quality gaps into the build + CI in one PR.
B — Spotless (ktlint) + detekt (§7.1 / §7.2)
com.diffplug.spotless8.8.0 with ktlint 1.8.0 oversrc/**/*.ktand the Gradle build scripts. ktlint reads.editorconfig, so that file stays the single source of Kotlin style.buildUponDefaultConfig = true, with a smallconfig/detekt/detekt.yml. KMP has nomain/testsource sets, so detekt is pointed at thesrc/tree directly.spotlessApplywas run and the reformatting committed before the check was wired (the.editorconfig/ktlint lesson) — pure ktlint whitespace/wrapping churn across the codec, no behavior change.config/detekt/baseline.xml(11 issues) so the gate blocks new issues while the engine is cleaned up incrementally..editorconfigoverride turnsmax-line-lengthoff for the Base64/hex fixtures inTestVectors.kt.Verified locally on JDK 21:
./gradlew spotlessCheck detekt→ BUILD SUCCESSFUL.D — Linux test leg (§4.2 / §5.1)
ubuntu-latestjob that actually executes the JVM/JS/Wasm/linuxX64 tests (jvmTest jsTest wasmJsTest wasmWasiTest linuxX64Test) plusspotlessCheck detekt apiCheck. Today's singlemacos-latestrunner cross-compiles thelinuxX64test binary but never runs it — this closes that gap.macos-latestjob is kept unchanged for the Apple/native targets (it is the required status check — not renamed/removed).~/.konanforlinuxX64Test.New CI job name
Quality gate & Linux tests (JVM/JS/Wasm/linuxX64)— consider adding it to the branch-protection ruleset as a required status check alongside the existingBuild, test & API check (all KMP targets).