Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom code inspection rule in Rider

I want to add a custom inspection rule in Rider 2017.3.1, basically the same as what is possible with ReSharper (see ReSharper Documentation here). It uses the "Search with Pattern" right-click command, which is not available in Rider. Is there a different way to add custom inspection rules to Rider or something that achieves the same effect - the highlighting of problematic code?

As an example, I have the following code:

Observable.Interval(TimeSpan.FromSeconds(1)).Subscribe(_ => DoSomething()).AddTo(Disposer);

If the .AddTo(Disposer) is missing, I want to highlight the code, and ideally offer a quick-fix to add it.

like image 690
shniqq Avatar asked Oct 21 '25 20:10

shniqq


1 Answers

Structural Search and Replace is currently not supported in Rider. You may want to track this issue: https://youtrack.jetbrains.com/issue/RIDER-11489

like image 133
maartenba Avatar answered Oct 24 '25 21:10

maartenba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!