You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
please show an informative error message for unknown parsers. Currently the generic ISSUES parser is not supported. This triggers a very noise Java exception like:
[Pipeline] stage
[Pipeline] { (Test ISSUES parser)
[Pipeline] sh
+ echo '{"fileName":"basic.yml","severity":"ERROR","lineStart":10,"lineEnd":11,"columnStart":110,"columnEnd":120,"message":"some message","description":"some description"}'
+ cat example-out.json
{"fileName":"basic.yml","severity":"ERROR","lineStart":10,"lineEnd":11,"columnStart":110,"columnEnd":120,"message":"some message","description":"some description"}
+ ls -l example-out.json
-rw-r--r-- 1 jenkins jenkins 164 Jan 16 08:21 example-out.json
[Pipeline] }
[Pipeline] // stage
[Pipeline] step
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.IllegalArgumentException: No enum constant se.bjurr.violations.lib.reports.Parser.ISSUES
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:476)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:409)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:329)
Caused: java.lang.IllegalArgumentException: Could not instantiate {parser=ISSUES, pattern=.*example-out.json$, reporter=Custom message for ISSUES parser} for org.jenkinsci.plugins.jvctgl.config.ViolationConfig
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:334)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:474)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerceList(DescribableModel.java:585)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:458)
at org.jenkinsci.plugins.structs.describable.DescribableModel.injectSetters(DescribableModel.java:429)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:331)
<snip>
People who are not (Java) programmers, it is hard to guess the reason of this exception. Therefore I ask you to catch this exception and replace it with an informative error message (example):
ERROR: Unknown parser "...". Please check violationConfigs and configure a known/supported parser.
Hello Tomas,
please show an informative error message for unknown parsers. Currently the generic ISSUES parser is not supported. This triggers a very noise Java exception like:
People who are not (Java) programmers, it is hard to guess the reason of this exception. Therefore I ask you to catch this exception and replace it with an informative error message (example):
Steps to reproduce:
Thank you,
Carsten
The text was updated successfully, but these errors were encountered: