I'm using ReSharper for my solution (that contains 10 projects) and I'd like to see the hints/suggestions/warnings/errors (listed in a window) for a chosen project. How can I do that?
Note: the solution analyzer window shows only errors.
In ReSharper 5, you can right-click solution explorer and select Inspect Code. It will show you all the issues found in the selected scope. There is a button on the toolbar to filter issues.
Doesn't seem to be an available option with the current release of Resharper...
We are not going to include warnings
in SWA in ReSharper 4 release cycle.
This is due to complexity of some of
analyses, due to complexity of UI to
deal with thousands of possible
warnings, and so on and so forth. We
are going to improve SWA in many ways,
we have a lot of plans, but they need
some time to implement. I can't say
any specific dates right now, but I
think we can add more solution-wide
features in the next major release
after ReSharper
4.0.
As a workaround, you can set severity of warnings you are
interested in to the "error" level.
You may have to restart VS to force
SWA reanalyse files.
Source:
http://www.jetbrains.net/devnet/thread/273096
Related
When I open the solution I am working with, resharper takes some minutes to analyse the solution, making the IDE unresponsive.
Why does it do that if I had turned off solution wide analysis?
edit
I have got an answer that there is no actual analyze on startup if I turned off "solution wide analysis". However, on startup, there is a red animated icon in the lower right corner of the window and if I click that, the tooltip reads "Analyzing files (8 of 431)" so the suggestion that there is no solution wide analysis is contradicted by the wording.
there are multiple things you can try on the first hand.
have you trying reading
this link
or you can try showing the execution time for the solution analysis then you can see where it got stuck for minutes.
or you can try this too.
Go to ReSharper | Options | Environment | Performance Guide to check and quickly fix ReSharper and Visual Studio preferences that affect performance.
If you do not use solution-wide analysis, disable it or consider disabling warnings in solution-wide analysis. Even if it is disabled, you can find all code issues in your solution at any time by running code inspection for the whole solution. To configure solution-wide analysis, go to ReSharper | Options | Code Inspection | Settings.
In Visual Studio options, go to Source Control | Plug-in Selection: select None for the source control plugin. This will turn off Git or another VCS provider and improve overall performance.
ReSharper builds or updates indexes on startup. The indexes are used for basic ReSharper's functionality: navigation, refactoring, code analysis in open files, etc...
If you see IDE unresponsiveness, you can collect timeline perfomance snapshot and send it to JetBrains for investigation. Instructrions for submitting performance problem can be found here (you need to select "Performance snapshot(timeline)":
https://resharper-support.jetbrains.com/hc/en-us/articles/207243205-How-to-collect-a-performance-snapshot-and-send-it-to-JetBrains-Team
ReSharper wants to replace for-each by LINQ queries. I don't like that, and I don't want ReSharper even suggesting it.
How can I disable this?
I cannot find this in the ReSharper settings.
I don't want this // ReSharper disable LoopCanBeConvertedToQuery to be around each for-each.
I have a newer version, ReSharper 9, but here it is under ReSharper > Settings > Code Inspection > Inspection Severity. I think it might be there in your version as well.
There is a long list of all things it can show improvements on. Somewhere in there is Language Usage Opportunities which has two settings about loops and LINQ.
In ReSharper 9 there is also a possibility to search the settings above the treeview on the left or above the list in the Inspection Severity screen. Just type 'LINQ' there and it will show you the settings described above immediately.
I often see that some of the ReSharper functionality just doesn't work until you restart VS and reopen the project. But this situation I have now is consistent across restarts. So I am using a Go To Everything fuctionality often. It is enabled in ReSharper settings.
But since yesterday Go To Everything (Ctrl + N for me) can't find most of the files in the project (though it can find some).
Here is a screenshot of the problem:
I have that file open in editor just to prove that it's there. I show it found in an open solution in file tree. But ReSharper doesn't seem to be able to find it.
What to I do to troubleshoot. Thanks you in advance.
The best thing to do here is to raise an issue with JetBrains. Either log a bug with the issue tracker, or email resharper-support#jetbrains.com. Include details about what version of ReSharper you're using, what type of projects you're using, version of Visual Studio, etc.
However, from that screenshot, it looks like ReSharper isn't configured to analyse that file - there's no "green tick" in the scrollbar. Is ReSharper disabled? Is that file excluded from analysis? (Mind you, even when it's excluded, it should still show up in go to results. Something odd is happening here, support should be able to help better than StackOverflow)
Today I tried to made "Code Cleanup" of single file in ReSharper 6.0 (VS 2010). The Code Cleanup dialog did not show up so I tried again.
I then discovered, that the feature is grayed out and when I press hotkey for Code Cleanup, the notification area shows that the "command is not available at the moment".
Even the Code Cleanup settings are hidden. The panel where settings should be shown says that the settings are solution-specific and thus a solution needs to be opened (although it is, however).
All other solution-specific settings and features work, except for Code Cleanup.
I want to avoid re-installing ReSharper or resetting its settings, because otherwise I would need to set it up again (long and annoying work of setting all the options as before re-install).
I am afraid that backing up settings and restoring it again restores the problem as well.
Any suggestions?
Suggestions:
Ensure that the file that you're trying to cleanup is included in your solution.
Try to reopen solution (close and then open again).
Upgrade to 6.1.1, maybe its fixed there.
File a bug report at http://youtrack.jetbrains.com
Both ReSharper 7 and 8 seems to work OK.
I know this is an old answer, but I found a little more insight on this. According to Jerrie Pelser in this blog post from last year, this may have to do with the file being part of a NuGet package. In my case, this was definitely it!
In case of link rot, basically the post mentions that ReSharper will avoid refactoring/code cleaning for files it detects were added as part of NuGet packages. This is similar to how it will not allow code cleanup for generated code.
Has anyone used JustCode from Telerik lately? This question has been asked about two years ago, but I'm sure the issues must have been resolved by now. Especially referring to running it side by side with ReSharper.
I have been using Resharper for a while now. I decided to try JustCode to see how it behave.
After a week of using JustCode, I am uninstalling it and returning to Resharper.
What I like about JustCode:
A single window indicating all warnings/errors in entire solution.
Performance seemed to be a bit better than Resharper.
Refactoring is easier to get to.
Projects can be excluded, or type of file
Language can be excluded (such as XAML)
What I did not like about JustCode:
Sometimes the underline used to open the option for fixing or refactoring is frustratingly hard to click since VS also puts an underline at the same spot (and it is the context menu of the latter that pops up).
Cannot change an hint to be a warning instead.
Saw some minor bugs
JustCode was giving hundreds of false positive warnings in the XAML code (luckily I could turn the inspection of XAML off)
What I was missing from Resharper:
Warnings about method parameter missing/mismatch from the documentation
Hints to transform an expression into a Linq expression.
When writing an opening bracket, resharper automatically adds the closing one and puts you on an empty line in between the two.
When completing a method, Resharper adds the first parentheses. It also adds the last one if that method is parameterless.
I am sure there is a bunch of other stuff that I can't remember now
You can install both Resharper and JustCode alongside. I first suspended Resharper before installing JustCode and used JustCode fine. When I resumed Resharper and restarted VS, both were running together without error.
Together, Resharper was finding more than JustCode.
For example, JustCode did not give a warning for the following: "Value assigned is not used in any execution path."
It even missed an error: "Cannot convert type 'int' to 'bool'." The expression was:
if ((bool)CanDoIt) // Here CanDoIt is a property of type int.
{
...
}
All in all, the tool is not bad. I recommend it over not having any. But if you have the choice between Resharper and JustCode, go with Resharper... for the moment; JustCode is still young.
You can change the size of JustCode's smart tag or turn off Visual Studio's smart tag in JustCode's options menu. I prefer to access VS's smart tag by using ctrl+., so it hasn't been an issue for me.