Skip to content

detektGenerateConfig ignores detekt.config paramenter #2565

@BraisGabin

Description

@BraisGabin

Expected Behavior

./gradlew detektGenerateConfig creates the config file in the defined config path defined in the configuration

detekt {
    config = files("$rootProjectDir/detekt-config.yml")
}

Observed Behavior

The config is ignored and the task creates it in the default path: config/detekt/detekt.yml

Steps to Reproduce

Configure the plugin like this:

detekt {
    config = files("$rootProjectDir/detekt-config.yml")
}

and then run: ./gradlew detektGenerateConfig

Your Environment

  • Version of detekt used: 1.7.2 (reproducible in 1.6.0 too)
  • Version of Gradle used (if applicable): 5.6.1
  • Operating System and version: macOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions