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(" ");
+1
View File
@@ -10,5 +10,6 @@ where possible options include:
-nowarn Generate no warnings
-verbose Enable verbose logging output
-version Display compiler version
-J<option> Pass an option directly to JVM
@<argfile> Read compiler arguments and file paths from the given file
OK
+1
View File
@@ -32,6 +32,7 @@ where possible options include:
-nowarn Generate no warnings
-verbose Enable verbose logging output
-version Display compiler version
-J<option> Pass an option directly to JVM
@<argfile> Read compiler arguments and file paths from the given file
For details, see https://kotl.in/cli
+1
View File
@@ -30,6 +30,7 @@ where possible options include:
-nowarn Generate no warnings
-verbose Enable verbose logging output
-version Display compiler version
-J<option> Pass an option directly to JVM
@<argfile> Read compiler arguments and file paths from the given file
For details, see https://kotl.in/cli