Suppressing Error Message
sonar version: 6.7
I am looking to suppress few error message on the .Net SQL project.,
We follow the suppress message on the .Net project it works well, but this suppress logic does not work for sql related error messages.
I am trying to suppress the error message
Error message to suppress:- “DELETE” and “UPDATE” statements should contain “WHERE” clauses.
So I added suppression logic in GlobalSuppressions.cs file as follows, but it does not work
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(“1590”, “S1590:“DELETE” and “UPDATE” statements should contain “WHERE” clauses”, Justification = “Testing suppressing rule”, Scope = “module”)]
Below are my questions.
1. What is the category name for SQL Suppression. For C# related we uses “Microsoft.Rules.Data”, but not sure for this SQL.
2. Give me some sample for SQL suppression.
Please suggest us.