0

I installed FindBugs plugin in Eclipse for Source Code Analysis with FindSecurityBugs plugin to find out security issues with the code. I want to filter out certain false positives and want to exclude them in generated reports. The exclude filter is working fine from FindBugs preferences in the Eclipse GUI but from the command line it's giving below error. I am using the Eclipse project settings preference file only as input to the command line.

Done with analysis
The following errors occurred during analysis:
  Unable to read filter: filter-ECB.xml : filter-ECB.xml (No such file or directory)
    java.io.FileNotFoundException: filter-ECB.xml (No such file or directory)
      At java.io.FileInputStream.open(Native Method)
      At java.io.FileInputStream.<init>(FileInputStream.java:146)
      At edu.umd.cs.findbugs.filter.Filter.parse(Filter.java:206)
      At edu.umd.cs.findbugs.filter.Filter.<init>(Filter.java:132)
      At edu.umd.cs.findbugs.FindBugs.configureFilter(FindBugs.java:516)
      At edu.umd.cs.findbugs.FindBugs2.addFilter(FindBugs2.java:374)
      At edu.umd.cs.findbugs.FindBugs2.configureFilters(FindBugs2.java:521)
      At edu.umd.cs.findbugs.FindBugs2.setUserPreferences(FindBugs2.java:475)
      At edu.umd.cs.findbugs.TextUICommandLine.configureEngine(TextUICommandLine.java:685)
      At edu.umd.cs.findbugs.FindBugs.processCommandLine(FindBugs.java:361)
      At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1188)
Krishna Pandey
  • 1,497
  • 1
  • 16
  • 26

1 Answers1

1

The problem I found out was with the filename of xml file provided as filter. After changing the name of filter from "filter-ECB.xml" to "filterECB.xml", the scan completed without any error from command line with -textui parameter.

Krishna Pandey
  • 1,497
  • 1
  • 16
  • 26