FindBugs filter file for ignoring JUnit tests

后端 未结 2 1590
别跟我提以往
别跟我提以往 2020-12-18 21:50

I need to set up a filter file for my findbugs ant script that scans only the src/* files and not the test/* files.

What is the syntax for checking all classes while

2条回答
  •  无人及你
    2020-12-18 22:09

    FindBugs is actually scanning the compiled class files, not the sourcePath. If you are compiling your src/* and test/* files to the different directories, you could just use the nested element.

    
      
     
    

    That won't work if src/* and test/* are both compiled to a single directory. In that case, use a filter file and exclude the packages or class names that correspond to tests.

    
      
     
    

    where exclude.xml looks like:

    
      
        
      
      
        
      
    
    

提交回复
热议问题