I’m ONLY intersted in SonarLint/SonarQube warnings. I’m aware that the project has a setting for “Treat warnings as errors” but if i set this to all then it will include non SQ warnings. I can specify the warnings but does that mean I have to list every single “S####” error code?
Is there a better way to accomplish this?
Hello @edgar_CC, welcome to the community
I apologize for the delay, I missed your post.
Unfortunately there is no clean way to accomplish that.
Here are some options:
- Turn on “Treat warnings as errors” and then combine it with “WarningsNotAsErrors” for all non-SQ rules.
- Turn on “Treat warnings as errors” and add a ruleset file that disables all non-SQ rules (i.e. from
- Whitelist SQ rules in “WarningsAsErrors”.
You can read more about these options in the official MS documentation.
Let me know if that answered your question.