https://kotlinlang.org logo
#detekt
Title
m

mkrussel

06/23/2022, 3:06 PM
I recently reinstalled Android Studio version
2021.1.1 Patch 2
which then installed the latest version of the detekt plugin (
1.20.1
). I'm using version
1.19.0
of detekt. After that I'm getting several false positives for
Missing newline after "("
and
Missing newline before ")"
warnings. They all report as being on at line 1 column 1. Running detekt from gradle does not report any issues. Not sure the plugin is incompatible with the version of Android Studio being used, or if I need to upgrade to a new version of detekt.
c

chao

06/23/2022, 3:16 PM
I believe intellij plugin is bundled with detekt with similar version. Did you actually configure the same yml in the intellij plugin preference?
m

mkrussel

06/23/2022, 3:23 PM
I configured the plugin to my projects custom yml file. That file is based on detekt 1.9.0. Working on updating to the same version as the plugin
I methodically go through the changes in the default config to see what I want to do with my so it takes some time.
c

chao

06/23/2022, 3:24 PM
Ah this error message is from
Indentation
, so I would assume that this is due to ktlint(detekt-formatting) version upgrade
m

mkrussel

06/23/2022, 3:27 PM
I have
Indentation
disabled since it had false positives.
c

chao

06/23/2022, 3:29 PM
Probably we need to figure out why
Indentation
is enabled in Detekt IntelliJ Plugin I could be wrong but I don’t believe ktlint(formatting) rules are active by default, unless detekt-formatting.jar is on the classpath
m

mkrussel

06/23/2022, 3:45 PM
Looks like they were real warnings, the real problem is that they don't report useful line numbers.
The gradle build has the correct line number so that helps
c

chao

06/23/2022, 3:50 PM
That’s interesting - Would you mind reporting it on https://github.com/detekt/detekt-intellij-plugin/issues with your code that causes plugin to highlight the entire file?
m

mkrussel

06/23/2022, 3:50 PM
Sure
3 Views