Eugen Martynov
07/14/2025, 2:02 PMAditya Bhaskar
07/14/2025, 5:17 PMUnusedPrivateMember
and NullableToStringCall
errors, and a few ISEs:
> A failure occurred while executing io.gitlab.arturbosch.detekt.invoke.DetektWorkAction
> java.lang.IllegalStateException: Analyzing something.kt led to an exception.
Location: java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
The original exception message was: java.lang.NullPointerException
Running detekt '1.23.8' on Java '21.0.6+-13391695-b895.109' on OS 'Mac OS X'
If the exception message does not help, please feel free to create an issue on our GitHub page.
Given this PR is still draft, is this to be expected?Rob
07/27/2025, 4:34 PMjuliocbcotta
08/05/2025, 2:11 PMprivate fun FSProductToAdd.toOrderPipeModel(): OPProductToAdd {
return OPProductToAdd(
productId = productId,
quantity = quantity
)
}
even thought that is called inside of the class...
I also got a bunch of RedundantSuspendModifier
private suspend fun register() = suspendCoroutine { cont ->
// do integration with callbacks from tracking library
}
also UnreachableCode
internal fun decodeJwt(token: String): JSONObject? {
var stringToDecode = (token.split('.').getOrNull(1) ?: return null)
.replace('-', '+')
.replace('_', '/')
@Suppress("MagicNumber")
when (stringToDecode.codePointCount(0, stringToDecode.lastIndex) % 4) {
2 -> stringToDecode += "=="
3 -> stringToDecode += '='
else -> {
// nothing to do
}
}
--> line 32 return try {
stringToDecode.decodeBase64()?.utf8()?.let(::JSONObject)
} catch (e: JSONException) {
Timber.e(e, "Tried to decode a JSON Web Token that is not JSON!")
null
}
}
saying JwtDecoder.kt:32:5: This expression is unreachable code which should either be used or removed. [UnreachableCode]
ursus
08/27/2025, 3:13 PMmax file lines
? (Can't find it)
That's something I presonally care more about than number of functions, lines per class etcsegunfamisa
09/01/2025, 12:33 PMMaximumLineLength
forbidden and the baseline updated
@Suppress("MaximumLineLength")
class Bar
If for any reason, I have to modify that suppress rule, to something like:
@Suppress("MaximumLineLength", "RandomOtherRule")
class Bar
This entire line is going to be reported despite the fact that a new rule suppression is introduced, and the "already known" issue was not changedRyan Ulep
09/03/2025, 1:01 PMseb
09/04/2025, 5:16 PMgammax
09/04/2025, 5:20 PMseb
09/04/2025, 5:36 PMseb
09/04/2025, 5:36 PMseb
09/04/2025, 5:36 PMseb
09/04/2025, 6:02 PMdetekt.autoCorrect
in Gradle also doesn't do auto-correct when I run :detekt
. Is there some other thing I need to do to enable auto-correct for the rule?eygraber
09/04/2025, 7:09 PMThere were 11 compiler errors found during legacy compiler analysis. This affects accuracy of reporting.Do I need to use the compiler plugin to resolve those?
gammax
09/04/2025, 7:10 PMNicholas Doglio
09/04/2025, 7:13 PMGama11
09/05/2025, 8:29 AMGama11
09/05/2025, 9:18 AMBrais Gabin
09/05/2025, 10:12 AMJoe
09/05/2025, 10:45 PMDownloading from central: <https://repo.maven.apache.org/maven2/dev/detekt/detekt-kotlin-analysis-api/2.0.0-alpha.0/detekt-kotlin-analysis-api-2.0.0-alpha.0.jar>
Downloading from central: <https://repo.maven.apache.org/maven2/dev/detekt/detekt-kotlin-analysis-api-standalone/2.0.0-alpha.0/detekt-kotlin-analysis-api-standalone-2.0.0-alpha.0.jar>
[.... snip reactor summary ...]
Execution detekt of goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:3.1.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: dev.detekt:detekt-kotlin-analysis-api:jar:2.0.0-alpha.0 (absent), dev.detekt:detekt-kotlin-analysis-api-standalone:jar:2.0.0-alpha.0 (absent): Could not find artifact dev.detekt:detekt-kotlin-analysis-api:jar:2.0.0-alpha.0 in central (<https://repo.maven.apache.org/maven2>)
ursus
09/05/2025, 11:39 PMRyan Ulep
09/08/2025, 1:02 PMdetekt-compiler-plugin
should work with Kotlin 2.+ correct? I'm getting:
error: there are some plugins incompatible with language version 2.0:
io.github.detekt.compiler.plugin.DetektCompilerPluginRegistrar
Please use language version 1.9 or below
ursus
09/11/2025, 7:41 PMtype resolution
enabled?
If I run detektMain
I'm getting both debug & release. Is that normal? (and release stuff takes way longer)ursus
09/12/2025, 5:13 PMCognitiveComplexMethod
blows up.
Is there a global way to have implementations of such interface to not be analyzed?Eduard Boloș
09/26/2025, 2:09 PMReportMergeTask
. In v1, it looks like the Detekt tasks were created only for the variants that were not being filtered out. But now in v2 they are created for all the variants, but only the ones that are not filtered out are linked to the main task as a dependency. However, that means that the merge task, when configured similar to these docs, it will trigger all the registered tasks, although some of them should ignored. I will post my configuration in the thread below, for more clarity. But the question is: am I supposed to do something differently now?Eduard Boloș
09/29/2025, 10:06 AMNoSuchMethodError
error in the unit tests when calling lintWithContext
on a rule (stacktrace in thread 🧵). I think it's something due to dependencies, I updated Kotlin to version 2.2.20, but maybe something is missing.
Update: downgrading to Kotlin 2.2.10 seems to have fixed the issue.stuebingerb
09/30/2025, 11:28 AMeygraber
10/05/2025, 7:29 PMMIDI
10/10/2025, 10:25 AMbind()
calls. It works fine when running with Gradle, but IntelliJ does not highlight according to this rule, even though I downloaded the arrow-detekt-rules JAR from Maven Repository, placed it in my home folder and pointed to it in the IntelliJ Detekt Plugin settings. Does anyone have experience with this issue or a thought about what might be wrong? Thanks a lot!ursus
10/13/2025, 12:41 PM1.23.8
and kotlin 2.2.20
& agp 8.13.0
(basically all latest stable stuff)
and everything works fine
is this not expected? looking at the table I was expecting too need to use the 2.0.0-alpha.0