Skip to content

chore(deps): update detekt to 2.0.0-alpha.6 - #770

Merged
stuebingerb merged 1 commit into
mainfrom
build/update-detekt
Oct 28, 2026
Merged

stuebingerb merged 1 commit into
mainfrom
build/update-detekt

Conversation

@stuebingerb

Copy link
Copy Markdown
Owner

detekt 2.0.0 is not stable yet but the lack of (recent java version) support in 1.x is becoming more and more of an issue (cf. failing tests since the last GitHub action runner update).

Unfortunately, this no longer seems to detect unused imports properly so let's have ktLint handle them instead.

detekt 2.0.0 is not stable yet but the lack of (recent java version)
support in 1.x is becoming more and more of an issue (cf. failing
tests since the last GitHub action runner update).

Unfortunately, this no longer seems to detect unused imports properly
so let's have ktLint handle them instead.
@stuebingerb stuebingerb added the dependencies Pull requests that update a dependency file label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e3356a2c-77ee-4870-9c41-b6f199be10ef
Commits

Reviewing files that changed from the base of the PR and between 2ad4db5 and a5918a7.

Files selected for processing: 4
  • .editorconfig
  • buildSrc/src/main/kotlin/library-conventions.gradle.kts
  • config/detekt.yml
  • gradle/libs.versions.toml
Files with no reviewable changes: 1
  • config/detekt.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated the project’s Kotlin linting configuration to enable detection of unused imports.
    • Updated the Detekt Gradle plugin to the 2.0.0-alpha.6 release and its new plugin identifier.
    • Removed the separate Detekt unused-imports rule configuration.

The build updates the Detekt Gradle plugin to version 2.0.0-alpha.6. It enables ktlint’s no-unused-imports rule and removes the corresponding Detekt rule configuration.

Changes: Detekt and unused-import configuration

Layer / File(s) Summary
Update the plugin and unused-import rules
gradle/libs.versions.toml, buildSrc/src/main/kotlin/library-conventions.gradle.kts, config/detekt.yml, .editorconfig
The version catalog and build conventions now use the dev.detekt plugin marker and ID. The Detekt unused-import rule configuration was removed, and ktlint’s no-unused-imports rule was enabled.

Possibly related issues

  • stuebingerb/KGraphQL#33 — This change updates the Detekt dependency listed in the issue to version 2.0.0-alpha.6.

Priority: Normal

Change: Other

Merge Risk: Minimal · up to a5918

No actionable merge-blocking risk is established for this change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description explains the Detekt upgrade and the decision to use ktLint for unused-import detection. It directly relates to the changeset.
Title check Passed The title follows the conventional commits format, identifies the Detekt update, and is concise at 43 characters.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stuebingerb stuebingerb changed the title chore(deps): update detekt to 2.0.0-alpha chore(deps): update detekt to 2.0.0-alpha.6 Oct 28, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Architecture diagram
sequenceDiagram
    participant Gradle as Gradle Build
    participant Detekt as Detekt Plugin (dev.detekt 2.0.0-alpha.6)
    participant Ktlint as KtLint Plugin
    participant EditorConfig as .editorconfig
    participant DetektConfig as config/detekt.yml

    Note over Gradle,DetektConfig: Build-Time Dependency Resolution
    
    Gradle->>Gradle: Resolve version catalog (libs.versions.toml)
    Gradle->>Detekt: Apply plugin via library-conventions.gradle.kts
    Gradle->>Ktlint: Apply plugin via library-conventions.gradle.kts

    Note over Detekt,DetektConfig: Static Analysis Configuration
    
    Detekt->>DetektConfig: Load config/detekt.yml
    DetektConfig-->>Detekt: Ruleset configuration (UnusedImports removed)

    Note over Ktlint,EditorConfig: Linting Configuration
    
    Ktlint->>EditorConfig: Load .editorconfig
    EditorConfig-->>Ktlint: Ruleset (UnusedImports rule enabled)

    Note over Detekt,Ktlint: Analysis Execution
    
    alt Source code scanning
        Detekt->>Detekt: Run static analysis (except unused imports)
        Ktlint->>Ktlint: Run linting (including unused imports)
    end

    Note over Gradle: Build output with both analysis results
Loading

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

Re-trigger cubic

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.23%. Comparing base (2ad4db5) to head (a5918a7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
+ Coverage   84.21%   84.23%   +0.01%     
==========================================
  Files         150      150              
  Lines        5024     5024              
  Branches      869      869              
==========================================
+ Hits         4231     4232       +1     
  Misses        493      493              
+ Partials      300      299       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stuebingerb
stuebingerb merged commit c8b30eb into main Oct 28, 2026
13 of 15 checks passed
@stuebingerb
stuebingerb deleted the build/update-detekt branch October 28, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant