Skip to content

chore(ci): add ktlint+detekt gates and upgrade toolchain#35

Merged
eltonvs merged 2 commits intomasterfrom
codex/ci-lint-stack-latest-v2
Feb 24, 2026
Merged

chore(ci): add ktlint+detekt gates and upgrade toolchain#35
eltonvs merged 2 commits intomasterfrom
codex/ci-lint-stack-latest-v2

Conversation

@eltonvs
Copy link
Owner

@eltonvs eltonvs commented Feb 24, 2026

Summary

  • upgrade build toolchain to latest stable (Gradle 9.3.1, Kotlin 2.3.10, coroutines 1.10.2)
  • add ktlint check/format support and enforce ktlint in CI
  • add detekt alpha gate in CI with baseline for existing findings
  • update CI workflow to run on pull_request + push to master with Java 25
  • document local verification commands in README

Validation

  • ./gradlew --no-daemon clean test ktlintCheck detekt
  • ./gradlew --no-daemon test ktlintCheck

Notes

  • detekt baseline is intentionally included to avoid blocking this rollout on legacy issues
  • .idea/local workspace changes were intentionally excluded from commits

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

This PR modernizes the build toolchain and adds static analysis gates. The changes upgrade Gradle from 7.4 to 9.3.1, Kotlin from 1.6.21 to 2.3.10, and coroutines from 1.3.3 to 1.10.2. Two new linting tools are integrated: ktlint for code formatting and detekt for static analysis.

All code changes are purely formatting-related from ktlint auto-formatting, including multi-line constructor parameters, explicit braces in when expressions, import ordering, and removal of extra blank lines. No logic changes were made to the codebase.

The CI workflow was modernized to use Java 25 with Temurin distribution and now runs verification on both PRs and pushes to master. A detekt baseline was intentionally added to suppress 107 pre-existing issues, allowing the tooling to be introduced without blocking on legacy code quality issues.

  • Major version upgrades: Gradle 7.4 → 9.3.1, Kotlin 1.6.21 → 2.3.10, coroutines 1.3.3 → 1.10.2
  • Added ktlint (v1.8.0) and detekt (v2.0.0-alpha.2) with CI enforcement
  • All 44 changed files are formatting-only changes with no behavioral modifications
  • README updated with local verification commands for contributors
  • Build configuration enhanced with test listener to fail on zero tests executed

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are tooling upgrades and automated formatting with no logic modifications. The PR description indicates successful validation with tests passing, and the detekt baseline approach is a standard practice for introducing static analysis to existing codebases.
  • No files require special attention

Important Files Changed

Filename Overview
build.gradle.kts upgraded Kotlin to 2.3.10, Gradle to 9.3.1, coroutines to 1.10.2; added ktlint and detekt plugins with configuration
.github/workflows/ci.yml modernized CI with Java 25, added ktlintCheck and detekt verification, scoped triggers to master branch
gradle/wrapper/gradle-wrapper.properties upgraded Gradle wrapper from 7.4 to 9.3.1
.editorconfig added editor configuration for Kotlin with official code style defaults and disabled specific ktlint rules
detekt-baseline.xml baseline file suppressing 107 pre-existing detekt findings to avoid blocking rollout
README.md added local verification commands for contributors (ktlintCheck, detekt, ktlintFormat)
src/main/kotlin/com/github/eltonvs/obd/command/Exceptions.kt ktlint formatting: multi-line constructor parameters, explicit braces in when expressions, removed extra blank lines
src/main/kotlin/com/github/eltonvs/obd/connection/ObdDeviceConnection.kt ktlint formatting: multi-line constructor parameters, consistent import ordering, expression body formatting

Last reviewed commit: 5c41ea3

@eltonvs eltonvs merged commit 61828ca into master Feb 24, 2026
2 checks passed
@eltonvs eltonvs deleted the codex/ci-lint-stack-latest-v2 branch February 24, 2026 07: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.

1 participant