Together with @cristianoc I’ve been developing a “Dead code analysis mode” for the ReScript VSCode extension, and we’re now looking for people interested in helping out with testing.
In a nutshell, it lets you activate a mode in the editor where dead code analysis is continuously run (using reanalyze), reporting all dead code in the problems pane, and highlighting it inside of the editor itself. It also provides code actions for suppressing the dead code warnings.
Here’s a GIF showing how it works:
A note - this is highly experimental, and it’s not guaranteed that this will make it into the official VSCode extension. However, testing and making sure it works well will surely increase the likelihood.
- Download and install the
vsixincluding the feature from here. You can install the
vsixby opening it in VSCode, or by right clicking it when viewed via VSCode’s folder structure, and selecting “Install Extension VSIX”.
- Open up the command palette, and run
> ReScript: Start dead code analysis. This starts the dead code analysis mode, and you should now see any dead code highlighted.
- You can turn off the dead code analysis (and clear any errors reported) at any time via “Stop Dead Code Analysis mode” in the bottom right status bar.
- You can uninstall the VSCode package and revert back to the officially published extension version at any time.
Report any issues or feedback here. We’re especially interested in someone using Windows trying this out.
Thank you for trying it out!