Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Only pass config when it's configured in Gradle detekt extension (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex authored Sep 11, 2020
1 parent ab746eb commit 5217b9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ class DetektKotlinCompilerPlugin : KotlinCompilerPluginSupportPlugin {

val options = project.objects.listProperty(SubpluginOption::class.java).apply {
add(SubpluginOption(Options.debug, extension.debug.toString()))
add(SubpluginOption(Options.config, extension.config.joinToString(",")))
add(SubpluginOption(Options.isEnabled, extension.isEnabled.toString()))
add(SubpluginOption(Options.useDefaultConfig, extension.buildUponDefaultConfig.toString()))
}

extension.baseline?.let { options.add(SubpluginOption(Options.baseline, it.toString())) }
if (extension.config.any()) {
options.add(SubpluginOption(Options.config, extension.config.joinToString(",")))
}

return options
}
Expand Down

0 comments on commit 5217b9b

Please sign in to comment.