Closed
Description
Hopefully I did not miss anything, but then again there is not much documentation to go by.
Expected Behavior
The Detekt Gradle plugin, with the KtLint wrapper extension as a dependency, reports all issues the standalone version of KtLint does.
Observed Behavior
On a small project, KtLint reports about 20 issues, while Detekt reports none.
Steps to Reproduce
Have a Gradle project with
plugins {
id "io.gitlab.arturbosch.detekt" version "1.2.1"
}
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.2.1"
}
in the build script. Have some issues like
Imports must be ordered in lexicographic order without any empty lines in-between
Missing spacing before ":"
Parameter should be on a separate line (unless all parameters can fit a single line)
Now compare results from running./gradlew detekt
andktlint
.
Context
I only noticed this by accident. So I do not know how long this was the case. I'll see in my other projects if they have the same issue.
Your Environment
- Version of detekt used: 1.2.1
- Version of Gradle used 5.4.1
- Operating System and version: Manjaro Linux and OpenJDK 8 (ask if you need anything specific)