Skip to content

Instantly share code, notes, and snippets.

@th-deng
Last active January 23, 2020 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th-deng/ef29a14a02b6c892eaf5399062563698 to your computer and use it in GitHub Desktop.
Save th-deng/ef29a14a02b6c892eaf5399062563698 to your computer and use it in GitHub Desktop.
Exclude classes from coverage violation rules
// groovy DSL
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 8
}
// 커버리지 체크를 제외할 클래스들
excludes = [
// '*.test.*',
'*.Kotlin*'
]
}
}
}
// kotlin DSL
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
element = "CLASS"
limit {
counter = "LINE"
value = "TOTALCOUNT"
maximum = "8".toBigDecimal()
}
// 커버리지 체크를 제외할 클래스들
excludes = listOf(
// "*.test.*",
"*.Kotlin*"
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment