GuOrg / Gu.Roslyn.Asserts

Asserts for testing Roslyn analyzers.
MIT License
21 stars 7 forks source link

Add support for DiagnosticSuppressors #255

Closed manfred-brands closed 2 years ago

manfred-brands commented 2 years ago

Fixes #165

I opted for the same set of overloads as for RoslynAssert.Diagnostics, but are open for change there.

Priniciple is:

I tried it out with one of my analyzers and it seems to work fine. Once this is in and release, I will update nunit.analyzers to use it as well, dropping the code there.

Initially I went for different approach, but the 2nd version aligns much better with the existing framework. I have not looked at the analyzer to see what needs changing there so that it warns of missing '↓'. It doesn't do so at the moment.

Fixes #253

Not related and we can split this into two PRs is you prefer.

JohanLarsson commented 2 years ago

Very nice, thanks! I'll try to find time to release a new nuget today.

JohanLarsson commented 2 years ago

https://www.nuget.org/packages/Gu.Roslyn.Asserts/4.1.0

manfred-brands commented 2 years ago

Thanks