File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
analysis/examples/example-project Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 8
8
"bs-dependencies" : [" reason-react" ],
9
9
"reason" : { "react-jsx" : 3 },
10
10
"namespace" : " my-namespace" ,
11
- "refmt" : 3
12
- }
11
+ "reanalyze" : {
12
+ "analysis" : [" dce" , " exception" ]
13
+ }
14
+ }
Original file line number Diff line number Diff line change @@ -229,6 +229,15 @@ export function activate(context: ExtensionContext) {
229
229
230
230
// Start the client. This will also launch the server
231
231
context . subscriptions . push ( client . start ( ) ) ;
232
+
233
+ // Autostart code analysis if wanted
234
+ if (
235
+ workspace
236
+ . getConfiguration ( "rescript.settings" )
237
+ . get < boolean > ( "autoRunCodeAnalysis" )
238
+ ) {
239
+ commands . executeCommand ( "rescript-vscode.start_code_analysis" ) ;
240
+ }
232
241
}
233
242
234
243
export function deactivate ( ) : Thenable < void > | undefined {
Original file line number Diff line number Diff line change 126
126
"type" : " boolean" ,
127
127
"default" : true ,
128
128
"description" : " Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running."
129
+ },
130
+ "rescript.settings.autoRunCodeAnalysis" : {
131
+ "type" : " boolean" ,
132
+ "default" : false ,
133
+ "description" : " Automatically start ReScript's code analysis."
129
134
}
130
135
}
131
136
},
You can’t perform that action at this time.
0 commit comments