Skip to content

Commit

Permalink
PLUGINAPI-47 Add code variants to issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alain-kermis-sonarsource authored May 8, 2023
1 parent 32af766 commit 2d91621
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,10 @@ interface Flow {
* @since 9.13
*/
List<QuickFix> quickFixes();

/**
* @since 9.17
*/
@CheckForNull
List<String> codeVariants();
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,12 @@ enum FlowType {
*/
NewIssue setRuleDescriptionContextKey(@Nullable String ruleDescriptionContextKey);

/**
* Registers a list of code variants for this issue.
* In C and C++, it is commonplace to have multiple code variants. Two source codes are defined here as variants of each other if there
* is any difference in their preprocessed source code.
* @since 9.17
*/
NewIssue setCodeVariants(@Nullable Iterable<String> codeVariants);

}
6 changes: 6 additions & 0 deletions plugin-api/src/main/java/org/sonar/api/issue/Issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,10 @@ public interface Issue extends Serializable {
* @since 5.1
*/
Collection<String> tags();

/**
* @since 9.17
*/
@CheckForNull
Collection<String> codeVariants();
}

0 comments on commit 2d91621

Please sign in to comment.