@Test public void configurations() { TrailingCommentCheck check = new TrailingCommentCheck(); String defaultConfigAsString = new Gson().toJson(check.configurations()); assertThat(defaultConfigAsString).isEqualTo("[{\"ignorePattern\":\"^\\\\s*[^\\\\s]+$\"}]"); check.legalCommentPattern = "^[ignored]*$"; String customConfigAsString = new Gson().toJson(check.configurations()); assertThat(customConfigAsString).isEqualTo("[{\"ignorePattern\":\"^[ignored]*$\"}]"); }
@Override public List<Object> configurations() { return Collections.singletonList(new Config(legalCommentPattern)); }
TrailingCommentCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new Config(legalCommentPattern)); } }
TrailingCommentCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new Config(legalCommentPattern)); }  }
TrailingCommentCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new Config(legalCommentPattern)); }  @Override String eslintKey(); @Override List<Object> configurations(); }
TrailingCommentCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new Config(legalCommentPattern)); }  @Override String eslintKey(); @Override List<Object> configurations();  }