排除检查样式的测试用例

huangapple go评论62阅读模式
英文:

Exclude Test case from check style

问题

我想排除 Android 单元测试和 VTA 测试用例以及与之相关的文件,以免 CheckStyle 检查。我已尝试过一些方法,但无法解决。请帮助我排除这些文件。提前感谢。

英文:

I would like to exclude android unit & VTA test cases and its related files from checkStyle.I did surf few and unable to solve. Kindly help to do exclude files. Thanks in advance.

答案1

得分: 1

我相信你会做

```groovy
checkstyleMain.configure {
   exclude '**/com/package1/**'
}
checkstyleTest.configure {
   exclude '**/com/package2/**'
}

或者

tasks.withType(Checkstyle).configureEach {
   exclude '**/com/package1/**'
   exclude '**/com/package2/**'
}

参见 Checkstyle.exclude(...)


<details>
<summary>英文:</summary>

I believe you&#39;d do

```groovy
checkstyleMain.configure {
   exclude &#39;**/com/package1/**&#39;
}
checkstyleTest.configure {
   exclude &#39;**/com/package2/**&#39;
}

Or perhaps

tasks.withType(Checkstyle).configureEach {
   exclude &#39;**/com/package1/**&#39;
   exclude &#39;**/com/package2/**&#39;
}

See Checkstyle.exclude(...)

huangapple
  • 本文由 发表于 2023年3月9日 16:49:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75682257.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定