|
1 | 1 | // Bun Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 | 3 | exports[`prettier-formatter-gitlab cli should create a code quality report file 1`] = `
|
4 |
| -"[ |
| 4 | +[ |
5 | 5 | {
|
6 |
| - "type": "issue", |
7 | 6 | "check_name": "prettier",
|
8 | 7 | "description": "Replace ·arg·· with arg",
|
9 |
| - "severity": "minor", |
10 | 8 | "fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
|
11 | 9 | "location": {
|
12 |
| - "path": "test/__stubs__/dirty-2.js", |
13 | 10 | "lines": {
|
14 | 11 | "begin": 3,
|
15 |
| - "end": 3 |
16 |
| - } |
17 |
| - } |
| 12 | + "end": 3, |
| 13 | + }, |
| 14 | + "path": "test/__stubs__/dirty-2.js", |
| 15 | + }, |
| 16 | + "severity": "minor", |
| 17 | + "type": "issue", |
18 | 18 | },
|
19 | 19 | {
|
20 |
| - "type": "issue", |
21 | 20 | "check_name": "prettier",
|
22 | 21 | "description": "Insert ;",
|
23 |
| - "severity": "minor", |
24 | 22 | "fingerprint": "d88816112daed6a61fd9d81e964a484b",
|
25 | 23 | "location": {
|
26 |
| - "path": "test/__stubs__/dirty-2.js", |
27 | 24 | "lines": {
|
28 | 25 | "begin": 5,
|
29 |
| - "end": 5 |
30 |
| - } |
31 |
| - } |
| 26 | + "end": 5, |
| 27 | + }, |
| 28 | + "path": "test/__stubs__/dirty-2.js", |
| 29 | + }, |
| 30 | + "severity": "minor", |
| 31 | + "type": "issue", |
32 | 32 | },
|
33 | 33 | {
|
34 |
| - "type": "issue", |
35 | 34 | "check_name": "prettier",
|
36 | 35 | "description": "Replace ⏎⏎⏎⏎⏎⏎function·foo(·arg··)·{⏎⏎ with function·foo(arg)·{",
|
37 |
| - "severity": "minor", |
38 | 36 | "fingerprint": "c38522eb22f56c446d6b78774d940d24",
|
39 | 37 | "location": {
|
40 |
| - "path": "test/__stubs__/dirty.js", |
41 | 38 | "lines": {
|
42 | 39 | "begin": 3,
|
43 |
| - "end": 11 |
44 |
| - } |
45 |
| - } |
| 40 | + "end": 11, |
| 41 | + }, |
| 42 | + "path": "test/__stubs__/dirty.js", |
| 43 | + }, |
| 44 | + "severity": "minor", |
| 45 | + "type": "issue", |
46 | 46 | },
|
47 | 47 | {
|
48 |
| - "type": "issue", |
49 | 48 | "check_name": "prettier",
|
50 | 49 | "description": "Delete ⏎⏎⏎",
|
51 |
| - "severity": "minor", |
52 | 50 | "fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
|
53 | 51 | "location": {
|
54 |
| - "path": "test/__stubs__/dirty.js", |
55 | 52 | "lines": {
|
56 | 53 | "begin": 12,
|
57 |
| - "end": 15 |
58 |
| - } |
59 |
| - } |
60 |
| - } |
61 |
| -]" |
| 54 | + "end": 15, |
| 55 | + }, |
| 56 | + "path": "test/__stubs__/dirty.js", |
| 57 | + }, |
| 58 | + "severity": "minor", |
| 59 | + "type": "issue", |
| 60 | + }, |
| 61 | + { |
| 62 | + "check_name": "prettier", |
| 63 | + "description": |
| 64 | +"SyntaxError: Unexpected token, expected "(" (3:13) |
| 65 | + 1 | /* eslint-disable */ |
| 66 | + 2 | |
| 67 | +> 3 | function foo#####( arg ) { |
| 68 | + | ^ |
| 69 | + 4 | return arg; |
| 70 | + 5 | } |
| 71 | + 6 |" |
| 72 | +, |
| 73 | + "fingerprint": "2c7e0de9e9eff8b589318b043ed783db", |
| 74 | + "location": { |
| 75 | + "path": "test/__stubs__/syntax-error.js", |
| 76 | + }, |
| 77 | + "severity": "major", |
| 78 | + "type": "issue", |
| 79 | + }, |
| 80 | +] |
62 | 81 | `;
|
63 | 82 |
|
64 | 83 | exports[`prettier-formatter-gitlab cli should create a code quality report file 2`] = `
|
65 |
| -"[ |
| 84 | +[ |
66 | 85 | {
|
67 |
| - "type": "issue", |
68 | 86 | "check_name": "prettier",
|
69 | 87 | "description": "Replace ·arg·· with arg",
|
70 |
| - "severity": "minor", |
71 | 88 | "fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
|
72 | 89 | "location": {
|
| 90 | + "lines": { |
| 91 | + "begin": 3, |
| 92 | + "end": 3, |
| 93 | + }, |
73 | 94 | "path": "test/__stubs__/dirty-2.js",
|
| 95 | + }, |
| 96 | + "severity": "minor", |
| 97 | + "type": "issue", |
| 98 | + }, |
| 99 | + { |
| 100 | + "check_name": "prettier", |
| 101 | + "description": "Insert ;", |
| 102 | + "fingerprint": "d88816112daed6a61fd9d81e964a484b", |
| 103 | + "location": { |
| 104 | + "lines": { |
| 105 | + "begin": 5, |
| 106 | + "end": 5, |
| 107 | + }, |
| 108 | + "path": "test/__stubs__/dirty-2.js", |
| 109 | + }, |
| 110 | + "severity": "minor", |
| 111 | + "type": "issue", |
| 112 | + }, |
| 113 | + { |
| 114 | + "check_name": "prettier", |
| 115 | + "description": "Replace ⏎⏎⏎⏎⏎⏎function·foo(·arg··)·{⏎⏎ with function·foo(arg)·{", |
| 116 | + "fingerprint": "c38522eb22f56c446d6b78774d940d24", |
| 117 | + "location": { |
74 | 118 | "lines": {
|
75 | 119 | "begin": 3,
|
76 |
| - "end": 3 |
77 |
| - } |
78 |
| - } |
| 120 | + "end": 11, |
| 121 | + }, |
| 122 | + "path": "test/__stubs__/dirty.js", |
| 123 | + }, |
| 124 | + "severity": "minor", |
| 125 | + "type": "issue", |
| 126 | + }, |
| 127 | + { |
| 128 | + "check_name": "prettier", |
| 129 | + "description": "Delete ⏎⏎⏎", |
| 130 | + "fingerprint": "f312c866f5c2332c733d2de24b9efa0f", |
| 131 | + "location": { |
| 132 | + "lines": { |
| 133 | + "begin": 12, |
| 134 | + "end": 15, |
| 135 | + }, |
| 136 | + "path": "test/__stubs__/dirty.js", |
| 137 | + }, |
| 138 | + "severity": "minor", |
| 139 | + "type": "issue", |
79 | 140 | },
|
80 | 141 | {
|
| 142 | + "check_name": "prettier", |
| 143 | + "description": |
| 144 | +"SyntaxError: Unexpected token, expected "(" (3:13) |
| 145 | + 1 | /* eslint-disable */ |
| 146 | + 2 | |
| 147 | +> 3 | function foo#####( arg ) { |
| 148 | + | ^ |
| 149 | + 4 | return arg; |
| 150 | + 5 | } |
| 151 | + 6 |" |
| 152 | +, |
| 153 | + "fingerprint": "2c7e0de9e9eff8b589318b043ed783db", |
| 154 | + "location": { |
| 155 | + "path": "test/__stubs__/syntax-error.js", |
| 156 | + }, |
| 157 | + "severity": "major", |
81 | 158 | "type": "issue",
|
| 159 | + }, |
| 160 | +] |
| 161 | +`; |
| 162 | +
|
| 163 | +exports[`prettier-formatter-gitlab cli should create a code quality report file with prettier -l 1`] = ` |
| 164 | +[ |
| 165 | + { |
82 | 166 | "check_name": "prettier",
|
83 |
| - "description": "Insert ;", |
| 167 | + "description": "Replace ·arg·· with arg", |
| 168 | + "fingerprint": "ea70e2ae0144c16efa5df45bf52a33de", |
| 169 | + "location": { |
| 170 | + "lines": { |
| 171 | + "begin": 3, |
| 172 | + "end": 3, |
| 173 | + }, |
| 174 | + "path": "test/__stubs__/dirty-2.js", |
| 175 | + }, |
84 | 176 | "severity": "minor",
|
| 177 | + "type": "issue", |
| 178 | + }, |
| 179 | + { |
| 180 | + "check_name": "prettier", |
| 181 | + "description": "Insert ;", |
85 | 182 | "fingerprint": "d88816112daed6a61fd9d81e964a484b",
|
86 | 183 | "location": {
|
87 |
| - "path": "test/__stubs__/dirty-2.js", |
88 | 184 | "lines": {
|
89 | 185 | "begin": 5,
|
90 |
| - "end": 5 |
91 |
| - } |
92 |
| - } |
| 186 | + "end": 5, |
| 187 | + }, |
| 188 | + "path": "test/__stubs__/dirty-2.js", |
| 189 | + }, |
| 190 | + "severity": "minor", |
| 191 | + "type": "issue", |
93 | 192 | },
|
94 | 193 | {
|
95 |
| - "type": "issue", |
96 | 194 | "check_name": "prettier",
|
97 | 195 | "description": "Replace ⏎⏎⏎⏎⏎⏎function·foo(·arg··)·{⏎⏎ with function·foo(arg)·{",
|
98 |
| - "severity": "minor", |
99 | 196 | "fingerprint": "c38522eb22f56c446d6b78774d940d24",
|
100 | 197 | "location": {
|
| 198 | + "lines": { |
| 199 | + "begin": 3, |
| 200 | + "end": 11, |
| 201 | + }, |
101 | 202 | "path": "test/__stubs__/dirty.js",
|
| 203 | + }, |
| 204 | + "severity": "minor", |
| 205 | + "type": "issue", |
| 206 | + }, |
| 207 | + { |
| 208 | + "check_name": "prettier", |
| 209 | + "description": "Delete ⏎⏎⏎", |
| 210 | + "fingerprint": "f312c866f5c2332c733d2de24b9efa0f", |
| 211 | + "location": { |
| 212 | + "lines": { |
| 213 | + "begin": 12, |
| 214 | + "end": 15, |
| 215 | + }, |
| 216 | + "path": "test/__stubs__/dirty.js", |
| 217 | + }, |
| 218 | + "severity": "minor", |
| 219 | + "type": "issue", |
| 220 | + }, |
| 221 | + { |
| 222 | + "check_name": "prettier", |
| 223 | + "description": |
| 224 | +"SyntaxError: Unexpected token, expected "(" (3:13) |
| 225 | + 1 | /* eslint-disable */ |
| 226 | + 2 | |
| 227 | +> 3 | function foo#####( arg ) { |
| 228 | + | ^ |
| 229 | + 4 | return arg; |
| 230 | + 5 | } |
| 231 | + 6 |" |
| 232 | +, |
| 233 | + "fingerprint": "2c7e0de9e9eff8b589318b043ed783db", |
| 234 | + "location": { |
| 235 | + "path": "test/__stubs__/syntax-error.js", |
| 236 | + }, |
| 237 | + "severity": "major", |
| 238 | + "type": "issue", |
| 239 | + }, |
| 240 | +] |
| 241 | +`; |
| 242 | +
|
| 243 | +exports[`prettier-formatter-gitlab cli should create a code quality report file with prettier -c 1`] = ` |
| 244 | +[ |
| 245 | + { |
| 246 | + "check_name": "prettier", |
| 247 | + "description": "Replace ·arg·· with arg", |
| 248 | + "fingerprint": "ea70e2ae0144c16efa5df45bf52a33de", |
| 249 | + "location": { |
102 | 250 | "lines": {
|
103 | 251 | "begin": 3,
|
104 |
| - "end": 11 |
105 |
| - } |
106 |
| - } |
| 252 | + "end": 3, |
| 253 | + }, |
| 254 | + "path": "test/__stubs__/dirty-2.js", |
| 255 | + }, |
| 256 | + "severity": "minor", |
| 257 | + "type": "issue", |
107 | 258 | },
|
108 | 259 | {
|
| 260 | + "check_name": "prettier", |
| 261 | + "description": "Insert ;", |
| 262 | + "fingerprint": "d88816112daed6a61fd9d81e964a484b", |
| 263 | + "location": { |
| 264 | + "lines": { |
| 265 | + "begin": 5, |
| 266 | + "end": 5, |
| 267 | + }, |
| 268 | + "path": "test/__stubs__/dirty-2.js", |
| 269 | + }, |
| 270 | + "severity": "minor", |
109 | 271 | "type": "issue",
|
| 272 | + }, |
| 273 | + { |
110 | 274 | "check_name": "prettier",
|
111 |
| - "description": "Delete ⏎⏎⏎", |
| 275 | + "description": "Replace ⏎⏎⏎⏎⏎⏎function·foo(·arg··)·{⏎⏎ with function·foo(arg)·{", |
| 276 | + "fingerprint": "c38522eb22f56c446d6b78774d940d24", |
| 277 | + "location": { |
| 278 | + "lines": { |
| 279 | + "begin": 3, |
| 280 | + "end": 11, |
| 281 | + }, |
| 282 | + "path": "test/__stubs__/dirty.js", |
| 283 | + }, |
112 | 284 | "severity": "minor",
|
| 285 | + "type": "issue", |
| 286 | + }, |
| 287 | + { |
| 288 | + "check_name": "prettier", |
| 289 | + "description": "Delete ⏎⏎⏎", |
113 | 290 | "fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
|
114 | 291 | "location": {
|
115 |
| - "path": "test/__stubs__/dirty.js", |
116 | 292 | "lines": {
|
117 | 293 | "begin": 12,
|
118 |
| - "end": 15 |
119 |
| - } |
120 |
| - } |
121 |
| - } |
122 |
| -]" |
| 294 | + "end": 15, |
| 295 | + }, |
| 296 | + "path": "test/__stubs__/dirty.js", |
| 297 | + }, |
| 298 | + "severity": "minor", |
| 299 | + "type": "issue", |
| 300 | + }, |
| 301 | + { |
| 302 | + "check_name": "prettier", |
| 303 | + "description": |
| 304 | +"SyntaxError: Unexpected token, expected "(" (3:13) |
| 305 | + 1 | /* eslint-disable */ |
| 306 | + 2 | |
| 307 | +> 3 | function foo#####( arg ) { |
| 308 | + | ^ |
| 309 | + 4 | return arg; |
| 310 | + 5 | } |
| 311 | + 6 |" |
| 312 | +, |
| 313 | + "fingerprint": "2c7e0de9e9eff8b589318b043ed783db", |
| 314 | + "location": { |
| 315 | + "path": "test/__stubs__/syntax-error.js", |
| 316 | + }, |
| 317 | + "severity": "major", |
| 318 | + "type": "issue", |
| 319 | + }, |
| 320 | +] |
123 | 321 | `;
|
0 commit comments