tomasbjerre/violation-comments-to-bitbucket-server-command-line

Bug with -cocf parameter

Closed this issue · 0 comments

Hello! I've been trying to setup this library with a project I'm working on, but I ran into a bug. When I tried running the program I got a Java Exception like this:

Exception in thread "main" java.lang.IllegalArgumentException: -comment-only-changed-files was not found in this result at all. Did you perhaps forget to add it to withArguments(...)?
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
        at shadow.se.softhouse.jargo.ParsedArguments.get(ParsedArguments.java:75)
        at se.bjurr.violations.main.Runner.main(Runner.java:161)
        at se.bjurr.violations.main.Main.main(Main.java:6)

This puzzled me since -cocf should have a default value. When I tried providing the argument to the program, I got this:

Didn't expect -cocf, did you mean one of these?
        -cocc
        -coccc
        -csfct
        -csfc
        -max
        -h
        -prid
        -s
        -pk
        -v
        -rsnull

This also didn't make sense since I npm installed the latest version of this library (1.7.0) which should include support for -cocf.

Thus, I've submitted a proposed file change for what I think should fix this bug - that is, I've added it to withArguments.

Let me know if you have any questions!

Thanks,
Zakey