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