jw3 commented on a change in pull request #431:
URL: https://github.com/apache/incubator-daffodil/pull/431#discussion_r504152834



##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -234,7 +236,11 @@ class CLIConf(arguments: Array[String]) extends 
scallop.ScallopConf(arguments)
       case "on" => ValidationMode.Full
       case "limited" => ValidationMode.Limited
       case "off" => ValidationMode.Off
-      case _ => throw new Exception("Unrecognized ValidationMode %s.  Must be 
'on', 'limited' or 'off'.".format(s))
+      case Validator.MultiArgsPattern(str, args) if Validators.exists(str) =>
+        ValidationMode.Custom(str, args.split(",").map(_.split("=")).map(kv => 
Validator.Argument(kv.head, kv.last)))
+      case Validator.DefaultArgPattern(str, arg) if Validators.exists(str) => 
ValidationMode.Custom(str, Seq(Validator.Argument(arg)))
+      case Validator.NoArgsPattern(str) if Validators.exists(str) => 
ValidationMode.Custom(str, Seq.empty)

Review comment:
       Sounds good.  They are only useful to CLI but wasnt sure where to stash 
them.




----------------------------------------------------------------
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