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

Disable VSTHRD103 if CA1849 exists #1314

Open
cremor opened this issue May 16, 2024 · 1 comment
Open

Disable VSTHRD103 if CA1849 exists #1314

cremor opened this issue May 16, 2024 · 1 comment

Comments

@cremor
Copy link

cremor commented May 16, 2024

Is your feature request related to a problem? Please describe.

VSTHRD103 and CA1849 seem to be duplicates. But CA1849 seems to be better. For example, VSTHRD103 is missing the fix from dotnet/roslyn-analyzers#6858

Describe the solution you'd like

VSTHRD103 should be disabled in SDKs that contain CA1849.

Describe alternatives you've considered

Manually disabling VSTHRD103 in each project, which is annoying.

Additional context

There might be other analyzers which are duplicates. All should be disabled if they already exist in the SDK.

@AArnott
Copy link
Member

AArnott commented May 17, 2024

I don't think analyzers have insight into what SDK the compiler runs from.
We'd also not want to turn off VSTHRD103 automatically just because CA1849 exists, since CA1849 is off by default when VSTHRD103 is on by default.
Turning VSTHRD103 off when CA1849 is both present and on would likely be reasonable. If we can identify how to determine that, then this request is actionable.

Until then, the user may choose to disable VSTHRD103 when they enable CA1849.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants