Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Checkstyle pipe provides a report with summary information only

Leonid S_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 6, 2020

I was testing checkstyle pipe, but report always show summary information only.

And it says: "There were no annotations provided in this report."

checkstyle_report.png


- step:
name: PHPCS
script:
- php phpcs.phar test.php --report=checkstyle > checkstyle.xml
after-script:
- pipe: atlassian/checkstyle-report:0.2.0
variables:
CHECKSTYLE_RESULT_PATTERN: '.*/checkstyle.xml$'

And no annotations in the Pull Request view.

Report looks like:

<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="3.5.8">
<file name="test.php">
<error line="2" column="1" severity="error" message="Missing file doc comment" source="PEAR.Commenting.FileComment.Missing"/>
</file>
</checkstyle>

 

What am I missing?

 

Log:

Status: Downloaded newer image for bitbucketpipelines/checkstyle-report:0.2.0
Submitted report. Response:200 OK
Exception thrown:java.lang.IllegalArgumentException: 'other' is different type of Path
java.lang.IllegalArgumentException: 'other' is different type of Path
at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
at com.atlassian.bitbucket.pipelines.checkstyle.report.Main.lambda$main$3(Main.java:155)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.atlassian.bitbucket.pipelines.checkstyle.report.Main.main(Main.java:158)

1 answer

1 accepted

1 vote
Answer accepted
mkleint
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2020

Thank you for the detailed report Leonid.

 

You've found a bug in the checkstyle report. I've incorrectly assumed that file paths generated by all tools are absolute but that doesn't appear to be the case for phpcs. I've released a new version of the pipe that should fix the problem. Can you try again with version 0.2.1?

 

Thanks and apologies.

Leonid S_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2020

It works now. Thank you for a quick fix. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events