Reputation: 178
I try to customize the naming rule for classes that when I see or create a DTO that the name is actually FooDTO
and not FooDto
.
But I couldn't solve the problem that ReSharper checks every class and marks every class that has not a Dto in its name.
Can I create conditional rules that are only triggered on actual DTOs?
Upvotes: 1
Views: 758
Reputation: 16652
The best thing to do in your case would be simply the following:
Add another rule with the DTO suffix
Now R# is happy again as if nothing happened.
Alternatively, you can turn these warnings off in different ways:
Add the abbreviation to team-shared settings
Use
SuppressMessage
[SuppressMessage("ReSharper", "InconsistentNaming")]
class WhateverDTO
{
}
Upvotes: 2