Enable UseEmptyCounterpart for detekt code base (#4000)

Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
This commit is contained in:
marschwar
2021-08-03 11:36:31 +02:00
committed by GitHub
parent d3c603e7f5
commit c356897858
22 changed files with 45 additions and 32 deletions

View File

@@ -69,7 +69,7 @@ class LabeledExpression(config: Config = Config.empty) : Rule(config) {
)
@Configuration("allows to provide a list of label names which should be ignored by this rule")
private val ignoredLabels: List<String> by config(listOf<String>()) { list ->
private val ignoredLabels: List<String> by config(emptyList<String>()) { list ->
list.map { it.removePrefix("*").removeSuffix("*") }
}

View File

@@ -68,7 +68,7 @@ class LongParameterList(config: Config = Config.empty) : Rule(config) {
"the most common cases are for dependency injection where constructors are annotated with `@Inject` " +
"or parameters are annotated with `@Value` and should not be counted for the rule to trigger"
)
private val ignoreAnnotated: List<String> by config(listOf<String>()) { list ->
private val ignoreAnnotated: List<String> by config(emptyList<String>()) { list ->
list.map { it.removePrefix("*").removeSuffix("*") }
}