hi all! I just added `detekt` for the first time,...
# detekt
m
hi all! I just added
detekt
for the first time, and I'm trying to run
./gradlew detekt --auto-correct
but it isn't working. I have a
config/detekt.yml
with the default generated config and a
detekt.gradle
file where with the following content:
Copy code
apply plugin: 'io.gitlab.arturbosch.detekt'

detekt {
    ...
    config.setFrom("$projectDir/config/detekt.yml")
    autoCorrect = true
}

dependencies {
    detektPlugins libs.detekt.formatting
}
Is there anything I'm doing wrong? Thanks!
n
I believe
auto-correct
just works on the formatting rules and not any other ruleset. Are the formatting rules added to your config file?
m
yes indeed @Nicholas Doglio thanks!