VS2017: Show Potential Fixes Not Working

csharp

(Graeme Baillie) #1

Hoping there is something configured wrong here, in visual studio 2017 the tool seems to be identifying issues well but the Show potential fixes shortcut keys or dropdown dosent do anything.

an example would be if you have a list using a linq where and then a firstordefault

list.Where(x => x.ID == ID).FirstOrDefault();

It will be identified as an issue that it should not have the where and just the first orDefault but the actual show fix does not show this

Any help would be apprecaited


(Amaury Levé) #2

Hi @Graeme_Baillie,

We only have a few rules proving code fixes so there is nothing wrong with the configuration.

Cheers,
Amaury


(Toty Nor) #3

sorry for this, is this means that the plugin just notify the developer that there is an issue but couldn’t give a suggested solution?


(Amaury Levé) #4

Yes! We do raise the issue and always try to provide enough information in the rule definition to help the developer to understand what needs to be done but we don’t provide any mechanism to automatically fix the issue.


(Toty Nor) #5

Thanks for your clarification, but how can I open the rule definition from VS to get the all required information to fix the issue?