@Test public void test_configuration() { CommentRegularExpressionCheck check = new CommentRegularExpressionCheck(); String defaultConfigAsString = new Gson().toJson(check.configurations()); assertThat(defaultConfigAsString).isEqualTo( "[{\"regularExpression\":\"\",\"message\":\"The regular expression matches this comment.\",\"flags\":\"\"}]" ); check.message = "This is a message"; String configAsString = new Gson().toJson(check.configurations()); assertThat(configAsString).isEqualTo( "[{\"regularExpression\":\"\",\"message\":\"This is a message\",\"flags\":\"\"}]" ); check.regularExpression = "[a-z]"; String configAsString2 = new Gson().toJson(check.configurations()); assertThat(configAsString2).isEqualTo( "[{\"regularExpression\":\"[a-z]\",\"message\":\"This is a message\",\"flags\":\"\"}]" ); check.flags = "iu"; assertThat(new Gson().toJson(check.configurations())).isEqualTo( "[{\"regularExpression\":\"[a-z]\",\"message\":\"This is a message\",\"flags\":\"iu\"}]" ); }
@Override public List<Object> configurations() { return Collections.singletonList(new CommentRegularExpressionCheck.Config(regularExpression, message, flags)); }
CommentRegularExpressionCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new CommentRegularExpressionCheck.Config(regularExpression, message, flags)); } }
CommentRegularExpressionCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new CommentRegularExpressionCheck.Config(regularExpression, message, flags)); }  }
CommentRegularExpressionCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new CommentRegularExpressionCheck.Config(regularExpression, message, flags)); }  @Override String eslintKey(); @Override List<Object> configurations(); }
CommentRegularExpressionCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Collections.singletonList(new CommentRegularExpressionCheck.Config(regularExpression, message, flags)); }  @Override String eslintKey(); @Override List<Object> configurations(); @RuleProperty(
    key = "regularExpression",
    description = "The regular expression (JavaScript syntax)",
    defaultValue = DEFAULT_REGULAR_EXPRESSION)
  public String regularExpression; @RuleProperty(
    key = "message",
    description = "The issue message",
    defaultValue = DEFAULT_MESSAGE)
  public String message; @RuleProperty(
    key = "flags",
    description = "Regular expression modifier flags",
    defaultValue = DEFAULT_FLAGS)
  public String flags; }