开发者

Findbugs: Howto ignore Priority 2 and 3 warnings?

开发者 https://www.devze.com 2023-02-04 02:44 出处:网络
i like to configure Findsbug-Filter to ignore some priority 2 and 3 warnings. 开发者_Python百科Something like this.

i like to configure Findsbug-Filter to ignore some priority 2 and 3 warnings.

开发者_Python百科Something like this.

<?xml version="1.0"?>
<FindBugsFilters>
    <Match>      
      <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION,*some more pattern*" />
      <OR>
       <Priority value="2" />
       <Priority value="3" />
      </OR>
    </Match>
</FindBugsFilter>

But this Filter did not work. Do you know the correct configuration?

thanks alot.


Each Match is something to filter out. Try splitting the filter in two matches:

<?xml version="1.0"?>
<FindBugsFilters>
    <Match>      
      <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION,*some more pattern*" />
      <Priority value="2" />
    </Match>
    <Match>      
      <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION,*some more pattern*" />
      <Priority value="3" />
    </Match>
</FindBugsFilter>
0

精彩评论

暂无评论...
验证码 换一张
取 消