Invalid boolean config values are evaluated silently to false #2045

Closed
@kepocnhh

Description

Expected Behavior

I can use any number of configuration files.

Observed Behavior

If I use 3 or more configuration files, detekt always throws an error when completing a task.

Steps to Reproduce

I use my task:

task<Detekt>("verifyQuality") {
    source = files(subprojects.withPlugin("kotlin").srcDirs("main")).asFileTree
    val configPath = "buildSrc/src/main/resources/detekt/config"
    config.setFrom(
        "$configPath/common.yml",
        "$configPath/comments.yml",
        "$configPath/potential_bugs.yml",
        "$configPath/performance.yml"
    reports {
        html {
            enabled = true
            destination = File(analysisQualityHtmlPath)
        xml.enabled = false
        txt.enabled = false

And the service does not note errors in the code, but prints it to the log:
https://gist.github.com/kepocnhh/558c85a50419df1a1db400eb54786d96

Context

This error occurs only if the configuration files are 3 or more. That is, in all other cases, the detekt works:

config.setFrom()
config.setFrom("$configPath/common.yml")
config.setFrom(
    "$configPath/common.yml",
    "$configPath/comments.yml"
config.setFrom(
    "$configPath/common.yml",
    "$configPath/performance.yml"
config.setFrom(
    "$configPath/potential_bugs.yml",
    "$configPath/performance.yml"
config.setFrom("$configPath/potential_bugs.yml")

common.yml is

build:
  maxIssues: 0
processors:
  active: false

the rest are like that

performance:
  active: true
  ArrayPrimitive:
    active: true

❕ Each configuration file is unique.

Your Environment

java 1.8.0_221
kotlin 1.3.50
detekt 1.1.1
Gradle 5.5.1
macOS Mojave Version 10.14.6 (18G87)