Resharper analyses files when solution is loaded even if solution wide analysis is off - resharper

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

Related

Disable partial compiling (updates) to UI in Android Studio

By default, Android Studio will detect changes to your code and apply the changes to UI while the app is running. This is great but only works for minor changes like changing color, fontsize, etc. But what I have noticed is that over time, Android Studio becomes really laggy in performance as the app grows in code size. The biggest performance hit is when the app is running in debug mode and I make changes. If I run the app but not in debug mode, it is still laggy but not as much. Typing in code gets a lot of freezes.
Is there a way to disable this automatic compiling of changes and updating the UI?
Search for Live Edit Of Literals in settings you will find an option to enable and disable Live Edit Of Literals as shown in below image
After some testing, it appears that this performance issue is related to the amount of code in the file you are editing. The file I was editing had a very large amount of code in it - 850 lines / 32k. But when I tried editing a file with significantly less code, there was no performance issues. Google needs to address this issue. A temporary fix is to break up the larger code into smaller files.

IntelliJ Idea: How to automatically remove commented out code?

I've run SonarQube analysis on my Android/Java project and it resulted, among others, with issues:
Sections of code should not be "commented out"
If SonarQube is able to identify them, is it possible to automatically commented out code in Android Studio? I can't just remove all comments, because there are also some that are legit.
I have 500+ of them and don't want to do it manually. Any ideas?
There is no general solution for issues reported by SonarQube since SonarQube only finds problems, it doesn't offer a way to fix them.
In this particular case of commented out code, the same check is available directly in IntelliJ.
from the menu, select "Code | Analyze Code | Run Inspection by Name"
type "commented" to select the inspection about commented code
run it on the whole project
This inspection now lists the occurrences, and the Problems tool window offers you to fix all of them at once.

What is the general approach to fixing Go To functionality in Resharper

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)

resharper disable for c# .cs files

is it possible to only enable resharper for javascript and css files? I don't want it inspecting my c# files as it's driving me nuts with it's styling and and at times somewhat controversial recommendations. I haven't got time to set each individual setting, I'm just looking for a "don't inspect c# files" check box, if there isn't one I think my resharper trial will be officially over.
If you really want to disable ReSharper for C#, try going to ReSharper | Options -> Code Inspection | Settings -> Edit Items to Skip and add a file mask to skip *.cs.
But better way would be to disable those ReSharper warnings that you don't like. To do this, click Alt-Enter on the suggestion that you don't like, go to Options submenu, select Configure inspection severity and then Do not show. This is for ReSharper 8.0, in 7.1 it should be pretty similar.

Resharper warnings window

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

Resources