VS2017: Show Potential Fixes Not Working

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

Hi @Graeme_Baillie,

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


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?

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.

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

You can either click the issue ID (Code column from the Error List) or visit https://rules.sonarsource.com/