File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,28 @@ you can write:
28
28
in your ` .vscode/settings.json ` file. This will ask ` rust-analyzer ` to use
29
29
` x.py check ` to check the sources, and the stage 0 rustfmt to format them.
30
30
31
+ If running ` x.py check ` on save is inconvenient, in VS Code you can use a [ Build
32
+ Task] instead:
33
+
34
+ ``` JSON
35
+ // .vscode/tasks.json
36
+ {
37
+ "version" : " 2.0.0" ,
38
+ "tasks" : [
39
+ {
40
+ "label" : " ./x.py check" ,
41
+ "command" : " ./x.py check" ,
42
+ "type" : " shell" ,
43
+ "problemMatcher" : " $rustc" ,
44
+ "presentation" : { "clear" : true },
45
+ "group" : { "kind" : " build" , "isDefault" : true }
46
+ }
47
+ ]
48
+ }
49
+ ```
50
+
51
+ [ Build Task ] : https://code.visualstudio.com/docs/editor/tasks
52
+
31
53
## Check, check, and check again
32
54
33
55
When doing simple refactorings, it can be useful to run ` ./x.py check `
You can’t perform that action at this time.
0 commit comments