Problems with FindBugs exclude filter

前端 未结 3 979
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 02:22

I am in the process of evaluating FindBugs and am trying to make use of the excludeFilter so that the tool does not process the test packages or the generated ejb stubs.

3条回答
  •  灰色年华
    2021-02-09 02:58

    It is helpful to mention that if a class is supposed to be excluded, be careful with its inner classes. It took me hours to find out that instead of

    
         
    
    

    I should use the following config with its inner classes listed one by one

    
        
        
        
        
        
    
    

    And so far I haven't found out how to exclude a class and all its subclass (not a clue in filter), a simple regex like com.some.Proto$.* just does not work. And I also noticed that $ in regex means the end of line, while findbugs read it as a text character I think, otherwise it should have been com.some.Proto\$Query. Besides, a valuable regex tester helped me on regex by explaining every character in it.

提交回复
热议问题