lundi 17 novembre 2014

ReSharper doesn't suppress message


Vote count:

0




I'm using ReSharper and StyleCop to impose some naming conventions. I have a rule for a class name to start with upper case. In some classes, however, I need to violate the rule (when naming classes that are direct map from my database I want them to have the names of tables, views and so on, and our convention is to start the name with lower case t_ for table, v_ for view).


I'm suppressing the warning using the [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter"] attribute. It works fine in one class. It doesn't in the other. Both classes are partial classes. In both cases I'm using the same attribute and the same message. But in one case I still can see ReSharper complaining.


This suppression works:



[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Reviewed. The name of the class resembles the name of the table in the database.")]
public partial class v_All_w_Status
{
// ..
}


And this doesn't:



[SuppressMessage("StyleCop.CShrp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Reviewed. The name of the class resembles the name of the table in the database.")]
public partial class t_Programs
{
// ..
}


Clearly I'm missing something, but I cannot see what. Any help highly appreciated.



asked 32 secs ago







ReSharper doesn't suppress message

Aucun commentaire:

Enregistrer un commentaire