Add detekt - #46
Conversation
|
Warning Review limit reached
Next review available in: 13 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Comment |
PR Summary by QodoAdd Detekt baseline and align code with Detekt rules
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
There was a problem hiding this comment.
🟢 Ready to approve
Changes are low-risk and primarily Detekt enablement/formatting, with only a minor readability follow-up noted.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds Detekt static analysis support to the commons-java Kotlin codebase by introducing a baseline file and making small, targeted code adjustments/suppressions to reduce (or document) existing findings. This aligns with the effort tracked in mtransit-for-android issue #226.
Changes:
- Added a
detekt-baseline.xmlto capture current Detekt findings as a starting point. - Added
@Suppress("PrintStackTrace")onSourceUtils.getSourceLabel(...)overloads for cross-platform (JVM/Android) usage. - Reformatted a couple of SQL query builders (JOIN formatting) and adjusted one
SQLColumDefinvocation.
File summaries
| File | Description |
|---|---|
| src/main/java/org/mtransit/commons/SourceUtils.kt | Adds Detekt suppression for printStackTrace() usage in URL label parsing. |
| src/main/java/org/mtransit/commons/gtfs/sql/TripSQL.kt | Splits a long JOIN line into a chained append for readability/linting. |
| src/main/java/org/mtransit/commons/gtfs/sql/StopSQL.kt | Minor indentation fix and splits a long JOIN line into chained append. |
| src/main/java/org/mtransit/commons/gtfs/sql/CalendarDateSQL.kt | Tweaks SQLColumDef call style (primaryKey/foreignKey arguments). |
| detekt-baseline.xml | Introduces Detekt baseline to track existing issues. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
…parser': - commons: Add `detekt` mtransitapps/commons#836 - commons-android: Add `detekt` mtransitapps/commons-android#193 - commons-java: Add `detekt` mtransitapps/commons-java#46 - parser: Add `detekt` mtransitapps/parser#84
detektto validate Kotlin code. mtransit-for-android#226