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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,754
Community Members
 
Community Events
184
Community Groups

Response: 400 Duplicate annotation id from atlassian/checkstyle-report:0.3.2

When submitting an annotation report using atlassian/checkstyle-report:0.3.2 the API returns a Response:400 Bad Request with the message "Duplicate annotation id found in list" (note I set the pipe's DEBUG variable to 'true' to view this output).

Inspecting the request body, there are indeed several duplicate

"external_id" values for the annotation JSON objects being sent.
It would seem this is because the Id calculation does not take into account the column property from the checkstyle-result.xml - e.g. for both of these errors:
<error line="152" column="17" severity="error" message="Missing newline before &quot;)&quot;" source="indent" />

<error line="152" column="18" severity="error" message="Missing newline before &quot;)&quot;" source="indent" />

the same "external_id" value of is calculated. 

Updating the calculation looks like a simple fix:
https://bitbucket.org/atlassian/checkstyle-report/src/9b9fc122542cf8bcbd40c4db9275978497e6185a/src/main/java/com/atlassian/bitbucket/pipelines/checkstyle/report/Main.java#lines-240

 

1 answer

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 17, 2022

@Christopher Hill  hi. Thanks for your feedback.

It's a good idea to contribute with your custom pull request with your suggested solution for this pipe.

 

Regards, Igor

Thank you @Igor Stoyanov . PR submitted.

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 09, 2022

@Christopher Hill  hi. We released new version 0.4.0 of the checkstyle-report pipe including changes according to your PR.

Regards, Igor.

Like Christopher Hill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events