CLI: Add documentation for -J argument in kotlinc -help

This commit is contained in:
Xin Wang
2021-05-11 16:30:49 +08:00
committed by Alexander Udalov
parent 1407af6301
commit b9209962cd
4 changed files with 13 additions and 0 deletions
@@ -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<option>");
while (sb.length() < descriptionStart) {
sb.append(" ");
}
appendln(sb, "Pass an option directly to JVM");
}
private static void renderArgfileUsage(@NotNull StringBuilder sb) {
int descriptionStart = sb.length() + OPTION_NAME_PADDING_WIDTH;
sb.append(" ");