@Test public void should_keep_other_lang() throws Exception { DefaultInputFile jsFile = TestInputFileBuilder.create("", "foo.min.css").setLanguage("js").build(); assertThat(MINIFIED_FILES_FILTER.accept(jsFile)).isTrue(); }
@Override public boolean accept(InputFile file) { if (!CssLanguage.KEY.equals(file.language())) { return true; } try { boolean isMinified = hasMinifiedFileName(file) || hasExcessiveAverageLineLength(file); if (isMinified) { LOG.debug("File [" + file.uri() + "] looks like a minified file and will not be analyzed"); } return !isMinified; } catch (IOException e) { throw new IllegalStateException("Failed to read input file", e); } }
MinifiedFilesFilter implements InputFileFilter { @Override public boolean accept(InputFile file) { if (!CssLanguage.KEY.equals(file.language())) { return true; } try { boolean isMinified = hasMinifiedFileName(file) || hasExcessiveAverageLineLength(file); if (isMinified) { LOG.debug("File [" + file.uri() + "] looks like a minified file and will not be analyzed"); } return !isMinified; } catch (IOException e) { throw new IllegalStateException("Failed to read input file", e); } } }
MinifiedFilesFilter implements InputFileFilter { @Override public boolean accept(InputFile file) { if (!CssLanguage.KEY.equals(file.language())) { return true; } try { boolean isMinified = hasMinifiedFileName(file) || hasExcessiveAverageLineLength(file); if (isMinified) { LOG.debug("File [" + file.uri() + "] looks like a minified file and will not be analyzed"); } return !isMinified; } catch (IOException e) { throw new IllegalStateException("Failed to read input file", e); } }  }
MinifiedFilesFilter implements InputFileFilter { @Override public boolean accept(InputFile file) { if (!CssLanguage.KEY.equals(file.language())) { return true; } try { boolean isMinified = hasMinifiedFileName(file) || hasExcessiveAverageLineLength(file); if (isMinified) { LOG.debug("File [" + file.uri() + "] looks like a minified file and will not be analyzed"); } return !isMinified; } catch (IOException e) { throw new IllegalStateException("Failed to read input file", e); } }  @Override boolean accept(InputFile file); }
MinifiedFilesFilter implements InputFileFilter { @Override public boolean accept(InputFile file) { if (!CssLanguage.KEY.equals(file.language())) { return true; } try { boolean isMinified = hasMinifiedFileName(file) || hasExcessiveAverageLineLength(file); if (isMinified) { LOG.debug("File [" + file.uri() + "] looks like a minified file and will not be analyzed"); } return !isMinified; } catch (IOException e) { throw new IllegalStateException("Failed to read input file", e); } }  @Override boolean accept(InputFile file);  }