Skip to content

Commit 037a33a

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

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,18 @@ 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+
160+
// Do not register if solution crawler is explicitly off.
161+
if (!_globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler))
162+
return;
163+
159164
var services = _workspace.Services.SolutionServices;
160165
var registrationService = services.GetRequiredService<ISolutionCrawlerRegistrationService>();
161166
var analyzerProvider = new TaskListIncrementalAnalyzerProvider(_globalOptions, this);

0 commit comments

Comments
 (0)