code: private String formatOptions(List<OptionInfo> optList, int maxLength, boolean showUnpublicized) {
      StringJoiner buf = new StringJoiner(lineSeparator);
      for (OptionInfo oi : optList) {
        if (oi.unpublicized && !showUnpublicized) {
          continue;
        }
        String defaultStr = "";
        if (oi.defaultStr != null) {
          defaultStr = String.format(" [default %s]", oi.defaultStr);
        }
  
        @SuppressWarnings("formatter") // format string computed from maxLength argument
        String use =
            String.format("  %-" + maxLength + "s - %s%s", oi.synopsis(), oi.description, defaultStr);
        buf.add(use);
  
        if (oi.list != null) {
          hasListOption = true;
        }
      }
      return buf.toString();
    }
docs: Format a list of options for use in generating usage messages. Also sets {@link #hasListOption}
  if any option has list type.
  
  @param optList the options to format
  @param maxLength the maximum number of characters in the output
  @param showUnpublicized if true, include unpublicized options in the output
  @return the formatted options