tuxji commented on a change in pull request #557:
URL: https://github.com/apache/daffodil/pull/557#discussion_r630472206



##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -319,40 +319,39 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
   shortSubcommandsHelp()
 
   // Global Options
-  val debug = opt[Option[String]](argName = "file", descr = "enable debugging. 
Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
-  val trace = opt[Boolean](descr = "run the debugger with verbose trace 
output")
-  val verbose = tally(descr = "increment verbosity level, one level for each 
-v")
-  val version = opt[Boolean](descr = "Show version of this program")
+  val debug = opt[Option[String]](argName = "file", descr = "Enable the 
interactive debugger. Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
+  val trace = opt[Boolean](descr = "Run this program with verbose trace 
output")
+  val verbose = tally(descr = "Increment verbosity level, one level for each 
-v")
+  val version = opt[Boolean](descr = "Show Daffodil's version")
 
   // Parse Subcommand Options
   object parse extends scallop.Subcommand("parse") {
-    banner("""|Usage: daffodil parse (-s <schema> [-r [{namespace}]<root>] [-p 
<path>] |
+    banner("""|Usage: daffodil parse (-s <schema> [-r [{<namespace>}]<root>] 
[-p <path>] |

Review comment:
       Good idea.  I incorporated your suggestion to remove `[{<namespace>}]` 
everywhere it occurred in the in-program help and site documentation and just 
say you can prefix root elements and variable names with `{namespace}`.  I like 
how that change shortened the usage lines too.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -319,40 +319,39 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
   shortSubcommandsHelp()
 
   // Global Options
-  val debug = opt[Option[String]](argName = "file", descr = "enable debugging. 
Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
-  val trace = opt[Boolean](descr = "run the debugger with verbose trace 
output")
-  val verbose = tally(descr = "increment verbosity level, one level for each 
-v")
-  val version = opt[Boolean](descr = "Show version of this program")
+  val debug = opt[Option[String]](argName = "file", descr = "Enable the 
interactive debugger. Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
+  val trace = opt[Boolean](descr = "Run this program with verbose trace 
output")
+  val verbose = tally(descr = "Increment verbosity level, one level for each 
-v")
+  val version = opt[Boolean](descr = "Show Daffodil's version")

Review comment:
       I believe most people find it easier to read phrases if they begin with 
upper case characters.  I wouldn't have minded the lower case characters 
terribly, but Scallop printed its own option descriptions (e.g., Show help 
message) with upper case characters so I think it's better to be consistent and 
begin every phrase the same way.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -319,40 +319,39 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
   shortSubcommandsHelp()
 
   // Global Options
-  val debug = opt[Option[String]](argName = "file", descr = "enable debugging. 
Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
-  val trace = opt[Boolean](descr = "run the debugger with verbose trace 
output")
-  val verbose = tally(descr = "increment verbosity level, one level for each 
-v")
-  val version = opt[Boolean](descr = "Show version of this program")
+  val debug = opt[Option[String]](argName = "file", descr = "Enable the 
interactive debugger. Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
+  val trace = opt[Boolean](descr = "Run this program with verbose trace 
output")
+  val verbose = tally(descr = "Increment verbosity level, one level for each 
-v")
+  val version = opt[Boolean](descr = "Show Daffodil's version")
 
   // Parse Subcommand Options
   object parse extends scallop.Subcommand("parse") {
-    banner("""|Usage: daffodil parse (-s <schema> [-r [{namespace}]<root>] [-p 
<path>] |
+    banner("""|Usage: daffodil parse (-s <schema> [-r [{<namespace>}]<root>] 
[-p <path>] |
               |                       -P <parser>)
-              |                      [--validate [mode]]
-              |                      [-D[{namespace}]<variable>=<value>...] 
[-o <output>]
-              |                      [-I <infoset_type>]
-              |                      [--stream]
-              |                      [-c <file>] [infile]
+              |                      [-D[{<namespace>}]<variable>=<value>...] 
[-o <output>]
+              |                      [-V [mode]] [--stream] [-I 
<infoset_type>] [-c <file>]
+              |                      [infile]
               |
               |Parse a file, using either a DFDL schema or a saved parser
               |
               |Parse Options:""".stripMargin)
 
-    descr("parse data to a DFDL infoset")
+    descr("Parse data to a DFDL infoset")
     helpWidth(76)
 
-    val schema = opt[URI]("schema", argName = "file", descr = "the annotated 
DFDL schema to use to create the parser.")(fileResourceURIConverter)
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
first schema")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val parser = opt[File](short = 'P', argName = "file", descr = "use a 
previously saved parser.")
-    val output = opt[String](argName = "file", descr = "write output to a 
given file. If not given or is -, output is written to stdout.")
-    val validate: ScallopOption[ValidationMode.Type] = 
opt[ValidationMode.Type](short = 'V', default = Some(ValidationMode.Off), 
argName = "mode", descr = "the validation mode. 'on', 'limited', 'off', or a 
validator plugin name.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used when parsing. An optional namespace may be 
provided.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when parsing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
-    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "infoset type to output. Must be one of 'xml', 
'scala-xml', 'json', 'jdom', 'w3cdom', 'sax', or 'null'.", default = 
Some(InfosetType.XML))
-    val stream = toggle(noshort = true, default = Some(false), descrYes = 
"when left over data exists, parse again with remaining data, separating 
infosets by a NUL character", descrNo = "stop after the first parse, even if 
left over data exists")
-    val infile = trailArg[String](required = false, descr = "input file to 
parse. If not specified, or a value of -, reads from stdin.")
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when parsing. An optional namespace may be 
provided.")
+    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "Infoset type to output. Use 'xml', 'scala-xml', 
'json', 'jdom', 'w3cdom', 'sax', or 'null'.", default = Some(InfosetType.XML))
+    val output = opt[String](argName = "file", descr = "Output file to write 
infoset to. If not given or is -, infoset is written to stdout.")
+    val parser = opt[File](short = 'P', argName = "file", descr = "Use a 
previously saved parser")
+    val path = opt[String](argName = "path", descr = "Path from root element 
to node from which to start parsing")

Review comment:
       Good suggestion.  I've added `hidden = true` to the path option and 
removed it from all usages and the site documentation.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -319,40 +319,39 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
   shortSubcommandsHelp()
 
   // Global Options
-  val debug = opt[Option[String]](argName = "file", descr = "enable debugging. 
Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
-  val trace = opt[Boolean](descr = "run the debugger with verbose trace 
output")
-  val verbose = tally(descr = "increment verbosity level, one level for each 
-v")
-  val version = opt[Boolean](descr = "Show version of this program")
+  val debug = opt[Option[String]](argName = "file", descr = "Enable the 
interactive debugger. Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
+  val trace = opt[Boolean](descr = "Run this program with verbose trace 
output")
+  val verbose = tally(descr = "Increment verbosity level, one level for each 
-v")
+  val version = opt[Boolean](descr = "Show Daffodil's version")
 
   // Parse Subcommand Options
   object parse extends scallop.Subcommand("parse") {
-    banner("""|Usage: daffodil parse (-s <schema> [-r [{namespace}]<root>] [-p 
<path>] |
+    banner("""|Usage: daffodil parse (-s <schema> [-r [{<namespace>}]<root>] 
[-p <path>] |
               |                       -P <parser>)
-              |                      [--validate [mode]]
-              |                      [-D[{namespace}]<variable>=<value>...] 
[-o <output>]
-              |                      [-I <infoset_type>]
-              |                      [--stream]
-              |                      [-c <file>] [infile]
+              |                      [-D[{<namespace>}]<variable>=<value>...] 
[-o <output>]
+              |                      [-V [mode]] [--stream] [-I 
<infoset_type>] [-c <file>]
+              |                      [infile]
               |
               |Parse a file, using either a DFDL schema or a saved parser
               |
               |Parse Options:""".stripMargin)
 
-    descr("parse data to a DFDL infoset")
+    descr("Parse data to a DFDL infoset")
     helpWidth(76)
 
-    val schema = opt[URI]("schema", argName = "file", descr = "the annotated 
DFDL schema to use to create the parser.")(fileResourceURIConverter)
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
first schema")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val parser = opt[File](short = 'P', argName = "file", descr = "use a 
previously saved parser.")
-    val output = opt[String](argName = "file", descr = "write output to a 
given file. If not given or is -, output is written to stdout.")
-    val validate: ScallopOption[ValidationMode.Type] = 
opt[ValidationMode.Type](short = 'V', default = Some(ValidationMode.Off), 
argName = "mode", descr = "the validation mode. 'on', 'limited', 'off', or a 
validator plugin name.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used when parsing. An optional namespace may be 
provided.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when parsing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
-    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "infoset type to output. Must be one of 'xml', 
'scala-xml', 'json', 'jdom', 'w3cdom', 'sax', or 'null'.", default = 
Some(InfosetType.XML))
-    val stream = toggle(noshort = true, default = Some(false), descrYes = 
"when left over data exists, parse again with remaining data, separating 
infosets by a NUL character", descrNo = "stop after the first parse, even if 
left over data exists")
-    val infile = trailArg[String](required = false, descr = "input file to 
parse. If not specified, or a value of -, reads from stdin.")
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when parsing. An optional namespace may be 
provided.")

Review comment:
       I'm ordering these vals by the short value so that these lines of source 
code will follow the same order as the lines of option descriptions printed in 
the terminal and displayed in the site's cli.md documentation.  That makes it 
easier to look between the terminal, the browser, and the editor and make sure 
everything looks consistent.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -370,78 +369,34 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
 
   }
 
-  // Performance Subcommand Options
-  object performance extends scallop.Subcommand("performance") {
-    banner("""|Usage: daffodil performance (-s <schema> [-r 
[{namespace}]<root>] [-p <path>] |
-              |                       -P <parser>)
-              |                      [--unparse]
-              |                      [--validate [mode]]
-              |                      [-N <number of files to process>]
-              |                      [-t <threadcount>]
-              |                      [-D[{namespace}]<variable>=<value>...]
-              |                      [-I <infoset_type>]
-              |                      [-c <file>] <infile>
-              |
-              |Run a performance test (parse or unparse), using either a DFDL 
schema or a saved parser
-              |
-              |Performance Options:""".stripMargin)
-
-    descr("run performance test")
-    helpWidth(76)
-
-    val schema = opt[URI]("schema", argName = "file", descr = "the annotated 
DFDL schema to use to create the parser.")(fileResourceURIConverter)
-    val unparse = opt[Boolean](default = Some(false), descr = "perform unparse 
instead of parse for performance.")
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
schema")
-    val number = opt[Int](short = 'N', argName = "number", default = Some(1), 
descr = "The total number of files to process.")
-    val threads = opt[Int](short = 't', argName = "threads", default = 
Some(1), descr = "The number of threads to use.")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val parser = opt[File](short = 'P', argName = "file", descr = "use a 
previously saved parser.")
-    val validate: ScallopOption[ValidationMode.Type] = 
opt[ValidationMode.Type](short = 'V', default = Some(ValidationMode.Off), 
argName = "mode", descr = "the validation mode. 'on', 'limited', 'off', or a 
validator plugin name.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used when processing. An optional namespace may be 
provided.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when processing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
-    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "infoset type to parse/unparse. Must be one of 'xml', 
'scala-xml', 'json', 'jdom', 'w3cdom', 'sax', or 'null'.", default = 
Some(InfosetType.XML))
-    val infile = trailArg[String](required = true, descr = "input file or 
directory containing files to process.")
-
-    requireOne(schema, parser) // must have one of --schema or --parser
-    conflicts(parser, List(rootNS)) // if --parser is provided, cannot also 
provide --root
-    validateFileIsFile(config) // --config must be a file that exists
-
-    validateOpt(infosetType, unparse) {
-      case (Some(InfosetType.NULL), Some(true)) => Left("null infoset type not 
valid with performance --unparse")
-      case _ => Right(Unit)
-    }
-  }
-
   // Unparse Subcommand Options
   object unparse extends scallop.Subcommand("unparse") {
-    banner("""|Usage: daffodil unparse (-s <schema> [-r [{namespace}]<root>] 
[-p <path>] |
+    banner("""|Usage: daffodil unparse (-s <schema> [-r [{<namespace>}]<root>] 
[-p <path>] |
               |                         -P <parser>)
-              |                        [--validate [mode]]
-              |                        [-D[{namespace}]<variable>=<value>...] 
[-c <file>]
-              |                        [-I <infoset_type>]
-              |                        [--stream]
-              |                        [-o <output>] [infile]
+              |                        
[-D[{<namespace>}]<variable>=<value>...] [-o <output>]
+              |                        [-V [mode]] [--stream] [-I 
<infoset_type>] [-c <file>]
+              |                        [infile]
               |
               |Unparse an infoset file, using either a DFDL schema or a saved 
parser
               |
               |Unparse Options:""".stripMargin)
 
-    descr("unparse a DFDL infoset")
+    descr("Unparse a DFDL infoset")
     helpWidth(76)
 
-    val schema = opt[URI]("schema", argName = "file", descr = "the annotated 
DFDL schema to use to create the parser.")(fileResourceURIConverter)
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
schema")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val parser = opt[File](short = 'P', argName = "file", descr = "use a 
previously saved parser.")
-    val output = opt[String](argName = "file", descr = "write output to file. 
If not given or is -, output is written to standard output.")
-    val validate: ScallopOption[ValidationMode.Type] = 
opt[ValidationMode.Type](short = 'V', default = Some(ValidationMode.Off), 
argName = "mode", descr = "the validation mode. 'on', 'limited', 'off', or a 
validator plugin name.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used when unparsing. An optional namespace may be 
provided.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when parsing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
-    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "infoset type to unparse. Must be one of 'xml', 
'scala-xml', 'json', 'jdom', 'w3cdom' or 'sax'.", default = 
Some(InfosetType.XML))
-    val stream = toggle(noshort = true, default = Some(false), descrYes = 
"split the input data on the NUL character, and unparse each chuck separately", 
descrNo = "treat the entire input data as one infoset")
-    val infile = trailArg[String](required = false, descr = "input file to 
unparse. If not specified, or a value of -, reads from stdin.")
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when unparsing. An optional namespace may be 
provided.")
+    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "Infoset type to unparse. Use 'xml', 'scala-xml', 
'json', 'jdom', 'w3cdom', or 'sax'.", default = Some(InfosetType.XML))
+    val output = opt[String](argName = "file", descr = "Output file to write 
unparsed infoset to. If not given or is -, unparsed infoset is written to 
stdout.")

Review comment:
       I went with just "data" as Steve suggested; sometimes saying less is 
easier to understand.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -319,40 +319,39 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
   shortSubcommandsHelp()
 
   // Global Options
-  val debug = opt[Option[String]](argName = "file", descr = "enable debugging. 
Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
-  val trace = opt[Boolean](descr = "run the debugger with verbose trace 
output")
-  val verbose = tally(descr = "increment verbosity level, one level for each 
-v")
-  val version = opt[Boolean](descr = "Show version of this program")
+  val debug = opt[Option[String]](argName = "file", descr = "Enable the 
interactive debugger. Optionally, read initial debugger commands from [file] if 
provided.")(optionalValueConverter[String](a => a))
+  val trace = opt[Boolean](descr = "Run this program with verbose trace 
output")
+  val verbose = tally(descr = "Increment verbosity level, one level for each 
-v")
+  val version = opt[Boolean](descr = "Show Daffodil's version")
 
   // Parse Subcommand Options
   object parse extends scallop.Subcommand("parse") {
-    banner("""|Usage: daffodil parse (-s <schema> [-r [{namespace}]<root>] [-p 
<path>] |
+    banner("""|Usage: daffodil parse (-s <schema> [-r [{<namespace>}]<root>] 
[-p <path>] |
               |                       -P <parser>)
-              |                      [--validate [mode]]
-              |                      [-D[{namespace}]<variable>=<value>...] 
[-o <output>]
-              |                      [-I <infoset_type>]
-              |                      [--stream]
-              |                      [-c <file>] [infile]
+              |                      [-D[{<namespace>}]<variable>=<value>...] 
[-o <output>]

Review comment:
       You can prefix a variable name with a namespace URI enclosed in curly 
braces, but I took all those out since all the different `[{<` characters used 
together just looks confusing like Steve said.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -458,53 +413,94 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
     }
   }
 
-  // Save Subcommand Options
+  // Save Parser Subcommand Options
   object save extends scallop.Subcommand("save-parser") {
-    banner("""|Usage: daffodil save-parser -s <schema> [-r [{namespace}]<root>]
-              |                            [-p <path>]
-              |                            
[-D[{namespace}]<variable>=<value>...]
-              |                            [-c <file>] [outfile]
+    banner("""|Usage: daffodil save-parser -s <schema> [-r 
[{<namespace>}]<root>] [-p <path>]
+              |                            
[-D[{<namespace>}]<variable>=<value>...] [-c <file>]
+              |                            [outfile]
               |
               |Create and save a parser using a DFDL schema
               |
               |Save Parser Options:""".stripMargin)
 
-    descr("save a daffodil parser for reuse")
+    descr("Save a Daffodil parser for reuse")
     helpWidth(76)
 
-    val schema = opt[URI]("schema", argName = "file", required = true, descr = 
"the annotated DFDL schema to use to create the 
parser.")(fileResourceURIConverter)
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
first schema")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val outfile = trailArg[String](required = false, descr = "output file to 
save parser. If not specified, or a value of -, writes to stdout.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when parsing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when parsing. An optional namespace may be 
provided.")
+    val path = opt[String](argName = "path", descr = "Path from root element 
to node from which to start parsing")
+    val rootNS = opt[RefQName]("root", argName = "node", descr = "The root 
element to use. An optional namespace may be provided. This must be one of the 
top-level elements of the DFDL schema defined with --schema. Requires --schema. 
If not supplied, uses schema's first top-level element.")
+    val schema = opt[URI]("schema", argName = "file", required = true, descr = 
"The annotated DFDL schema to use to create the 
parser")(fileResourceURIConverter)
+    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "Tunable configuration options to change Daffodil's behavior")
+
+    val outfile = trailArg[String](required = false, descr = "Output file to 
save parser to. If not specified, or a value of -, saves to stdout.")
 
     requireOne(schema) // --schema must be provided
     validateFileIsFile(config) // --config must be a file that exists
   }
 
   // Test Subcommand Options
   object test extends scallop.Subcommand("test") {
-    banner("""|Usage: daffodil test <tdmlfile> [testname...]
+    banner("""|Usage: daffodil test [-l] [-r] [-i] <tdmlfile> [testname...]
               |
               |List or execute tests in a TDML file
               |
               |Test Options:""".stripMargin)
 
-    descr("list or execute TDML tests")
+    descr("List or execute TDML tests")
     helpWidth(76)
 
-    val list = opt[Boolean](descr = "show names and descriptions instead of 
running test cases.")
-    val regex = opt[Boolean](descr = "treat <names> as regular expressions.")
-    val tdmlfile = trailArg[String](required = true, descr = "test data markup 
language (TDML) file.")
-    val names = trailArg[List[String]](required = false, descr = "name of test 
case(s) in tdml file. If not given, all tests in tdmlfile are run.")
-    val info = tally(descr = "increment test result information output level, 
one level for each -i")
+    val info = tally(descr = "Increment test result information output level, 
one level for each -i")
+    val list = opt[Boolean](descr = "Show names and descriptions instead of 
running test cases")
+    val regex = opt[Boolean](descr = "Treat <testname...> as regular 
expressions")
+    val tdmlfile = trailArg[String](required = true, descr = "Test Data Markup 
Language (TDML) file")
+    val names = trailArg[List[String]](required = false, descr = "Name(s) of 
test cases in tdmlfile. If not given, all tests in tdmlfile are run.")

Review comment:
       Good suggestion.  I've renamed "names" to "testnames" and updated the 
site documentation to match.

##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -458,53 +413,94 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
     }
   }
 
-  // Save Subcommand Options
+  // Save Parser Subcommand Options
   object save extends scallop.Subcommand("save-parser") {
-    banner("""|Usage: daffodil save-parser -s <schema> [-r [{namespace}]<root>]
-              |                            [-p <path>]
-              |                            
[-D[{namespace}]<variable>=<value>...]
-              |                            [-c <file>] [outfile]
+    banner("""|Usage: daffodil save-parser -s <schema> [-r 
[{<namespace>}]<root>] [-p <path>]
+              |                            
[-D[{<namespace>}]<variable>=<value>...] [-c <file>]
+              |                            [outfile]
               |
               |Create and save a parser using a DFDL schema
               |
               |Save Parser Options:""".stripMargin)
 
-    descr("save a daffodil parser for reuse")
+    descr("Save a Daffodil parser for reuse")
     helpWidth(76)
 
-    val schema = opt[URI]("schema", argName = "file", required = true, descr = 
"the annotated DFDL schema to use to create the 
parser.")(fileResourceURIConverter)
-    val rootNS = opt[RefQName]("root", argName = "node", descr = "the root 
element of the XML file to use.  An optional namespace may be provided. This 
needs to be one of the top-level elements of the DFDL schema defined with 
--schema. Requires --schema. If not supplied uses the first element of the 
first schema")
-    val path = opt[String](argName = "path", descr = "path to the node to 
create parser.")
-    val outfile = trailArg[String](required = false, descr = "output file to 
save parser. If not specified, or a value of -, writes to stdout.")
-    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "variables to be used.")
-    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "daffodil tunable to be used when parsing.")
-    val config = opt[File](short = 'c', argName = "file", descr = "path to 
file containing configuration items.")
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when parsing. An optional namespace may be 
provided.")
+    val path = opt[String](argName = "path", descr = "Path from root element 
to node from which to start parsing")
+    val rootNS = opt[RefQName]("root", argName = "node", descr = "The root 
element to use. An optional namespace may be provided. This must be one of the 
top-level elements of the DFDL schema defined with --schema. Requires --schema. 
If not supplied, uses schema's first top-level element.")
+    val schema = opt[URI]("schema", argName = "file", required = true, descr = 
"The annotated DFDL schema to use to create the 
parser")(fileResourceURIConverter)
+    val tunables = props[String]('T', keyName = "tunable", valueName = 
"value", descr = "Tunable configuration options to change Daffodil's behavior")
+
+    val outfile = trailArg[String](required = false, descr = "Output file to 
save parser to. If not specified, or a value of -, saves to stdout.")
 
     requireOne(schema) // --schema must be provided
     validateFileIsFile(config) // --config must be a file that exists
   }
 
   // Test Subcommand Options
   object test extends scallop.Subcommand("test") {
-    banner("""|Usage: daffodil test <tdmlfile> [testname...]
+    banner("""|Usage: daffodil test [-l] [-r] [-i] <tdmlfile> [testname...]
               |
               |List or execute tests in a TDML file
               |
               |Test Options:""".stripMargin)
 
-    descr("list or execute TDML tests")
+    descr("List or execute TDML tests")
     helpWidth(76)
 
-    val list = opt[Boolean](descr = "show names and descriptions instead of 
running test cases.")
-    val regex = opt[Boolean](descr = "treat <names> as regular expressions.")
-    val tdmlfile = trailArg[String](required = true, descr = "test data markup 
language (TDML) file.")
-    val names = trailArg[List[String]](required = false, descr = "name of test 
case(s) in tdml file. If not given, all tests in tdmlfile are run.")
-    val info = tally(descr = "increment test result information output level, 
one level for each -i")
+    val info = tally(descr = "Increment test result information output level, 
one level for each -i")
+    val list = opt[Boolean](descr = "Show names and descriptions instead of 
running test cases")
+    val regex = opt[Boolean](descr = "Treat <testname...> as regular 
expressions")
+    val tdmlfile = trailArg[String](required = true, descr = "Test Data Markup 
Language (TDML) file")
+    val names = trailArg[List[String]](required = false, descr = "Name(s) of 
test cases in tdmlfile. If not given, all tests in tdmlfile are run.")
+  }
+
+  // Performance Subcommand Options
+  object performance extends scallop.Subcommand("performance") {
+    banner("""|Usage: daffodil performance (-s <schema> [-r 
[{<namespace>}]<root>] [-p <path>] |
+              |                             -P <parser>)
+              |                            
[-D[{<namespace>}]<variable>=<value>...]
+              |                            [-u] [-V [mode]] [-N <number>] [-t 
<threads>]
+              |                            [-I <infoset_type>] [-c <file>]
+              |                            <infile>
+              |
+              |Run a performance test, using either a DFDL schema or a saved 
parser
+              |
+              |Performance Options:""".stripMargin)
+
+    descr("Run performance test")
+    helpWidth(76)
+
+    val config = opt[File](short = 'c', argName = "file", descr = "Path to XML 
file containing configuration items")
+    val vars = props[String]('D', keyName = "variable", valueName = "value", 
descr = "Variables to be used when parsing or unparsing. An optional namespace 
may be provided.")
+    val infosetType = opt[InfosetType.Type](short = 'I', argName = 
"infoset_type", descr = "Infoset type to output or unparse. Must be one of 
'xml', 'scala-xml', 'json', 'jdom', 'w3cdom', 'sax', or 'null'.", default = 
Some(InfosetType.XML))
+    val number = opt[Int](short = 'N', argName = "number", default = Some(1), 
descr = "The total number of files to process. Defaults to 1.")

Review comment:
       I went through the CLI help and site documentation and added "Defaults 
to" in a few more places.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to