dotnet / dotnet/aspnetcore

CodeFixes triggered by cross file diagnostics don't work

Open
#49,856 0 comments 0 reactions 0 assignees View on GitHub
area-infrastructure
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

When updating our Analyzer Test packages: https://github.com/dotnet/aspnetcore/pull/49843

We found out that "non-local" diagnostics don't let code fixes work. Manual testing also shows that non-local diagnostics don't show a squiggle in VS or a Warning in the VS Error List window. But does show the warning in the build output.

Currently our tests workaround the problem by setting `SkipLocalDiagnosticCheck`. But we should figure out what to do with our Code Fixers, and whether emitted diagnostics should avoid emitting diagnostics for other files or if VS has a bug there.

Refer to https://github.com/dotnet/roslyn/issues/57621#issuecomment-999347642 for some context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.