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
|
// SonarQube, open source software quality management tool.
// Copyright (C) 2008-2015 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;
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;
// debt fields
optional string defaultDebtChar = 23;
optional string defaultDebtSubChar = 24;
optional string debtChar = 25;
optional string debtSubChar = 26;
optional string debtCharName = 27;
optional string debtSubCharName = 28;
optional string defaultDebtRemFnType = 29;
optional string defaultDebtRemFnCoeff = 30;
optional string defaultDebtRemFnOffset = 31;
optional string effortToFixDescription = 32;
optional bool debtOverloaded = 33;
optional string debtRemFnType = 34;
optional string debtRemFnCoeff = 35;
optional string debtRemFnOffset = 36;
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 SysTags {
repeated string sysTags = 1;
}
message Tags {
repeated string tags = 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;
optional string parent = 4;
repeated Param params = 5;
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;
}
|