How to suppress "Inconsistent Naming" inspection just for test files?

23 Jan
2011

If you are using ReSharper, you know ReSharper can detect inconsistent namings in your code files. That’s a wonderful feature like other ReSharper features. But default settings is not good for test files because I am using a naming standard with underscores and ReSharper warns me for inconsistent name.

naming_style_for_test_before

If you press Alt+Enter ReSharper will suggest you a consistent name by checking your settings.

But If you are using this kind of naming for your test methods you can disable this warning for your test files.

Open Visual Studio and follow this direction :

ReSharper menu > Options > Commn/Naming Style > Advanced Settings > Add

naming_style_for_tests

From this form select Type and Type method (property) checkboxes and unselect Enable inspections checkbox. That’s it. ReSharper will no longer warn you for your test method names.

naming_style_for_test_after



Comment Form

top