I'm using variable artity:
final Argument<List<List<String>>> violationsArg =
stringArgument("--violations", "-v")
.variableArity()
.repeated()
.description(
"The violations to look for. <PARSER> <FOLDER> <REGEXP PATTERN> <NAME> where PARSER is one of: "
+ parsersString
+ "\n Example: -v \"JSHINT\" \".\" \".*/jshint.xml$\" \"JSHint\"")
.build();
This works great:
npx violations-command-line -s ERROR -mv 0 \
-v "CHECKSTYLE" "." ".*checkstyle/main\.xml$" "Checkstyle" \
-v "JSHINT" "." ".*jshint/report\.xml$" "JSHint"
But if I move single parameter arguments after arguments with variable arity:
npx violations-command-line \
-v "CHECKSTYLE" "." ".*checkstyle/main\.xml$" "Checkstyle" \
-v "JSHINT" "." ".*jshint/report\.xml$" "JSHint" \
-s ERROR -mv 0
The -s ERROR -mv 0 is parsed as arguments to -v.
Is this intended? What I would have wanted is to have same result as in first example.
https://github.com/tomasbjerre/violations-command-line/blob/master/src/main/java/se/bjurr/violations/main/Runner.java
I'm using variable artity:
This works great:
But if I move single parameter arguments after arguments with variable arity:
The
-s ERROR -mv 0is parsed as arguments to-v.Is this intended? What I would have wanted is to have same result as in first example.
https://github.com/tomasbjerre/violations-command-line/blob/master/src/main/java/se/bjurr/violations/main/Runner.java