Skip to content

Commit 0d29ea6

Browse files
Do not register task list analyzer if solution-crawler is explicitly off
1 parent b80df1b commit 0d29ea6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/VisualStudio/Core/Def/TaskList/VisualStudioTaskListService.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private async Task StartAsync(VisualStudioWorkspace workspace)
101101
_ = new VisualStudioTaskListTable(workspace, _threadingContext, _tableManagerProvider, this);
102102

103103
// Now that we've hooked everything up, kick off the work to actually start computing and reporting items.
104-
RegisterIncrementalAnalayzerAndStartComputingTaskListItems();
104+
RegisterIncrementalAnalyzerAndStartComputingTaskListItems();
105105
}
106106
catch (OperationCanceledException)
107107
{
@@ -149,13 +149,17 @@ public ImmutableArray<TaskListItem> GetTaskListItems(Workspace workspace, Docume
149149
? values
150150
: ImmutableArray<TaskListItem>.Empty;
151151

152-
private void RegisterIncrementalAnalayzerAndStartComputingTaskListItems()
152+
private void RegisterIncrementalAnalyzerAndStartComputingTaskListItems()
153153
{
154154
// If we're in pull-diagnostics mode, then todo-comments will be handled by LSP.
155155
var diagnosticMode = _globalOptions.GetDiagnosticMode();
156156
if (diagnosticMode == DiagnosticMode.LspPull)
157157
return;
158158

159+
// Do not register if solution crawler is explicitly off.
160+
if (!_globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler))
161+
return;
162+
159163
var services = _workspace.Services.SolutionServices;
160164
var registrationService = services.GetRequiredService<ISolutionCrawlerRegistrationService>();
161165
var analyzerProvider = new TaskListIncrementalAnalyzerProvider(_globalOptions, this);

0 commit comments

Comments
 (0)