blob: 7253b7cf81e615a8a4924713d89e15e3f7709964 (
plain)
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
syntax = "proto3";
package org.sonar.ce.task.projectexport.projectdump;
option java_package = "com.sonarsource.governance.projectdump.protobuf";
option optimize_for = SPEED;
// single message in metadata.pb
message Metadata {
string project_key = 1;
// all component uuids are kept in the target environment, except for the project
// as it has already been provisioned with a different uuid.
string project_uuid = 2;
string sonarqube_version = 3;
int64 dump_date = 4;
}
// Stream of components stored in file components.pb, including project.
// Components are ordered by id, so that parents are
// always located before children.
message Component {
int64 ref = 1;
string key = 2;
string name = 3;
string description = 4;
string scope = 5;
string qualifier = 6;
string language = 7;
string long_name = 8;
string path = 9;
string uuid = 10;
string uuid_path = 12;
reserved 13; // module_uuid
reserved 14; // module_uuid_path
string deprecated_key = 15;
string project_uuid = 16;
reserved 17; // main_branch_project_uuid
}
message Branch {
int64 ref = 1;
string uuid = 2;
string project_uuid = 3;
string kee = 4;
string branch_type = 5;
string merge_branch_uuid = 6;
bool is_main = 7;
}
// Stream of analyses stored in file analyses.pb, including project.
// Only analyses with status 'P' (processed) are exported. They are ordered
// by analysis_date, so that parents are always located before children.
message Analysis {
int64 component_ref = 2;
int64 date = 3;
string project_version = 4;
string period1_mode = 5;
string period1_param = 6;
int64 period1_date = 7;
string uuid = 8;
string build_string = 9;
}
message Metric {
int32 ref = 1;
string key = 2;
string name = 3;
}
message Measure {
int64 component_ref = 1;
string analysis_uuid = 2;
int32 metric_ref = 3;
DoubleValue double_value = 4;
string text_value = 5;
string alert_status = 6;
string alert_text = 7;
DoubleValue variation1 = 8;
}
message LiveMeasure {
int64 component_ref = 1;
string json_value = 2;
}
message DoubleValue {
double value = 1;
}
// Stream of issues stored in file issues.pb
// only issues which status is not 'CLOSED' are exported
// rule_ref field refers to the ref of the Rule message
message Issue {
string uuid = 1;
int64 component_ref = 2;
int32 type = 4;
string message = 5;
int32 line = 6;
string checksum = 7;
bytes locations = 8;
string status = 9;
string resolution = 10;
string severity = 11;
bool manual_severity = 12;
double gap = 13;
int64 effort = 14;
string assignee = 15;
string author = 16;
string tags = 17;
// issue dates
int64 issue_created_at = 19;
int64 issue_updated_at = 20;
int64 issue_closed_at = 21;
string project_uuid = 22;
string rule_ref = 23;
optional string rule_description_context_key = 24;
repeated MessageFormatting message_formattings = 25;
string code_variants = 26;
repeated Impact impacts = 27;
bool prioritized_rule = 28;
}
message Impact {
SoftwareQuality software_quality = 1;
Severity severity = 2;
bool manual_severity = 3;
}
// Stream of issues changelog stored in file issues_changelog.pb
// only changes of issues present in the dump are exported
message IssueChange {
string key = 1;
string issue_uuid = 2;
string project_uuid = 3;
string change_type = 4;
string change_data = 5;
string user_uuid = 6;
int64 created_at = 7;
}
// Stream of rules is stored in file rules.pb
// field ref is a unique rule identifier, internal to the dump.
message Rule {
string key = 2;
string repository = 3;
string ref = 4;
}
// Stream of ad hoc rules is stored in file ad_hoc_rules.pb
// field ref is a unique rule identifier, internal to the dump, starting with 1.
message AdHocRule {
message RuleMetadata {
string ad_hoc_name = 2;
string ad_hoc_description = 3;
string ad_hoc_severity = 4;
int32 ad_hoc_type = 5;
}
string ref = 10;
string plugin_key = 2;
string plugin_rule_key = 3;
string plugin_name = 4;
string name = 5;
string status = 6;
int32 type = 7;
string scope = 8;
RuleMetadata metadata = 9;
repeated Impact impacts = 11;
optional string clean_code_attribute = 12;
}
// stream of messages in settings.pb
message Setting {
string key = 1;
string value = 2;
reserved 3; // component_ref
}
// links specified on the project, and only on the project (not on modules
// nor other components)
message Link {
string type = 1;
string name = 2;
string href = 3;
string uuid = 4;
reserved 5; //component_ref
}
message Event {
string name = 1;
string analysis_uuid = 2;
int64 component_ref = 3;
string category = 4;
string description = 5;
string data = 6;
int64 date = 7;
string uuid = 8;
}
message Plugin {
string key = 1;
string name = 2;
string version = 3;
}
// Stream of line hashes of each Component of type FILE in the dump
// only lines hashes of source file of type SOURCE are exported
message LineHashes {
int64 component_ref = 1;
string hashes = 2;
// this is branch uuid
string project_uuid = 3;
}
message NewCodePeriod {
string uuid = 1;
string project_uuid = 2;
string branch_uuid = 3;
string type = 4;
string value = 5;
int64 created_at = 6;
int64 updated_at = 7;
}
message MessageFormatting {
int32 start = 1;
int32 end = 2;
MessageFormattingType type = 3;
}
enum MessageFormattingType {
CODE = 0;
}
enum SoftwareQuality {
MAINTAINABILITY = 0;
RELIABILITY = 1;
SECURITY = 2;
}
enum Severity {
LOW = 0;
MEDIUM = 1;
HIGH = 2;
INFO = 3;
BLOCKER = 4;
}
|