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:
2828in your ` .vscode/settings.json ` file. This will ask ` rust-analyzer ` to use
2929` x.py check ` to check the sources, and the stage 0 rustfmt to format them.
3030
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+
3153## Check, check, and check again
3254
3355When doing simple refactorings, it can be useful to run ` ./x.py check `
You can’t perform that action at this time.
0 commit comments