How to undo 'Exclude from Coverage Results'? - jetbrains-ide

I've excluded some functions from the coverage result by right-clicking them in the unit test coverage tree and picking "Exclude from Coverage Results".
Now I want them back. The documentation suggests clicking the "Show all nodes link on top of the Unit Tests Coverage window" but I cannot find such a beast anywhere. I've pored over the documentation, scrutinised every pixel of the UI and went through the settings with a fine-toothed comb, but to no avail ... I've also tried searching the project tree and %AppData%/JetBrains/* for the names of the excluded functions but could not find anything that looked relevant.
How can I un-exclude the excluded functions? I'm using Rider 2022.1.

Just updated Rider to version 2022.1.2. Now the coverage window has a bar that reads "Coverage tree has excluded nodes. Show all nodes" whenever there are excluded nodes, with "Show all nodes" being a link that does just what the documentation says ...

The only way to undo it for me (rider 2022.2.3 linux) was to close/reopen solution.

Related

How keep tests shortcuts/icons once `auto-run` is switched off from the extension sidebar?

Currently Jest in my VSCode uses the --watch parameter (I use the Orta.vscode-jest extension), which mean when I save a file, it will run all tests in uncommitted files.
It's a good default behavior but sometimes my upcoming commit may imply multiple files and I don't want to waste 75% of my time and resources on tests I don't to focus on.
After reading documentation, I found I can turn off the auto-run (see arrow below), so now when saving nothing happens, and I was expecting a way to trigger manually the test I want.
Unfortunately once done it's like if the extension was totally shut down. See below, I have no longer the ability to run tests through the extension.
Do you know a way to solve this? Keeping icon buttons to trigger manually specific tests?
I saw some homemade solution https://stackoverflow.com/a/55279902/3608410 (see Running a selected Jest test in Visual Studio Code) but I feel it's weird since we have a powerful extension already installed.
(maybe I missed something...)
Thank you,
Didn't see that before but if doing a right click in the test file where needed, in the menu I'm able to run a specific test, handy!

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.

Stop ReSharper cleanup from reordering unit tests

Currently when I run Full Cleanup on a file with NUnit tests R# totally ruins it. For some reason it reorders the methods with [Test] in alphabetical order. How can I turn this "feature" off?
I'm using version 9.2.
This is explained in the documentation here
you need to go to Code Editing | C# | File Layout page of ReSharper options and then remove the default NUnit layout pattern (or change it so that it doesn't reorder alphabetically)
The simplest way to do this via the ui (which seems to be very confusing) is to double click each Type Pattern and make sure you are in composition view (click the icon in the top right corner until its a cog) then double click the method Entry elements until you find the one which has the constraint for the attribute for NUnit framework (somethign like this):
and then change the Sort By option in the bottom right of the main settings window to be none

Team Explorer displaying an incomplete shelveset

In Visual Studio VS2012, I am using Team Explorer to display shelveset details in a file tree form.
I am using the VS TFS source control plug-in.
For some mysterious reason it has a capacity limit on something like the number of files shown. On the screenshot below it just chose to hide two files from my eyes again:
This is easily missed during review if one is used to seeing the whole shelveset most of the time.
One can go to the "All Included Changes" page, but that page is no longer in the file tree form and is considerably more difficult to navigate (it is not possible to expand/collapse on folder level).
The resulting end user experience is quite absurd. Tiny shelvesets where the tree view is only complicating the control are displayed as trees, whereas shelvesets of any non-trivial size are unusable in the tree view.
What is the tool thinking it is doing?
Can I control the capacity limit, so that I can see a slightly larger shelveset in the file tree form somehow?
Can I prevent the incomplete display of shelvesets altogether?
Visual Studio 2013 (pre-release) is either fixed or significantly improved. It can display a shelveset containing 2254 files in the treeview as a charm (VS 2012 Update 3 only showed 156 files out of the same shelveset).

Can ReSharper ignore projects/tests in navigation

When using the various navigation and usage features of ReSharper, is there a way to make it hide some of the projects (with tests) in the solution?
Often when I'm browsing through the code, I'm not really interested in the tests, but only the production code.
I received this answer from the Resharper support team.
I have looked at "find usages" deeper and figured out that there is the
following item in filter dropdown -- "Show Unit Test Usages" (attached). So
if you uncheck this item -- usages from Test Projects won't appear in search
result.
Well im not sure this works for the navigation and usage features but for analysis it does, tryto use the skip files and folders menu to add folders which should be excluded.
Under Optionmenu use Settings under the Code Inspection section and select "Edit Items to Skip" and select your folder.
Take a look at this Article too
First, there's no setting in ReSharper to "forget" a certain project in solution.
However, in some cases, navigation combos may help you out.
For example, when you search for types, files or symbols with ReSharper, you can restrict search scope with navigation combos. Say, in NHibernate, entering "dm spec " in Go to Type restricts search scope to Projects\Core\NHibernate.DomainModel\NHSpecific

Resources