[
https://issues.apache.org/jira/browse/DAFFODIL-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17342678#comment-17342678
]
Steve Lawrence commented on DAFFODIL-2477:
------------------------------------------
Looking at the --validate option, it has a type of ValidationMode.Type. This
means the argument is required. Scallop will implicitly use the
validaeConverter (which is a singleArgConverter), which again, requires an
option. There is no capability with this converter to have an optional option.
As far as I can tell, this has always been this way.
I think in order to get the behavior mentioned in the docs, we need to change a
few things, like make the type of the validate option an
Option[ValidationMode.Type], and likely a few other things so that it converts
correction.
Though, I'm not sure that change is worth it though. Seems easier to just
update the docs to say that the the option arg is mandatory.
> --validate option requires parameter
> ------------------------------------
>
> Key: DAFFODIL-2477
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2477
> Project: Daffodil
> Issue Type: Bug
> Components: CLI
> Affects Versions: 3.0.0
> Reporter: Steve Lawrence
> Priority: Minor
> Labels: beginner
>
> The CLI --validate flag allows an optional "mode" argument to specify whether
> to have full, limited, or no validation. If mode is not specified, it
> defaults to no validation.
> As of Daffodil 3.0.0, this appears to be broken and the mode parameter is
> required. If you do not specify a mode, you get the error:
> {code:java}
> [error] Bad arguments for option 'validate': '' - you should provide exactly
> one argument for this option{code}
> We need to fix this to make it optional again, or if that isn't possible for
> some reason, make it so the documentation is changed to make it clear that
> mode is a required argument.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)