ReSharper 6 Enhances Suggestions with Explanations

Previous posts introducing ReSharper 6:

One of the new features we have added to ReSharper 6 is the ability to find out why ReSharper makes certain suggestions. Often, ReSharper can provide a suggestion such as the one shown below:

image

For some people this might be clear, whether or not they would agree with the suggestion. For others it might make little sense, specially developers that are often new to the language or framework. In ReSharper 6, we have added a feature* which provides more information as to why these suggestions, hints or warnings are made:

image

When invoking the QuickFix, by pressing Alt+Enter, ReSharper now provides a new entry which is “Why is ReSharper suggesting this?”. By clicking on this entry, you will be redirected to a Wiki on the JetBrains site where you will be provided with more detailed information in regard to the suggestion. For instance, when being displayed with the following:

image

By selecting the “Why is ReSharper suggesting this?” action, the Wiki site will show the following information:

image

Currently we have over 40 entries in the Wiki and are continuing to add more entries. We will also be updating and reviewing them with more examples were required. As always, please let us know if you have any feedback.

* There is a plug-in which is available for previous editions of ReSharper called WhySharper, which this idea was partially based on. We realized however, that to make sure the information is kept up to date, it would be better to have this functionality built into the product.

This entry was posted in ReSharper Tips&Tricks and tagged , , . Bookmark the permalink.

23 Responses to ReSharper 6 Enhances Suggestions with Explanations

  1. cbp says:

    Its this sort of attention to detail that makes JetBrains the greatest!

  2. I, for one, do not need the “Why is Resharper suggesting this?”. I have come to accept the fact that Resharper is the best, its better than me and I should never doubt it.

  3. I’m a fan. Can never think of another refactoring tool for my VS.
    You guyz rock!!!

  4. Argos says:

    Any chance we can view this wiki now?

  5. @Argos
    Sure, here’s the wiki index: http://confluence.jetbrains.net/display/ReSharper/Code+Inspection+Wiki

    @Prajeesh, @cbp
    Thanks a lot!

    @Monty
    That’s cool but sometimes users do doubt ReSharper suggestions, and in certain cases they have all the right to: for example, the case of using or not using ‘var’ is a personal decision to take

  6. Roland says:

    The only question is: when is the release ? You said late spring, I ask: which country late spring :)

    I must say R#6 is awesome.

  7. Argos says:

    @Jura – thanks for that!

  8. @Roland
    Late spring means May. We’re still hoping to get things ready in May.
    Thanks for acknowledging the awesomeness :)

  9. magellings says:

    @Jura – looking to purchase R# soon, but would like to wait for free upgrade to R# 6 before buying version 5…any idea when this free upgrade will be available…?

  10. @magellings
    We’re opening free upgrades to R#6 sometime in April.

  11. Sven says:

    i guess it’s time to check if my reported issues got solved^^

  12. pyro says:

    @Jura does that mean that I should wait until you announce the free upgrade before buying if i want to move to 6 or if I buy now will I still be eligible to upgrade?

  13. @pyro
    If your priority is getting ReSharper benefits immediately, you buy ReSharper 5 now and you’re not eligible for a free upgrade to version 6
    If your priority is getting a free upgrade to version 6, you should hold off the purchase until we announce the free upgrade campaign

  14. Graham says:

    I would like to see some *really* compelling and convincing reasons as why to use ‘var’. Primarily for my colleagues benefit ;) I personally am a var-man at heart :)

  15. Hadi Hariri says:

    @Graham,

    Did you read my blog entry and some of the comments?

    http://hadih.me/gSx9YT

  16. Saberone says:

    Please tell me I didn’t just buy a license at a bad time! I would’ve held out a bit longer if I knew the release was in May.

  17. DotnetShadow says:

    I installed the released version of Resharper 6.0 but I don’t see that option in quick info, I tried various examples but none seem to show it. I did install EAP versions earlier could there be a problem?

  18. @DotnetShadow
    By quick info, do you mean the drop-down menu that opens once you press Alt+Enter?
    The “Why is ReSharper suggesting this?” list item is not available for every inspection, just for some of them.
    Prior installation of EAP builds is not known to influence subsequent official builds.

  19. Nick Portelli says:

    Can you turn it off? I find it rather annoying.

  20. @Nick
    No there’s currently no way to turn it off.
    Why do you find it annoying? Are you accessing Inspection Options and Suppress Inspection commands frequently?

  21. Hadi Hariri says:

    @Nick,

    As far as I know, you cannot. You can however file a request at http://youtrack.jetbrains.net/issues/RSRP to see if it’s viable to make it an option.

    Thanks.

  22. Alex says:

    @Hadi: Thanks alot for this great update for ReSharper 6. I just bought the license a few days ago and this is exactly what I was looking for.

    Can we expect more updates regarding Explanations in the future?

    Thanks,
    Alex
    http://diablo3area.com/diablo3-barbarian-skills.php

  23. Hadi Hariri says:

    @Alex,

    We’ll be updating these as necessary.

    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>