New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Parser comments as a Single Line #106
Comments
When using Bitbucket Server? Have you tried passing the The template is documented here: |
Yes, bitbucket server. I am have tried using
and
both didn't work. |
Turns out this is a feature in Mustache. You can use tripple
|
This did partially what I expected.
BUT, My file is having lines with multiple spaces in a single line.. like this:
But, the comment that is posted, has all the white space and line with This is that I get as comment.
|
I created such a file:
here: Reported with
|
This is not working for me :( message: TOTAL 100 8 92% BTW, I am pushing this from Jenkins Job script. This is the exact command: echo "Posting Test Coverage Report"
java -jar violation.jar \
-project-key $project_key \
-pull-request-id $pr_id \
-repo-slug $repo_slug \
-server-url $server \
-keep-old-comments false \
-create-single-file-comments false \
-create-comment-with-all-single-file-comments true \
-comment-only-changed-files false \
-keystore-path $path \
-keystore-pass $pass \
-v GENERIC "." ".*/coverage_report\.txt\$" "Code Coverage Reporter" \
-comment-template "
message:
\\\`\\\`\\\`
{{{violation.message}}}
\\\`\\\`\\\`"
echo "Finished Posting Test Coverage Report" |
I see half of the content becoming bold? This is the command I used: Java -jar violation.jar \
-server-url $server \
-pk $proj \
-rs $repo \
-prid $pr \
-keep-old-comments false \
-create-single-file-comments false \
-create-comment-with-all-single-file-comments true \
-comment-only-changed-files false \
-v "GENERIC" "." ".*coverage_report\.txt$" "Generic" \
-keystore-path $PATH \
-keystore-pass $PASS \
-comment-template "
message:
\\\`\\\`\\\`
{{{violation.message}}}
\\\`\\\`\\\`
" |
Strange... And if you manually edit the comment, is it still missing spaces? |
Yes. |
Managed to get it done using this: Java -jar violation.jar \
-server-url $server \
-pk $proj \
-rs $repo \
-prid $pr \
-keep-old-comments false \
-create-single-file-comments false \
-create-comment-with-all-single-file-comments true \
-comment-only-changed-files false \
-v "GENERIC" "." ".*coverage_report\.txt$" "Generic" \
-keystore-path $PATH \
-keystore-pass $PASS \
-comment-template "
message:
~~~
{{{violation.message}}}
~~~
" Thank you so much @tomasbjerre for helping me out. |
Actual: The violation generated by GenericParser is a POST as a single line whatever might be the source.
Excepted: The comments must be multi-lined if the source has them as multi-lined.
The text was updated successfully, but these errors were encountered: