All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gitlab.arturbosch.detekt.rules.AllowedExceptionNamePattern.kt Maven / Gradle / Ivy

There is a newer version: 1.23.7
Show newest version
package io.gitlab.arturbosch.detekt.rules

import org.jetbrains.kotlin.psi.KtCatchClause

const val ALLOWED_EXCEPTION_NAME = "_|(ignore|expected).*"

fun KtCatchClause.isAllowedExceptionName(regex: Regex) =
    catchParameter?.identifierName()?.matches(regex) == true




© 2015 - 2025 Weber Informatics LLC | Privacy Policy