I have dotnet solution that has many warnings (legacy code). We work both on maintaining legacy code and adding new features.
On top of "standard" analysers, we are using Stylecop and Meziantou.Analyzer. They produce warnings as well.
The thing is that I can see that teammates tend to add more warnings when they develop new functionalities.
Is there a way I can limit number of warning to prevent new warnings added?
Example
Currently we have 200 warnings in the code.
Lets treat those as "known warnings".
Is there a way, I can somehow set constraint on number of warnings to 200 on build level? If someone adds new warning then build would fail.
How do you ensure people don't add new warnings in your projects?
Longterm solution, I know we need to get rid of them. But how to prevent adding new warnings until we get rid of all existing one?