CLI: change argument naming convention

As in all other Unix/POSIX tools and JVM language compilers, multiple words
comprising the argument name should be lowercase, separated by dashes
This commit is contained in:
Alexander Udalov
2014-08-01 21:19:41 -05:00
parent 6da95e2cea
commit cf431ffab0
18 changed files with 52 additions and 60 deletions
@@ -23,20 +23,17 @@ import org.jetbrains.annotations.Nullable;
import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.CALL;
import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.NO_CALL;
/**
* NOTE: for now K2JSCompiler supports only minimal amount of parameters required to launch it from the plugin.
*/
public class K2JSCompilerArguments extends CommonCompilerArguments {
@Argument(value = "output", description = "Output file path")
@ValueDescription("<path>")
public String outputFile;
@Argument(value = "libraryFiles", description = "Path to zipped library sources or kotlin files separated by commas")
@Argument(value = "library-files", description = "Path to zipped library sources or kotlin files separated by commas")
@ValueDescription("<path[,]>")
public String[] libraryFiles;
@Argument(value = "sourcemap", description = "Generate SourceMap")
public boolean sourcemap;
@Argument(value = "source-map", description = "Generate source map")
public boolean sourceMap;
@Argument(value = "target", description = "Generate JS files for specific ECMA version (only ECMA 5 is supported)")
@ValueDescription("<version>")
@@ -47,11 +44,11 @@ public class K2JSCompilerArguments extends CommonCompilerArguments {
@ValueDescription("{" + CALL + "," + NO_CALL + "}")
public String main;
@Argument(value = "outputPrefix", description = "Path to file which will be added to the beginning of output file")
@Argument(value = "output-prefix", description = "Path to file which will be added to the beginning of output file")
@ValueDescription("<path>")
public String outputPrefix;
@Argument(value = "outputPostfix", description = "Path to file which will be added to the end of output file")
@Argument(value = "output-postfix", description = "Path to file which will be added to the end of output file")
@ValueDescription("<path>")
public String outputPostfix;
@@ -19,10 +19,6 @@ package org.jetbrains.jet.cli.common.arguments;
import com.sampullara.cli.Argument;
import org.jetbrains.annotations.NotNull;
/**
* Command line arguments for K2JVMCompiler
*/
@SuppressWarnings("UnusedDeclaration")
public class K2JVMCompilerArguments extends CommonCompilerArguments {
@Argument(value = "d", description = "Destination for generated class files")
@ValueDescription("<directory|jar>")
@@ -36,16 +32,16 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@ValueDescription("<path>")
public String annotations;
@Argument(value = "includeRuntime", description = "Include Kotlin runtime in to resulting .jar")
@Argument(value = "include-runtime", description = "Include Kotlin runtime in to resulting .jar")
public boolean includeRuntime;
@Argument(value = "noJdk", description = "Don't include Java runtime into classpath")
@Argument(value = "no-jdk", description = "Don't include Java runtime into classpath")
public boolean noJdk;
@Argument(value = "noStdlib", description = "Don't include Kotlin runtime into classpath")
@Argument(value = "no-stdlib", description = "Don't include Kotlin runtime into classpath")
public boolean noStdlib;
@Argument(value = "noJdkAnnotations", description = "Don't include JDK external annotations into classpath")
@Argument(value = "no-jdk-annotations", description = "Don't include JDK external annotations into classpath")
public boolean noJdkAnnotations;
@Argument(value = "module", description = "Path to the module file to compile")
@@ -55,7 +51,7 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@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")
@Argument(value = "kotlin-home", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery")
@ValueDescription("<path>")
public String kotlinHome;