roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Add analyzer similar to Resharper's "Method can be made static"

Open wanton7 opened this issue 7 years ago • 2 comments

Please add analyzer similar to Resharper's "Method can be made static". There is Microsoft analyzer CA1822 but it will show warning even for methods that aren't private.

wanton7 avatar Nov 30 '17 10:11 wanton7

This one is useful indeed, please add it.

ddobrev avatar Jan 27 '18 22:01 ddobrev

It is possible to configure CA1822 so that public methods don't trigger it. Simply add dotnet_code_quality.CA1822.api_surface = private, internal to the .editorconfig file in your solution. Source

Arkane5 avatar Apr 04 '24 14:04 Arkane5