diff options
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java index 29a3451d374..01cf4bb0952 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java @@ -426,4 +426,11 @@ public final class Rule { return new Rule().setUniqueKey(repositoryKey, key).setName(name); } + /** + * Create with all required fields + * @since 2.10 + */ + public static Rule create(String repositoryKey, String key) { + return new Rule().setUniqueKey(repositoryKey, key); + } } |