【发布时间】:2018-05-19 07:58:24
【问题描述】:
如果你 create a filter XML-file 来了解这样的漏洞
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0. ...">
<Match><Class name="de.test.Test.ClassASuffix" /></Match>
</FindBugsFilter>
它非常适合 java 类 ClassASuffix。
但是添加更多规则很乏味,例如
<Match><Class name="de.test.Test.ClassASuffix" /></Match>
<Match><Class name="de.test.Test.ClassBSuffix" /></Match>
<Match><Class name="de.test.Test.ClassCSuffix" /></Match>
如何过滤掉所有带有 *Suffix 的类?
我已经尝试过some of these examples。 (如.*Test")但它就是行不通。
【问题讨论】:
-
试试
.*\.Test\..*或.*Suffix -
第二个不工作。我没有测试第一个,因为 test.Test 中有我要检查的类。