diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-29 12:57:24 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-29 12:57:24 +0000 |
commit | dc48f89581843248660ceb755bb20469ab6ac0c9 (patch) | |
tree | 05a7e47d1c68c250025be1ce6492f56c15353749 /crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap | |
parent | cdcb3d3833d3d5b37b2cd4dac91a6e9366f20aea (diff) | |
parent | 899dbebd02b41b12d89c9f485e85208b39b81932 (diff) |
Merge #2668
2668: In-server cargo check watching r=matklad a=kiljacken
Opening a draft now so people can follow the progress, and comment if they spot something stupid.
Things that need doing:
- [x] Running cargo check on save
- [x] Pipe through configuration options from client
- [x] Tests for parsing behavior
- [x] Remove existing cargo watch support from VSCode extension
- [x] Progress notification in VSCode extension using LSP 3.15 `$/progress` notification
- [ ] ~~Rework ra-ide diagnostics to support secondary messages~~
- [ ] ~~Make cargo-check watcher use ra-ide diagnostics~~
~~I'd love some input on whether to try to keep the status bar progress thingy for VSCode? It will require some plumbing, and maintaining yet another rust-analyzer specific LSP notification, which I'm not sure we want to.~~
Fixes #1894
Co-authored-by: Emil Lauridsen <[email protected]>
Diffstat (limited to 'crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap')
-rw-r--r-- | crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap new file mode 100644 index 000000000..cb0920914 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap | |||
@@ -0,0 +1,85 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/compiler/mir/tagset.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 41, | ||
11 | character: 23, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 41, | ||
15 | character: 28, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 41, | ||
23 | character: 23, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 41, | ||
27 | character: 28, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Warning, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "trivially_copy_pass_by_ref", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "clippy", | ||
40 | ), | ||
41 | message: "this argument is passed by reference, but would be more efficient if passed by value\n#[warn(clippy::trivially_copy_pass_by_ref)] implied by #[warn(clippy::all)]\nfor further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref", | ||
42 | related_information: Some( | ||
43 | [ | ||
44 | DiagnosticRelatedInformation { | ||
45 | location: Location { | ||
46 | uri: "file:///test/compiler/lib.rs", | ||
47 | range: Range { | ||
48 | start: Position { | ||
49 | line: 0, | ||
50 | character: 8, | ||
51 | }, | ||
52 | end: Position { | ||
53 | line: 0, | ||
54 | character: 19, | ||
55 | }, | ||
56 | }, | ||
57 | }, | ||
58 | message: "lint level defined here", | ||
59 | }, | ||
60 | ], | ||
61 | ), | ||
62 | tags: None, | ||
63 | }, | ||
64 | suggested_fixes: [ | ||
65 | SuggestedFix { | ||
66 | title: "consider passing by value instead: \'self\'", | ||
67 | location: Location { | ||
68 | uri: "file:///test/compiler/mir/tagset.rs", | ||
69 | range: Range { | ||
70 | start: Position { | ||
71 | line: 41, | ||
72 | character: 23, | ||
73 | }, | ||
74 | end: Position { | ||
75 | line: 41, | ||
76 | character: 28, | ||
77 | }, | ||
78 | }, | ||
79 | }, | ||
80 | replacement: "self", | ||
81 | applicability: Unspecified, | ||
82 | diagnostics: [], | ||
83 | }, | ||
84 | ], | ||
85 | } | ||