docs: private static void printAsXML(Rule rule, StringBuilder xmlStringBuilder) {
      if (rule.version != null) {
        xmlStringBuilder.append("  <!-- since " + rule.version + " -->");
        xmlStringBuilder.append(LINE_SEPARATOR);
      }
      xmlStringBuilder.append("  <rule>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append("    <key>" + rule.fixedRuleKey() + "</key>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append("    <severity>" + rule.severity + "</severity>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append("    <name><![CDATA[" + rule.name + "]]></name>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append("    <internalKey><![CDATA[" + rule.internalKey + "]]></internalKey>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append("    <description><![CDATA[" + rule.description + "]]></description>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      if (!rule.tags.isEmpty()) {
        for (String tag : rule.tags) {
          xmlStringBuilder.append("    <tag>" + tag + "</tag>");
          xmlStringBuilder.append(LINE_SEPARATOR);
        }
      }
  
      if (!rule.parameters.isEmpty()) {
        List<RuleParameter> sortedParameters = Lists.newArrayList(rule.parameters);
        Collections.sort(sortedParameters, new Comparator<RuleParameter>() {
          @Override
          public int compare(RuleParameter o1, RuleParameter o2) {
            return o1.key.compareTo(o2.key);
          }
        });
        for (RuleParameter parameter : sortedParameters) {
          xmlStringBuilder.append("    <param>");
          xmlStringBuilder.append(LINE_SEPARATOR);
          xmlStringBuilder.append("      <key>" + parameter.key + "</key>");
          xmlStringBuilder.append(LINE_SEPARATOR);
          if (StringUtils.isNotBlank(parameter.description)) {
            xmlStringBuilder.append("      <description><![CDATA[" + parameter.description + "]]></description>");
            xmlStringBuilder.append(LINE_SEPARATOR);
          }
          if (StringUtils.isNotBlank(parameter.defaultValue) && !"null".equals(parameter.defaultValue)) {
            xmlStringBuilder.append("      <defaultValue>" + parameter.defaultValue + "</defaultValue>");
            xmlStringBuilder.append(LINE_SEPARATOR);
          }
          xmlStringBuilder.append("    </param>");
          xmlStringBuilder.append(LINE_SEPARATOR);
        }
      }
  
      xmlStringBuilder.append("  </rule>");
      xmlStringBuilder.append(LINE_SEPARATOR);
      xmlStringBuilder.append(LINE_SEPARATOR);
    }