Closed oers closed 1 year ago
This can be fixed by switching Mustache to Handlebars, here: https://github.com/tomasbjerre/violation-comments-lib/blob/master/src/main/java/se/bjurr/violations/comments/lib/ViolationRenderer.java
And a user of the tool can use a Handlebars helper to substring the message.
Can i do this via coniguration? Or would I need to "compile" my own version of the plugin?
I implemented this here now: https://github.com/tomasbjerre/violation-comments-lib
Hopefully one of the StringHelpers will solve your issue: https://github.com/jknack/handlebars.java/blob/master/handlebars/src/main/java/com/github/jknack/handlebars/helper/StringHelpers.java
What tool do you use? I would prefer releasing only that tool to begin with. And have it battle tested before releasing all other tools.
I am using the Jenkins Violations to Gitlab Plugin.
Releasing it now as 2.58. Open issue again if not working.
Thx. I will test it after my holiday.
Worked for me with {{{substring violation.message 0 300 }}}, which is not exactly limit to n number of lines. But enough.
Maybe you should reflect this change in the api/possibilities in the README.
Thank you very much for your effort.
I am using the jenkins violation to gitlab plugin. I noticed that violation.message contains the message as a combination of the failure message and the whole content. In may case that is the complete stacktrace of the assertion.
I found no way to limit the output of {{{violation.message}}} to one line (which would be enough in my case)
Would it be possible to just put the into violation.message and the rest into specifics?