Is there a way to disable all Resharper warnings for a file or section of code with a single comment? I'm trying to create some coding exercises for interviewing potential candidates, and the Resharper warnings give away the problem I want the candidate to spot :P Suppressing the specific warning still makes it obvious what the problem is.
I still want to have Resharper available during the interview, I just want the candidate to spot this problem without Resharper spoiling the fun.
edit: Sorry I'll try to be more clear about what I'm after. I don't want to permanently disable a particular Resharper warning, I just want it to not show in one particular file, because the point of the exercise is to see if the developer understands the reason for the warning.
To give one example, there is a Resharper warning to use the .Any extension method instead of Count() > 0, which I want the developer to point out themselves. To disable that warning, you have to use a comment of:
// ReSharper disable UseMethodAny.0
around the code. That kind of gives the game away a little.
I was trying to find something like:
// ReSharper disable all
which I could place at the top of the class, so it won't give away what I want the developer to find. But I can't seem to find a way to do that. Using numbers for the Resharper warnings would be fine as well, but I don't think it works that way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…