From b9209962cd40326ecb9948e19145b0badfe245dc Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Tue, 11 May 2021 16:30:49 +0800 Subject: [PATCH] CLI: Add documentation for -J argument in `kotlinc -help` --- .../cli/src/org/jetbrains/kotlin/cli/common/Usage.java | 10 ++++++++++ compiler/testData/cli/js-dce/dceHelp.out | 1 + compiler/testData/cli/js/jsHelp.out | 1 + compiler/testData/cli/jvm/help.out | 1 + 4 files changed, 13 insertions(+) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/Usage.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/Usage.java index 44d342ff682..910fba361fb 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/Usage.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/Usage.java @@ -53,6 +53,7 @@ public class Usage { appendln(sb, "Advanced options are non-standard and may be changed or removed without any notice."); } else { + renderOptionJUsage(sb); renderArgfileUsage(sb); } @@ -103,6 +104,15 @@ public class Usage { appendln(sb, argument.description().replace("\n", "\n" + StringsKt.repeat(" ", OPTION_NAME_PADDING_WIDTH))); } + private static void renderOptionJUsage(@NotNull StringBuilder sb) { + int descriptionStart = sb.length() + OPTION_NAME_PADDING_WIDTH; + sb.append(" -J