public static Filter parseFilter(String fileName) throws IOException { return new Filter(fileName); }
public static void main(String[] argv) { try { if (argv.length != 1) { System.err.println("Usage: " + Filter.class.getName() + " <filename>"); System.exit(1); } Filter filter = new Filter(argv[0]); filter.writeAsXML(System.out); } catch (Exception e) { e.printStackTrace(); System.exit(1); } }
/** * Configure the (bug instance) Filter for the given DelegatingBugReporter. * * @param bugReporter * a DelegatingBugReporter * @param filterFileName * filter file name * @param include * true if the filter is an include filter, false if it's an * exclude filter * @throws java.io.IOException * @throws edu.umd.cs.findbugs.filter.FilterException */ public static BugReporter configureFilter(BugReporter bugReporter, String filterFileName, boolean include) throws IOException, FilterException { Filter filter = new Filter(filterFileName); return new FilterBugReporter(bugReporter, filter, include); }
includeFilter.add(new edu.umd.cs.findbugs.filter.Filter(argument)); } catch (FilterException e) { throw new IllegalArgumentException("Error processing include file: " + argument, e); excludeFilter.add(new edu.umd.cs.findbugs.filter.Filter(argument)); } catch (FilterException e) { throw new IllegalArgumentException("Error processing include file: " + argument, e);
} else if (isTopLevelFilter(qName)) { if (project != null) { filter = new Filter(); project.setSuppressionFilter(filter);
@Test public void readXML() throws Exception { SourceMatcher sm = new SourceMatcher(fileName); String xml = writeXMLAndGetStringOutput(sm, false); xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "\n<FindBugsFilter>" + "\n<Match>" + "\n" + xml + "\n</Match>" + "\n</FindBugsFilter>\n"; Filter filter = new Filter(new StringInputStream(xml)); assertFalse(filter.match(bug)); bug.addClass("bla", fileName); assertTrue(filter.match(bug)); }
public static Filter parseFilter(String fileName) throws IOException { return new Filter(fileName); }
public static void main(String[] argv) { try { if (argv.length != 1) { System.err.println("Usage: " + Filter.class.getName() + " <filename>"); System.exit(1); } Filter filter = new Filter(argv[0]); filter.writeAsXML(System.out); } catch (Exception e) { e.printStackTrace(); System.exit(1); } }
/** * Configure the (bug instance) Filter for the given DelegatingBugReporter. * * @param bugReporter * a DelegatingBugReporter * @param filterFileName * filter file name * @param include * true if the filter is an include filter, false if it's an * exclude filter * @throws java.io.IOException * @throws edu.umd.cs.findbugs.filter.FilterException */ public static BugReporter configureFilter(BugReporter bugReporter, String filterFileName, boolean include) throws IOException, FilterException { Filter filter = new Filter(filterFileName); return new FilterBugReporter(bugReporter, filter, include); }
includeFilter.add(new edu.umd.cs.findbugs.filter.Filter(argument)); } catch (FilterException e) { throw new IllegalArgumentException("Error processing include file: " + argument, e); excludeFilter.add(new edu.umd.cs.findbugs.filter.Filter(argument)); } catch (FilterException e) { throw new IllegalArgumentException("Error processing include file: " + argument, e);
} else if (isTopLevelFilter(qName)) { if (project != null) { filter = new Filter(); project.setSuppressionFilter(filter);