I am using gerrits plugin to post comments to gerrit. how to post a new line or say, break the comment into multiple newlines?
below is going as a comment on gerrit as single line. I want to break it in two 3 lines. how would i?
noIssuesTitleTemplate : "SonarQube Evaluations.....violations have not been found. CodeCOV on New Code: ${codeCoveragePercent}% and Duplicated Lines on New Code ${codeDuplicates}",
Based on the extra information provided that the Gerrit plugin being used is the jenkinsci / sonar-gerrit-plugin
Add the newline character as
\n\n\n
into your template, append it to the part of the comment where you want to start the next line of the comment.In your example, to break the comment into 3 lines it will be like the following:
This will appear on Gerrit:
Note, that single quotes are used based on the Github page for the plugin, this should ensure that the line breaks are preserved and passed as separate lines to the Gerrit plugin.