Upgrade to Detekt 2.0.0-alpha.2 with analysis_mode and fail_on_severity attrs - #209
Open
ryanulep wants to merge 2 commits into
Open
Upgrade to Detekt 2.0.0-alpha.2 with analysis_mode and fail_on_severity attrs#209ryanulep wants to merge 2 commits into
ryanulep wants to merge 2 commits into
Conversation
Bencodes
reviewed
Mar 11, 2026
Bencodes
reviewed
Mar 12, 2026
| package io.buildfoundation.bazel.detekt.execute; | ||
|
|
||
| import io.gitlab.arturbosch.detekt.cli.CliRunner; | ||
| import dev.detekt.cli.CliRunner; |
Member
There was a problem hiding this comment.
Why the package name change here? Maybe unlikely but this could break people that are depending on this via the compiled jar in their own binary target.
Contributor
Author
There was a problem hiding this comment.
Detekt v2 changed the namespace so it has to be updated here to invoke the CLI. Otherwise, there's an error when invoking the rule that io.gitlab.arturbosch.detekt.cli.CliRunner does not exist.
ryanulep
force-pushed
the
v2
branch
3 times, most recently
from
March 16, 2026 13:56
d9dd940 to
607945a
Compare
|
@ryanulep any updates on this? I've been following this PR in hopes to introduce detekt to a JDK 25 based codebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the default Detekt version from 1.23.8 to 2.0.0-alpha.2, adapting to the new Detekt 2.x API and CLI changes.
Changes
1.23.8→2.0.0-alpha.2io.gitlab.arturbosch.detekt→dev.detektanalysis_modeattr (replacesenable_type_resolution):"light"(default, syntax-only) or"full"(type resolution with classpath)fail_on_severityattr: controls minimum severity that fails the build ("Error"default, or"Warning","Info","Never")txt_reportattr removedlanguage_versionupdated to2.3;jvm_targetnow supports values up to24v1.0-alpha.2row; improved documentation throughoutBreaking Changes
enable_type_resolutionattr removed — useanalysis_mode = "full"insteadmax_issuesattr removed — usefail_on_severityinsteadtxt_reportattr removed — text report output is no longer supported by Detekt 2.x