@@ -54,7 +54,7 @@ describe('linter', () => {
54
54
} )
55
55
56
56
expect ( result ) . toEqual ( {
57
- codeActions : [ ] ,
57
+ codeActions : { } ,
58
58
diagnostics : [ ] ,
59
59
} )
60
60
@@ -76,14 +76,17 @@ describe('linter', () => {
76
76
const [ result ] = await getLintingResult ( { document : textToDoc ( shell ) } )
77
77
expect ( result ) . toMatchInlineSnapshot ( `
78
78
Object {
79
- "codeActions": Array [
80
- Object {
79
+ "codeActions": Object {
80
+ "shellcheck|2086|1:5-1:9": Object {
81
81
"diagnostics": Array [
82
82
Object {
83
83
"code": "SC2086",
84
84
"codeDescription": Object {
85
85
"href": "https://www.shellcheck.net/wiki/SC2086",
86
86
},
87
+ "data": Object {
88
+ "id": "shellcheck|2086|1:5-1:9",
89
+ },
87
90
"message": "Double quote to prevent globbing and word splitting.",
88
91
"range": Object {
89
92
"end": Object {
@@ -135,13 +138,16 @@ describe('linter', () => {
135
138
"kind": "quickfix",
136
139
"title": "Apply fix for SC2086",
137
140
},
138
- ] ,
141
+ } ,
139
142
"diagnostics": Array [
140
143
Object {
141
144
"code": "SC2154",
142
145
"codeDescription": Object {
143
146
"href": "https://www.shellcheck.net/wiki/SC2154",
144
147
},
148
+ "data": Object {
149
+ "id": "shellcheck|2154|1:5-1:9",
150
+ },
145
151
"message": "foo is referenced but not assigned.",
146
152
"range": Object {
147
153
"end": Object {
@@ -162,6 +168,9 @@ describe('linter', () => {
162
168
"codeDescription": Object {
163
169
"href": "https://www.shellcheck.net/wiki/SC2086",
164
170
},
171
+ "data": Object {
172
+ "id": "shellcheck|2086|1:5-1:9",
173
+ },
165
174
"message": "Double quote to prevent globbing and word splitting.",
166
175
"range": Object {
167
176
"end": Object {
@@ -197,7 +206,7 @@ describe('linter', () => {
197
206
198
207
const result = await promises [ promises . length - 1 ]
199
208
expect ( result ) . toEqual ( {
200
- codeActions : [ ] ,
209
+ codeActions : { } ,
201
210
diagnostics : [ ] ,
202
211
} )
203
212
} )
@@ -209,7 +218,7 @@ describe('linter', () => {
209
218
} )
210
219
211
220
expect ( result ) . toEqual ( {
212
- codeActions : [ ] ,
221
+ codeActions : { } ,
213
222
diagnostics : [ ] ,
214
223
} )
215
224
} )
@@ -222,13 +231,16 @@ describe('linter', () => {
222
231
223
232
expect ( result ) . toMatchInlineSnapshot ( `
224
233
Object {
225
- "codeActions": Array [] ,
234
+ "codeActions": Object {} ,
226
235
"diagnostics": Array [
227
236
Object {
228
237
"code": "SC1091",
229
238
"codeDescription": Object {
230
239
"href": "https://www.shellcheck.net/wiki/SC1091",
231
240
},
241
+ "data": Object {
242
+ "id": "shellcheck|1091|3:7-3:19",
243
+ },
232
244
"message": "Not following: shellcheck/sourced.sh: openBinaryFile: does not exist (No such file or directory)",
233
245
"range": Object {
234
246
"end": Object {
@@ -249,6 +261,9 @@ describe('linter', () => {
249
261
"codeDescription": Object {
250
262
"href": "https://www.shellcheck.net/wiki/SC2154",
251
263
},
264
+ "data": Object {
265
+ "id": "shellcheck|2154|5:6-5:10",
266
+ },
252
267
"message": "foo is referenced but not assigned.",
253
268
"range": Object {
254
269
"end": Object {
@@ -276,7 +291,7 @@ describe('linter', () => {
276
291
sourcePaths : [ path . resolve ( FIXTURE_FOLDER ) ] ,
277
292
} )
278
293
expect ( result ) . toEqual ( {
279
- codeActions : [ ] ,
294
+ codeActions : { } ,
280
295
diagnostics : [ ] ,
281
296
} )
282
297
} )
0 commit comments