Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sort config doc outputs, making it easier to find relevant info
  • Loading branch information
jimschubert committed Jan 19, 2020
commit 3a2ad7a14ff751c5aeb8e45f431fb460b8ca41ff
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) {
Map<String, CliOption> langCliOptions = config.cliOptions()
.stream()
.collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> {
throw new IllegalStateException();
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt()));
}, TreeMap::new));

langCliOptions.forEach((key, langCliOption) -> {
Expand Down Expand Up @@ -320,7 +320,7 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) {
Map<String, CliOption> langCliOptions = config.cliOptions()
.stream()
.collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> {
throw new IllegalStateException();
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt()));
}, TreeMap::new));

langCliOptions.forEach((key, langCliOption) -> {
Expand All @@ -341,7 +341,7 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) {
.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
throw new IllegalStateException();
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b));
}, TreeMap::new));
writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Imports");
sb.append(newline);
Expand All @@ -356,7 +356,7 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) {
.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
throw new IllegalStateException();
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b));
}, TreeMap::new));
writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Instantiated By");
sb.append(newline);
Expand Down