Minor, break the line in "kotlinc -help" if it's too long
To improve description of the "pluginOptions" flag
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ public abstract class CommonCompilerArguments {
|
|||||||
@ValueDescription("<path>")
|
@ValueDescription("<path>")
|
||||||
public String[] pluginClasspaths;
|
public String[] pluginClasspaths;
|
||||||
|
|
||||||
@Argument(value = "P", description = "\n Pass an option to a plugin")
|
@Argument(value = "P", description = "Pass an option to a plugin")
|
||||||
@ValueDescription(PLUGIN_OPTION_FORMAT)
|
@ValueDescription(PLUGIN_OPTION_FORMAT)
|
||||||
public String[] pluginOptions;
|
public String[] pluginOptions;
|
||||||
|
|
||||||
|
|||||||
@@ -72,9 +72,16 @@ class Usage {
|
|||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
sb.append(description.value());
|
sb.append(description.value());
|
||||||
}
|
}
|
||||||
while (sb.length() < OPTION_NAME_PADDING_WIDTH - 1) {
|
|
||||||
|
int width = OPTION_NAME_PADDING_WIDTH - 1;
|
||||||
|
if (sb.length() >= width + 5) { // Break the line if it's too long
|
||||||
|
sb.append("\n");
|
||||||
|
width += sb.length();
|
||||||
|
}
|
||||||
|
while (sb.length() < width) {
|
||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
sb.append(argument.description());
|
sb.append(argument.description());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user