From c6eb05ca5ee504ada276d9078f71aea0d7f93711 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 19 Jan 2022 14:32:40 +0100 Subject: [PATCH] readme for the dead code analysis mode --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 25499a0a8..076c2c4bd 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,24 @@ The plugin activates on `.res` and `.resi` files. If you've already got Reason-L - `try`, `for`, etc. - Folding, and [custom folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) through `//#region` and `//#endregion`. +### Experimental Features + +#### Dead Code Analysis mode + +Runs dead code analysis via [reanalyze](https://github.com/rescript-association/reanalyze). + +##### Usage + +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. + +Dead code is highlighted in the editor, and code actions for suppressing dead code warnings are available in most cases. + +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. + +##### Caveats + +Currently does not work for full monorepo dead code analysis (although it should work for each monorepo package individually). + ## Use with Other Editors 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.