Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code actions for removing dead code #989

Merged
merged 4 commits into from
May 27, 2024
Merged

Conversation

zth
Copy link
Collaborator

@zth zth commented May 27, 2024

  • For the dead item itself
  • Removing all dead items in the current file

Later on it'd be nice to have a command to run that can remove all of the dead code in a project. This might be better to do in reanalyze itself though? Or we can have an action in the editor that uses the editor to apply the edits. That would be easy to do as a first step. Although it'd only work in VSCode at first.

@zth zth requested a review from cristianoc May 27, 2024 09:30
client/src/commands/code_analysis.ts Outdated Show resolved Hide resolved
@cristianoc
Copy link
Collaborator

Removing types is much more involved, and unclear how to do automatically. E.g. one variant case.

@zth zth merged commit ee2a297 into master May 27, 2024
5 checks passed
@zth zth deleted the reanalyze-remove-code-actions branch May 27, 2024 11:21
jfrolich pushed a commit to jfrolich/rescript-vscode that referenced this pull request Sep 3, 2024
* code actions for removing dead code in the current file + each dead item, driven by reanalyze

* changelog and cleanup

* comment and extra match

* comment, and handle another case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants