From f51e172570d1046e091c69f395351086d54048ec Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 23 Jun 2014 10:05:02 +0400 Subject: [PATCH] Fix kotlinc command line usage information Fix spelling, case, minor grammar --- .../arguments/CommonCompilerArguments.java | 9 ++- .../arguments/K2JSCompilerArguments.java | 4 +- .../arguments/K2JVMCompilerArguments.java | 65 ++++++++++--------- compiler/testData/cli/jvm/help.out | 32 ++++----- compiler/testData/cli/jvm/inline/off.out | 32 ++++----- compiler/testData/cli/jvm/inline/on.out | 32 ++++----- compiler/testData/cli/jvm/inline/wrong.out | 32 ++++----- compiler/testData/cli/jvm/wrongArgument.out | 32 ++++----- 8 files changed, 122 insertions(+), 116 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java index 129348a6203..f276e1cc217 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java @@ -25,15 +25,20 @@ import static org.jetbrains.jet.cli.common.arguments.CommonArgumentConstants.SUP public abstract class CommonCompilerArguments { @Argument(value = "tags", description = "Demarcate each compilation message (error, warning, etc) with an open and close tag") public boolean tags; + @Argument(value = "verbose", description = "Enable verbose logging output") public boolean verbose; + @Argument(value = "version", description = "Display compiler version") public boolean version; - @Argument(value = "help", alias = "h", description = "Show help") + + @Argument(value = "help", alias = "h", description = "Print a synopsis of standard options") public boolean help; + @Argument(value = "suppress", description = "Suppress compiler messages by severity (" + SUPPRESS_WARNINGS + ")") public String suppress; - @Argument(value = "printArgs", description = "Print commandline arguments") + + @Argument(value = "printArgs", description = "Print command line arguments") public boolean printArgs; public List freeArgs = new SmartList(); diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java index bcf0c91fbbf..5ed8f04927a 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java @@ -38,7 +38,7 @@ public class K2JSCompilerArguments extends CommonCompilerArguments { @Argument(value = "sourcemap", description = "Generate SourceMap") public boolean sourcemap; - @Argument(value = "target", description = "Generate js files for specific ECMA version (now support only ECMA 5)") + @Argument(value = "target", description = "Generate JS files for specific ECMA version (only ECMA 5 is supported)") public String target; @Nullable @@ -46,7 +46,7 @@ public class K2JSCompilerArguments extends CommonCompilerArguments { "' or '" + NO_CALL + "', default '" + CALL + "' (main function will be auto detected)") public String main; - @Argument(value = "outputPrefix", description = "Path to file which will be added to the begin of output file") + @Argument(value = "outputPrefix", description = "Path to file which will be added to the beginning of output file") public String outputPrefix; @Argument(value = "outputPostfix", description = "Path to file which will be added to the end of output file") diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java index 6366490a492..75013761f43 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java @@ -15,57 +15,58 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.jetbrains.jet.cli.common.arguments; import com.sampullara.cli.Argument; /** - * Command line arguments for the {@link K2JVMCompiler} + * Command line arguments for K2JVMCompiler */ @SuppressWarnings("UnusedDeclaration") public class K2JVMCompilerArguments extends CommonCompilerArguments { - @Argument(value = "jar", description = "jar file name") - public String jar; - - @Argument(value = "src", description = "source file or directory (allows many paths separated by the system path separator)") + @Argument(value = "src", description = "Source file or directory (allows many paths separated by the system path separator)") public String src; - @Argument(value = "classpath", description = "classpath to use when compiling") - public String classpath; + @Argument(value = "jar", description = "Resulting .jar file path") + public String jar; - @Argument(value = "annotations", description = "paths to external annotations") - public String annotations; - - @Argument(value = "includeRuntime", description = "include Kotlin runtime in to resulting jar") - public boolean includeRuntime; - - @Argument(value = "noJdk", description = "don't include Java runtime into classpath") - public boolean noJdk; - - @Argument(value = "noStdlib", description = "don't include Kotlin runtime into classpath") - public boolean noStdlib; - - @Argument(value = "noJdkAnnotations", description = "don't include JDK external annotations into classpath") - public boolean noJdkAnnotations; - - @Argument(value = "notNullAssertions", description = "generate not-null assertion after each invocation of method returning not-null") - public boolean notNullAssertions; - - @Argument(value = "notNullParamAssertions", description = "generate not-null assertions on parameters of methods accessible from Java") - public boolean notNullParamAssertions; - - @Argument(value = "output", description = "output directory") + @Argument(value = "output", description = "Output directory path for .class files") public String outputDir; - @Argument(value = "module", description = "module to compile") + @Argument(value = "classpath", description = "Paths where to find user class files") + public String classpath; + + @Argument(value = "annotations", description = "Paths to external annotations") + public String annotations; + + @Argument(value = "includeRuntime", description = "Include Kotlin runtime in to resulting .jar") + public boolean includeRuntime; + + @Argument(value = "noJdk", description = "Don't include Java runtime into classpath") + public boolean noJdk; + + @Argument(value = "noStdlib", description = "Don't include Kotlin runtime into classpath") + public boolean noStdlib; + + @Argument(value = "noJdkAnnotations", description = "Don't include JDK external annotations into classpath") + public boolean noJdkAnnotations; + + @Argument(value = "notNullAssertions", description = "Generate not-null assertion after each invocation of method returning not-null") + public boolean notNullAssertions; + + @Argument(value = "notNullParamAssertions", description = "Generate not-null assertions on parameters of methods accessible from Java") + public boolean notNullParamAssertions; + + @Argument(value = "module", description = "Path to the module file to compile") public String module; - @Argument(value = "script", description = "evaluate script") + @Argument(value = "script", description = "Evaluate the script file") public boolean script; @Argument(value = "kotlinHome", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery") public String kotlinHome; - @Argument(value = "inline", description = "Inlining mode: on/off or true/false (default is on)") + @Argument(value = "inline", description = "Inlining mode: on/off (default is on)") public String inline; } diff --git a/compiler/testData/cli/jvm/help.out b/compiler/testData/cli/jvm/help.out index b4de49e89ce..e1b9c316922 100644 --- a/compiler/testData/cli/jvm/help.out +++ b/compiler/testData/cli/jvm/help.out @@ -1,23 +1,23 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -jar [String] jar file name - -src [String] source file or directory (allows many paths separated by the system path separator) - -classpath [String] classpath to use when compiling - -annotations [String] paths to external annotations - -includeRuntime [flag] include Kotlin runtime in to resulting jar - -noJdk [flag] don't include Java runtime into classpath - -noStdlib [flag] don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] don't include JDK external annotations into classpath - -notNullAssertions [flag] generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] generate not-null assertions on parameters of methods accessible from Java - -output [String] output directory - -module [String] module to compile - -script [flag] evaluate script + -src [String] Source file or directory (allows many paths separated by the system path separator) + -jar [String] Resulting .jar file path + -output [String] Output directory path for .class files + -classpath [String] Paths where to find user class files + -annotations [String] Paths to external annotations + -includeRuntime [flag] Include Kotlin runtime in to resulting .jar + -noJdk [flag] Don't include Java runtime into classpath + -noStdlib [flag] Don't include Kotlin runtime into classpath + -noJdkAnnotations [flag] Don't include JDK external annotations into classpath + -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java + -module [String] Path to the module file to compile + -script [flag] Evaluate the script file -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off or true/false (default is on) + -inline [String] Inlining mode: on/off (default is on) -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag -verbose [flag] Enable verbose logging output -version [flag] Display compiler version - -help (-h) [flag] Show help + -help (-h) [flag] Print a synopsis of standard options -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print commandline arguments + -printArgs [flag] Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/off.out b/compiler/testData/cli/jvm/inline/off.out index b4de49e89ce..e1b9c316922 100644 --- a/compiler/testData/cli/jvm/inline/off.out +++ b/compiler/testData/cli/jvm/inline/off.out @@ -1,23 +1,23 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -jar [String] jar file name - -src [String] source file or directory (allows many paths separated by the system path separator) - -classpath [String] classpath to use when compiling - -annotations [String] paths to external annotations - -includeRuntime [flag] include Kotlin runtime in to resulting jar - -noJdk [flag] don't include Java runtime into classpath - -noStdlib [flag] don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] don't include JDK external annotations into classpath - -notNullAssertions [flag] generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] generate not-null assertions on parameters of methods accessible from Java - -output [String] output directory - -module [String] module to compile - -script [flag] evaluate script + -src [String] Source file or directory (allows many paths separated by the system path separator) + -jar [String] Resulting .jar file path + -output [String] Output directory path for .class files + -classpath [String] Paths where to find user class files + -annotations [String] Paths to external annotations + -includeRuntime [flag] Include Kotlin runtime in to resulting .jar + -noJdk [flag] Don't include Java runtime into classpath + -noStdlib [flag] Don't include Kotlin runtime into classpath + -noJdkAnnotations [flag] Don't include JDK external annotations into classpath + -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java + -module [String] Path to the module file to compile + -script [flag] Evaluate the script file -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off or true/false (default is on) + -inline [String] Inlining mode: on/off (default is on) -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag -verbose [flag] Enable verbose logging output -version [flag] Display compiler version - -help (-h) [flag] Show help + -help (-h) [flag] Print a synopsis of standard options -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print commandline arguments + -printArgs [flag] Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/on.out b/compiler/testData/cli/jvm/inline/on.out index b4de49e89ce..e1b9c316922 100644 --- a/compiler/testData/cli/jvm/inline/on.out +++ b/compiler/testData/cli/jvm/inline/on.out @@ -1,23 +1,23 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -jar [String] jar file name - -src [String] source file or directory (allows many paths separated by the system path separator) - -classpath [String] classpath to use when compiling - -annotations [String] paths to external annotations - -includeRuntime [flag] include Kotlin runtime in to resulting jar - -noJdk [flag] don't include Java runtime into classpath - -noStdlib [flag] don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] don't include JDK external annotations into classpath - -notNullAssertions [flag] generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] generate not-null assertions on parameters of methods accessible from Java - -output [String] output directory - -module [String] module to compile - -script [flag] evaluate script + -src [String] Source file or directory (allows many paths separated by the system path separator) + -jar [String] Resulting .jar file path + -output [String] Output directory path for .class files + -classpath [String] Paths where to find user class files + -annotations [String] Paths to external annotations + -includeRuntime [flag] Include Kotlin runtime in to resulting .jar + -noJdk [flag] Don't include Java runtime into classpath + -noStdlib [flag] Don't include Kotlin runtime into classpath + -noJdkAnnotations [flag] Don't include JDK external annotations into classpath + -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java + -module [String] Path to the module file to compile + -script [flag] Evaluate the script file -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off or true/false (default is on) + -inline [String] Inlining mode: on/off (default is on) -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag -verbose [flag] Enable verbose logging output -version [flag] Display compiler version - -help (-h) [flag] Show help + -help (-h) [flag] Print a synopsis of standard options -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print commandline arguments + -printArgs [flag] Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/wrong.out b/compiler/testData/cli/jvm/inline/wrong.out index b94cebe4b2a..5a8e2d2e7e4 100644 --- a/compiler/testData/cli/jvm/inline/wrong.out +++ b/compiler/testData/cli/jvm/inline/wrong.out @@ -1,24 +1,24 @@ Wrong value for inline option: 'wrong'. Should be 'on'/'off' or 'true'/'false' Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -jar [String] jar file name - -src [String] source file or directory (allows many paths separated by the system path separator) - -classpath [String] classpath to use when compiling - -annotations [String] paths to external annotations - -includeRuntime [flag] include Kotlin runtime in to resulting jar - -noJdk [flag] don't include Java runtime into classpath - -noStdlib [flag] don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] don't include JDK external annotations into classpath - -notNullAssertions [flag] generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] generate not-null assertions on parameters of methods accessible from Java - -output [String] output directory - -module [String] module to compile - -script [flag] evaluate script + -src [String] Source file or directory (allows many paths separated by the system path separator) + -jar [String] Resulting .jar file path + -output [String] Output directory path for .class files + -classpath [String] Paths where to find user class files + -annotations [String] Paths to external annotations + -includeRuntime [flag] Include Kotlin runtime in to resulting .jar + -noJdk [flag] Don't include Java runtime into classpath + -noStdlib [flag] Don't include Kotlin runtime into classpath + -noJdkAnnotations [flag] Don't include JDK external annotations into classpath + -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java + -module [String] Path to the module file to compile + -script [flag] Evaluate the script file -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off or true/false (default is on) + -inline [String] Inlining mode: on/off (default is on) -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag -verbose [flag] Enable verbose logging output -version [flag] Display compiler version - -help (-h) [flag] Show help + -help (-h) [flag] Print a synopsis of standard options -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print commandline arguments + -printArgs [flag] Print command line arguments INTERNAL_ERROR \ No newline at end of file diff --git a/compiler/testData/cli/jvm/wrongArgument.out b/compiler/testData/cli/jvm/wrongArgument.out index 4607a19838a..c8be2fd1b49 100644 --- a/compiler/testData/cli/jvm/wrongArgument.out +++ b/compiler/testData/cli/jvm/wrongArgument.out @@ -1,24 +1,24 @@ Invalid argument: -wrongArgument Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -jar [String] jar file name - -src [String] source file or directory (allows many paths separated by the system path separator) - -classpath [String] classpath to use when compiling - -annotations [String] paths to external annotations - -includeRuntime [flag] include Kotlin runtime in to resulting jar - -noJdk [flag] don't include Java runtime into classpath - -noStdlib [flag] don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] don't include JDK external annotations into classpath - -notNullAssertions [flag] generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] generate not-null assertions on parameters of methods accessible from Java - -output [String] output directory - -module [String] module to compile - -script [flag] evaluate script + -src [String] Source file or directory (allows many paths separated by the system path separator) + -jar [String] Resulting .jar file path + -output [String] Output directory path for .class files + -classpath [String] Paths where to find user class files + -annotations [String] Paths to external annotations + -includeRuntime [flag] Include Kotlin runtime in to resulting .jar + -noJdk [flag] Don't include Java runtime into classpath + -noStdlib [flag] Don't include Kotlin runtime into classpath + -noJdkAnnotations [flag] Don't include JDK external annotations into classpath + -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java + -module [String] Path to the module file to compile + -script [flag] Evaluate the script file -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off or true/false (default is on) + -inline [String] Inlining mode: on/off (default is on) -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag -verbose [flag] Enable verbose logging output -version [flag] Display compiler version - -help (-h) [flag] Show help + -help (-h) [flag] Print a synopsis of standard options -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print commandline arguments + -printArgs [flag] Print command line arguments INTERNAL_ERROR \ No newline at end of file