Skip to content

Commit af598f9

Browse files
authored
Merge pull request #341 from zth/dead-code-analysis-readme
Readme for the dead code analysis mode
2 parents bc3d6bd + c6eb05c commit af598f9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ The plugin activates on `.res` and `.resi` files. If you've already got Reason-L
5050
- `try`, `for`, etc.
5151
- Folding, and [custom folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) through `//#region` and `//#endregion`.
5252

53+
### Experimental Features
54+
55+
#### Dead Code Analysis mode
56+
57+
Runs dead code analysis via [reanalyze](https://github.com/rescript-association/reanalyze).
58+
59+
##### Usage
60+
61+
Open the command palette and run `> ReScript: Start dead code analysis.`. This will start dead code analysis in the ReScript project of the file you run the command from.
62+
63+
Dead code is highlighted in the editor, and code actions for suppressing dead code warnings are available in most cases.
64+
65+
When done, stop the dead code analysis mode by clicking the `Stop Dead Code Analysis mode` button in the editor status bar. This will clear all reported dead code warnings.
66+
67+
##### Caveats
68+
69+
Currently does not work for full monorepo dead code analysis (although it should work for each monorepo package individually).
70+
5371
## Use with Other Editors
5472

5573
This repo also contains a language server that can power other editors. **However, the language server in this project is a pure implementation detail. We don't guarantee its stability for other editors' consumption** apart from Vim and Sublime Text.

0 commit comments

Comments
 (0)