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

Endre Deak

09/30/2022, 5:45 PM
Hi, out of nowhere I'm seeing this error message if I try to run detekt in a mulit-module project's submodule:
Copy code
> Run failed with 1 invalid config property.
        - Property 'formatting' is misspelled or does not exist.
Copy code
subprojects {
   apply(plugin = "io.gitlab.arturbosch.detekt")

   afterEvaluate {
       detekt {
            config = files("${rootProject.rootDir}/detekt/config.yml")
            buildUponDefaultConfig = true
            autoCorrect = true
            debug = true
        }
   }
}
Copy code
# detekt/config.yaml: 

formatting:
  active: true
m

mkrussel

09/30/2022, 6:25 PM
Formatting got moved to a different library and needs to be added to your dependencies.
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$version"
https://detekt.dev/docs/rules/formatting/
b

Brais Gabin

10/01/2022, 11:18 AM
Or removed from your configuration file of you don't want to use the formatting rules.
284 Views