eberthold / SteroidsVS

Visual Studio Extension
https://marketplace.visualstudio.com/items?itemName=eberthold.SteroidsVS
MIT License
25 stars 2 forks source link

Rule suppression via suppression file doesn't remove hints. #8

Closed dday4thedeceiver closed 6 years ago

dday4thedeceiver commented 6 years ago

If #pragma is used then hints are removed as expected. This is VS2017 latest version.

eberthold commented 6 years ago

Thanks for reporting.

I managed to track this one down, and it used to work in a previous version of this extension but an 'optimization' of mine broke it. To crawl the suppression state I have to work with strings that aren't documented. So for better readability I changed my const from "suppressionstate" to "SuppressionState" and only testet with pragma suppression. Never had guessed that there is a difference in casing between them the internals of VS - and pragma seems to work with both casings, strange...

Will be fixed in the next release.

dday4thedeceiver commented 6 years ago

Hmm, still have this problem with .12

eberthold commented 6 years ago

Hm... I think I need some more infos to look at it in detail.

eberthold commented 6 years ago

It might be, that thoose suppressed messages disappear if you make some changes in your file, where line number or column of thoose diagnostics change. I found a performance optimization which might prevents hiding theese diagnostics if the suppression is newly created. Thats because I have to deal with a lot of notifications about changed ErrorList entries, and I have to avoid too much object creation/destruction and resulting GC's.

dday4thedeceiver commented 6 years ago

Sorry couldn't visit it earlier but you were right, changing the line number or reloading the projects gets rid of the message.

eberthold commented 6 years ago

Thanks for your feedback.

So I fixed that behavior the other day, but my CI build is broken currently - the build agent seems to struggle with C# 7.x and i have to update it.

So I may will push a manual release this evening (european time) to get this fix on the road either way.