10

I am getting ReSharper warning which I would like to suppress in this particular case (but not for the entire project). At the moment the only way to do it is to suppress it with a comment. However it looks ugly!

// ReSharper disable StaticFieldInGenericType
        private static int count;
// ReSharper restore StaticFieldInGenericType

I simply don't like to see these ReSharper comments in my code.

Is it somehow possible to keep these settings in a separate file, e.g. - SupressedInspections.ReSharper, etc?

niaher
  • 9,460
  • 7
  • 67
  • 86

1 Answers1

8

No, you can only disable it inline with the comments. The best you can do is use ReSharper 8's terser, one line version:

// ReSharper disable once StaticFieldInGenericType
citizenmatt
  • 18,085
  • 5
  • 55
  • 60
  • Thank you @citizenmatt. Does ReSharper have a uservoice page where I can suggest this? – niaher Dec 07 '13 at 07:54
  • 1
    No, we use our own issue tracker - dog fooding! You can report bugs or make suggestions at http://youtrack.jetbrains.com – citizenmatt Dec 08 '13 at 13:13