SSDT Custom Logger to exclude certain warnings/errors? (not just by code) #7859
-
TL;DRIs there a way to write a custom logger to suppress certain warnings and prevent them from showing up in Visual Studio? I want to suppress them by more than just the code, because that is not granular enough for my current needs. I need like regex filtering or something. Long versionI have searched the internet far and wide for days only to come up empty handed. I've spent so many hours googling about this, I don't know what else to do at this point. I am dealing with a MASSIVE SSDT project. Unfortunately, this project uses a lot of temp tables that are created in one proc and then "passed" down to a child proc. SSDT does not like this because the table is not created within that proc so it sees that table as an unresolved reference. The lowest granularity you get for filtering warning codes is at the file level, which is not helpful here. I have thousands of these warnings (SQL71502). Unfortunately, the code used for these, is the same code used for all unresolved reference issues. So if I ignore this at the project level, I'm now ignoring many legitimate issues. My hope...is to find some way to get MSBuild or Visual Studio to hide certain warnings based on some sort of glob/regex criteria. Is this possible? Or will I be wasting my time if I try to go further down this road? I have already written a PowerShell script that will parse MSBuild messages, and then filter out all the ones I don't care about...so I'm at least able to work through the issues that way. But unfortunately, it's not as nice as using the built in "live" view of issues in Visual Studio. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Unfortunately, no: loggers are designed to not be able to interfere with each other, so while you can (and people do) write a logger that has a custom ignore-warning policy, it wouldn't affect the warnings themselves or what gets displayed in VS (which goes through the VS logger). |
Beta Was this translation helpful? Give feedback.
Unfortunately, no: loggers are designed to not be able to interfere with each other, so while you can (and people do) write a logger that has a custom ignore-warning policy, it wouldn't affect the warnings themselves or what gets displayed in VS (which goes through the VS logger).