Skip to content

Dead code analysis editor mode via reanalyze #334

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clarify
  • Loading branch information
zth committed Dec 30, 2021
commit a9a0fa9394ba8240e7d19cfb7b73761ee2c73a52
9 changes: 5 additions & 4 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,16 @@ export function activate(context: ExtensionContext) {
clientOptions
);

// Create a custom diagnostics collection, for cases where we want to report diagnostics
// programatically from inside of the extension.
// Create a custom diagnostics collection, for cases where we want to report
// diagnostics programatically from inside of the extension. The reason this
// is separate from the diagnostics provided by the LS server itself, is that
// this should be possible to clear independently of the other diagnostics
// coming from the ReScript compiler itself.
let diagnosticsCollection = languages.createDiagnosticCollection("rescript");

// This map will hold code actions produced by the dead code analysis.
let diagnosticsResultCodeActions: DiagnosticsResultCodeActionsMap = new Map();

let inDeadCodeAnalysisMode = { current: false };

let deadCodeAnalysisRunningStatusBarItem = window.createStatusBarItem(
StatusBarAlignment.Right
);
Expand Down