EsqlExclusionsFileFilter implements InputFileFilter { @Override public boolean accept(InputFile inputFile) { return !isExcludedWithProperty(inputFile, EsqlPlugin.ESQL_EXCLUSIONS_KEY); } EsqlExclusionsFileFilter(Configuration configuration); @Override boolean accept(InputFile inputFile);  }
@Test public void should_exclude_using_custom_path_regex() throws Exception { MapSettings settings = new MapSettings(); settings.setProperty( EsqlPlugin.ESQL_EXCLUSIONS_KEY, EsqlPlugin.ESQL_EXCLUSIONS_DEFAULT_VALUE + "," + "**/libs/**"); EsqlExclusionsFileFilter filter = new EsqlExclusionsFileFilter(settings.asConfig()); assertThat(filter.accept(inputFile("some_app.esql"))).isTrue(); assertThat(filter.accept(inputFile("libs/some_lib.esql"))).isFalse(); }
@Test public void should_ignore_empty_path_regex() throws Exception { MapSettings settings = new MapSettings(); settings.setProperty(EsqlPlugin.ESQL_EXCLUSIONS_KEY, "," + EsqlPlugin.ESQL_EXCLUSIONS_DEFAULT_VALUE + ","); EsqlExclusionsFileFilter filter = new EsqlExclusionsFileFilter(settings.asConfig()); assertThat(filter.accept(inputFile("some_app.esql"))).isTrue(); }