From af5a373e00c944397dd95515b4c742485e241c9c Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 4 Feb 2022 18:14:57 +1100 Subject: feat(lsp): add redirect diagnostic and quick fix (#13580) Ref: #12864 --- .../lsp/code_action_redirect_response.json | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 cli/tests/testdata/lsp/code_action_redirect_response.json (limited to 'cli/tests/testdata/lsp') diff --git a/cli/tests/testdata/lsp/code_action_redirect_response.json b/cli/tests/testdata/lsp/code_action_redirect_response.json new file mode 100644 index 000000000..b2bb470bd --- /dev/null +++ b/cli/tests/testdata/lsp/code_action_redirect_response.json @@ -0,0 +1,47 @@ +[ + { + "title": "Update specifier to its redirected specifier.", + "kind": "quickfix", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 19 + }, + "end": { + "line": 0, + "character": 60 + } + }, + "severity": 3, + "code": "redirect", + "source": "deno", + "message": "The import of \"http://127.0.0.1:4545/x_deno_warning.js\" was redirected to \"http://127.0.0.1:4545/x_deno_warning_redirect.js\".", + "data": { + "specifier": "http://127.0.0.1:4545/x_deno_warning.js", + "redirect": "http://127.0.0.1:4545/x_deno_warning_redirect.js" + } + } + ], + "edit": { + "changes": { + "file:///a/file.ts": [ + { + "range": { + "start": { + "line": 0, + "character": 19 + }, + "end": { + "line": 0, + "character": 60 + } + }, + "newText": "\"http://127.0.0.1:4545/x_deno_warning_redirect.js\"" + } + ] + } + } + } +] -- cgit v1.2.3