You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-rules.proto 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.rules;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Rules";
  23. option optimize_for = SPEED;
  24. // WS api/rules/list for internal use only
  25. message ListResponse {
  26. message Rule {
  27. optional string repository = 1;
  28. optional string key = 2;
  29. optional string internal_key = 3;
  30. optional string name = 4;
  31. }
  32. repeated Rule rules = 1;
  33. }
  34. // WS api/rules/search
  35. message SearchResponse {
  36. optional int64 total = 1;
  37. optional int32 p = 2;
  38. optional int64 ps = 3;
  39. repeated Rule rules = 4;
  40. optional Actives actives = 5;
  41. optional QProfiles qProfiles = 6;
  42. optional sonarqube.ws.commons.Facets facets = 7;
  43. }
  44. //WS api/rules/show
  45. message ShowResponse {
  46. optional Rule rule = 1;
  47. repeated Active actives = 3;
  48. }
  49. //WS api/rules/create
  50. message CreateResponse {
  51. optional Rule rule = 1;
  52. }
  53. //WS api/rules/update
  54. message UpdateResponse {
  55. optional Rule rule = 1;
  56. }
  57. message Rule {
  58. optional string key = 1;
  59. optional string repo = 2;
  60. optional string name = 3;
  61. optional string createdAt = 4;
  62. optional string htmlDesc = 5;
  63. optional string htmlNote = 6;
  64. optional string mdDesc = 7;
  65. optional string mdNote = 8;
  66. optional string noteLogin = 9;
  67. optional string severity = 10;
  68. optional sonarqube.ws.commons.RuleStatus status = 11;
  69. optional string internalKey = 12;
  70. optional bool isTemplate = 13;
  71. optional string templateKey = 14;
  72. optional Tags tags = 15;
  73. optional SysTags sysTags = 16;
  74. optional string lang = 19;
  75. optional string langName = 20;
  76. optional Params params = 21;
  77. // characteristic fields, unsupported since 5.5
  78. optional string unusedDefaultDebtChar = 23;
  79. optional string unusedDefaultDebtSubChar = 24;
  80. optional string unusedDebtChar = 25;
  81. optional string unusedDebtSubChar = 26;
  82. optional string unusedDebtCharName = 27;
  83. optional string unusedDebtSubCharName = 28;
  84. // Deprecated since 5.5, replaced by defaultRemFnType
  85. optional string defaultDebtRemFnType = 29;
  86. // Deprecated since 5.5, replaced by defaultRemFnGapMultiplier
  87. optional string defaultDebtRemFnCoeff = 30;
  88. // Deprecated since 5.5, replaced by defaultRemFnBaseEffort
  89. optional string defaultDebtRemFnOffset = 31;
  90. // Deprecated since 5.5, replaced by gapDescription
  91. optional string effortToFixDescription = 32;
  92. // Deprecated since 5.5, replaced by remFnOverloaded
  93. optional bool debtOverloaded = 33;
  94. // Deprecated since 5.5, replaced by remFnType
  95. optional string debtRemFnType = 34;
  96. // Deprecated since 5.5, replaced by remFnGapMultiplier
  97. optional string debtRemFnCoeff = 35;
  98. // Deprecated since 5.5, replaced by remFnBaseEffort
  99. optional string debtRemFnOffset = 36;
  100. optional string defaultRemFnType = 38;
  101. optional string defaultRemFnGapMultiplier = 39;
  102. optional string defaultRemFnBaseEffort = 40;
  103. optional string remFnType = 41;
  104. optional string remFnGapMultiplier = 42;
  105. optional string remFnBaseEffort = 43;
  106. optional bool remFnOverloaded = 45;
  107. optional string gapDescription = 44;
  108. optional sonarqube.ws.commons.RuleScope scope = 46;
  109. optional bool isExternal = 47;
  110. optional sonarqube.ws.commons.RuleType type = 37;
  111. message Params {
  112. repeated Param params = 1;
  113. }
  114. message Param {
  115. optional string key = 1;
  116. optional string htmlDesc = 2;
  117. optional string defaultValue = 3;
  118. optional string type = 4;
  119. }
  120. }
  121. message SysTags {
  122. repeated string sysTags = 1;
  123. }
  124. message Tags {
  125. repeated string tags = 1;
  126. }
  127. message Actives {
  128. map<string, ActiveList> actives = 1;
  129. }
  130. message ActiveList {
  131. repeated Active activeList = 1;
  132. }
  133. message Active {
  134. optional string qProfile = 1;
  135. optional string inherit = 2;
  136. optional string severity = 3;
  137. // Unused since 5.6, it has been removed because it was never used and costly to compute
  138. optional string unusedParent = 4;
  139. repeated Param params = 5;
  140. optional string createdAt = 6;
  141. optional string updatedAt = 7;
  142. message Param {
  143. optional string key = 1;
  144. optional string value = 2;
  145. }
  146. }
  147. message QProfiles {
  148. map<string,QProfile> qProfiles = 1;
  149. }
  150. message QProfile {
  151. optional string name = 1;
  152. optional string lang = 2;
  153. optional string langName = 3;
  154. optional string parent = 4;
  155. }