Skip to content

Commit

Permalink
Remove unused dry run properties
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Jul 31, 2022
1 parent 90d7da2 commit 9cf9e1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Expand Up @@ -114,8 +114,6 @@ open class DetektCreateBaselineTask : SourceTask() {
get() = jvmTargetProp.get()
set(value) = jvmTargetProp.set(value)

private val isDryRun: Boolean = project.isDryRunEnabled()

@get:Internal
internal val arguments: Provider<List<String>> = project.provider {
listOf(
Expand Down Expand Up @@ -148,7 +146,7 @@ open class DetektCreateBaselineTask : SourceTask() {
logger.warn("'failFast' is deprecated. Please use 'buildUponDefaultConfig' together with 'allRules'.")
}

DetektInvoker.create(task = this, isDryRun = isDryRun).invokeCli(
DetektInvoker.create(task = this).invokeCli(
arguments = arguments.get(),
ignoreFailures = ignoreFailures.getOrElse(false),
classpath = detektClasspath.plus(pluginClasspath),
Expand Down
Expand Up @@ -44,8 +44,6 @@ open class DetektGenerateConfigTask @Inject constructor(
@get:PathSensitive(PathSensitivity.RELATIVE)
val config: ConfigurableFileCollection = project.objects.fileCollection()

private val isDryRun: Boolean = project.isDryRunEnabled()

private val defaultConfigPath = project.rootDir.toPath().resolve(CONFIG_DIR_NAME).resolve(CONFIG_FILE)

private val configurationToUse = if (config.isEmpty) {
Expand All @@ -71,7 +69,7 @@ open class DetektGenerateConfigTask @Inject constructor(

Files.createDirectories(configurationToUse.last().parentFile.toPath())

DetektInvoker.create(task = this, isDryRun = isDryRun).invokeCli(
DetektInvoker.create(task = this).invokeCli(
arguments = arguments.get(),
classpath = detektClasspath.plus(pluginClasspath),
taskName = name,
Expand Down
Expand Up @@ -21,7 +21,7 @@ internal interface DetektInvoker {

companion object {

fun create(task: Task, isDryRun: Boolean): DetektInvoker =
fun create(task: Task, isDryRun: Boolean = false): DetektInvoker =
if (isDryRun) {
DryRunInvoker(task.logger)
} else {
Expand Down

0 comments on commit 9cf9e1f

Please sign in to comment.