gpt4 book ai didi

intellij-idea - IntelliJ IDEA : Exclude packages while running code coverage

转载 作者:行者123 更新时间:2023-12-03 17:08:57 45 4
gpt4 key购买 nike

无论如何,我们可以在使用 IntelliJ IDEA 作为覆盖运行器运行代码覆盖时排除特定包吗?
在 Run/Debug Configurations > Coverage 下有一个选项,它允许我们包含类/包,但是包含大约几百个包来排除少数几个包会非常乏味。

最佳答案

可能没有办法将要包含的包与一些通配符匹配?如果您想从五个包(a、b、c、d 和 e)中排除一个包,这是我目前找到的唯一选项(在“运行/调试配置”对话框中):

com.stackoverflow.a.*
com.stackoverflow.b.*
com.stackoverflow.d.*
com.stackoverflow.e.*

这确实相当笨拙。

当我使用代码覆盖率(使用不同的配置)运行时,将显示以下输出:
D:\Programs\Java\jdk1.8.0_72\bin\java [...]
---- IntelliJ IDEA coverage runner ----
sampling ...
include patterns:
com\.stackoverflow\.q35257485\..*
com\.stackoverflow\.q34245660\.AnimatedBoxman(\$.*)*
exclude patterns:
Process finished with exit code 0

“排除模式:”行给人的印象是应该可以排除包和/或类,但我认为没有办法做到这一点(在“运行/调试配置”对话框中)。

关于intellij-idea - IntelliJ IDEA : Exclude packages while running code coverage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35257485/

45 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com