Grails coberatura插件正在BuildConfig.groovy上进行代码覆盖。我已经在BuildConfiguration上尝试了所有这些配置,以将BuildConfiguration排除在代码范围之外,但我已经尝试了所有这些配置。
coverage {
exclusions = [
'*/BuildConfig*',
'BuildConfig*',
"BuildConfig*",
'BuildConfig',
'BuildConfig*'
]
}
最佳答案
尝试此操作以排除大多数不需要的文件
coverageExcludes = [
"**/*BootStrap*",
"Config*",
"**/conf/**",
"**/*DataSource*",
"**/*resources*",
"**/*UrlMappings*",
"**/*Tests*",
"**/grails/test/**",
"**/org/codehaus/groovy/grails/**",
"**/PreInit*",
"*GrailsPlugin*"
]
关于grails - Grails cobertura插件正在BuildConfig.groovy上进行代码覆盖,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3980301/