Violation hash changes for same violation from sonarqube web API

Sonarqube Version : 7.9.2 community edition.
Language : Java

Im using sonarqube 7.9.2 community edition. Im using sonar web api to get the violations for a specific file. After few success sonar analysis i have noticed that violation hash of the same violation has changed in two analysis.

Note that all the violations are duplicate violations in that particular file.


1 Like

Hello @lnvithanage,

Let’s clarify what you exactly mean: There’s no such thing as a violation hash. There’s a violation uuid (unique universal id) and a line hash

  • The line hash changes when the code of that line changes (obviously)
  • The violation uuid is not supposed to change during the lifespan of an issue. Sometimes users have a feeling that this uuid changes, but it’s only because the old issue was closed and a new equivalent issue is opened, when a corner case happens (eg a file is removed from a project by accident or exclusions, and added again).


Note: With 8.5 the above corner case is eliminated. If you remove a file and add it again within 30 days (closed issues retention period) the same issue is re-opened instead of creating a new one.


Thank you @OlivierK for your quick response.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.