Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all 106942 articles
Browse latest View live

RSRP-466847: Unnecessary escape generated by "Convert concatenation to interpolation" action

$
0
0
Reporter Baste Nesse Buanes (baste) Baste Nesse Buanes (baste)
Created Oct 23, 2017 8:12:58 PM
Updated Apr 11, 2018 5:24:32 PM
Subsystem Quick Fixes
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Normal
State Fixed In Branch
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
When using the "Convert concatenation to interpolation" action, Rider converts all instances of the symbol ' into \', even though that's not necessary.

So this:

var data = "I've got 13 " + foo + "'s, isn't that great? By the way, '";

Is turned into:

var data = $"I\'ve got 13 {foo}\'s, isn\'t that great? By the way, \'\'\'\'";

when it should be:

var data = $"I've got 13 {foo}'s, isn't that great? By the way, '
";

RD-172.4144.1459

RD-172.4144.1459, JRE 1.8.0_152-release-915-b11x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080 Europe/Paris

RSRP-463272: "Convert concatenation to interpolation" should not escape characters unnecessarily

$
0
0
Reporter Joe White (joewhite) Joe White (joewhite)
Created Feb 26, 2017 4:20:41 AM
Updated Apr 11, 2018 5:24:40 PM
Subsystem Quick Fixes
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Normal
State Fixed In Branch
Type Cosmetics
Fix version No Fix versions
Affected versions 2016.3.2
Fixed In Version ReSharper Undefined
VsVersion VS 2015 RTM
Repro: Enter the following two lines into a method, then put the cursor on either of the "+" signs and Alt+Enter > Convert concatenation to interpolation.

return "'" + DateTime.Now + "'";

Expected: The code should be converted to:

return $"'{DateTime.Now}'";

Actual: The apostrophes are escaped unnecessarily:

return $"\'{DateTime.Now}\'";

Cosmetic issue only, but ReSharper shouldn't be generating unnecessary code.

RSRP-453533: Make all fields readonly in file/project/solution does not work

$
0
0
Reporter David Gardiner (flcdrg) David Gardiner (flcdrg)
Created Feb 3, 2016 4:28:58 AM
Updated Apr 11, 2018 5:27:01 PM
Subsystem Quick Fixes
Assignee Alexander Shvedov (shvedov)
Priority Critical
State In Progress
Type Bug
Fix version 2018.2
Affected versions 10.0.2
Fixed In Version ReSharper Undefined
VsVersion VS 2015 RTM
Given a class with more than one field that is a candidate to be made readonly, the UI offers the option to convert fields in the current file, project or solution - but none of these options have any effect and no error is reported.

The following class demonstrates this:
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global

namespace ResharperReadonlyInFile
{
public class MyClass
{
public string Field1 = "Blah";

public string Field2 = "Blah2";

public string Thing()
{
return $"{Field1}{Field2}";
}
}
}



None of these options work.

This occurs for both static and non-static fields.

RSRP-468105: 'Make all fields readonly in scope' QF doesn't work with public fields

$
0
0
Reporter Andrey Dyatlov (Andrey.Dyatlov) Andrey Dyatlov (Andrey.Dyatlov)
Created Jan 26, 2018 6:22:23 PM
Updated Apr 11, 2018 5:27:34 PM
Resolved Apr 11, 2018 5:27:34 PM
Subsystem Quick Fixes
Assignee Alexander Shvedov (shvedov)
Priority Normal
State Duplicate
Type Bug
Fix version No Fix versions
Affected versions 2017.3.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Apply bulk QF 'make all fields readonly in file' to any field in the following code snippet:

class C
{
public static int x = 0;
public static int y = 0;
private static int z = 0;

public static int Z => z;
}

class D
{
public static int Sum => C.x + C.y;
}

note that only field 'z' is actually affected by the fix even if you use it from 'x' or 'y'

This behavior is especially frustrating if you don't have private fields which could be readonly so it appears that the fix just does nothing.

RSRP-461581: Detect incorrect use of C# interpolated strings as format strings

$
0
0
Reporter Evgeny Morozov (shift_evgeny) Evgeny Morozov (shift_evgeny)
Created Nov 4, 2016 10:00:03 PM
Updated Apr 11, 2018 5:28:43 PM
Subsystem Code Analysis - C#
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Normal
State Fixed In Branch
Type Feature
Fix version No Fix versions
Affected versions 2016.2.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
string.Format($"{0}", "my text")

The above code looks fine at first glance, but its return value is "0" - not "my text" as you might expect!

This can be hard for a human to see, but R# can probably detect this easily, since it already detects format strings. Using an interpolated string as a format strings should probably be a warning - it seems much more likely to be a mistake than intentional. (How often do you really need to "double-format" a string?)

RSRP-464958: Performance degradation during compilation

$
0
0
Reporter Artur Zając (azajac) Artur Zając (azajac)
Created Jun 2, 2017 12:31:43 PM
Updated Apr 11, 2018 5:31:21 PM
Subsystem Psi - Caches
Assignee Slava Tutushkin (slava.tutushkin)
Priority Critical
State Open
Type Bug
Fix version 2018.2
Affected versions 2017.1.2
Fixed In Version ReSharper Undefined
VsVersion VS 2017 RTM
This issue was fixed for VS2015 in RSRP-463798, but "processing assemblies" is still performed during compilation when Visual Studio is activated (after VS lost activated state when I switch to other application). In VS2015 there was no big problem with this, It lasted quite a short time, but now I work with VS2017 and now it hangs VS for a long time.

Additionally with VS2017 after compilation finish "processing assemblies/merging assemblies index" phase is very slow even though my computer is much faster than that with VS2017 (project is the same).

RSRP-467050: Optimize References, Find Code dependent on module, etc. don't understand PackageReference assemblies

$
0
0
Reporter Rian Stockbower (rianjs) Rian Stockbower (rianjs)
Created Nov 15, 2017 6:21:05 PM
Updated Apr 11, 2018 5:37:18 PM
Subsystem Optimize References
Assignee Alexander Ulitin (alexander.ulitin)
Priority Normal
State Submitted
Type Bug
Fix version 2017.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
nuget now has two resolution mechanisms, as you probably know.

  • packages.config + references to assemblies on disk. This works fine, as always.
  • PackageReference entries in a csproj file. This doesn't work.

This is problematic for mixing and matching Framework and NetStandard libraries. The PackageReference entry will compute the dependency graph, and pull down everything it needs automagically. If you use the old packages.config way, you have to flatten the dependency graph into the packages.config file, and manually reference each required DLL.

Immo Landwerth has basically said that PackageReference is the future. It would be nice to have support for it:
https://github.com/dotnet/standard/issues/481

RSRP-469224: Extract Members To Partial: long path is not cropped in dialog.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 11, 2018 5:39:45 PM
Updated Apr 11, 2018 5:39:45 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 182.0.20180410.111135-eap00d.

See screenshots.

Actual result:
Long path is not cropped. Dropdown becomes wider than the dialog. After selection only first part of path is shown in dropdown.

Expected result:
Long path is meaningfully cropped (maybe start should be cropped).


RSRP-469225: "?" leads to incorrect pages in some dialogs.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 11, 2018 5:43:42 PM
Updated Apr 11, 2018 5:43:42 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Submitted
Type Bug
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 182.0.20180410.111135-eap00d.

Extract Members To Partial: https://www.jetbrains.com/help/resharper/2018.1/Refactorings__Index.html
Make Method Non-Static: https://www.jetbrains.com/error404.jsp

RSRP-469191: Make Method Non-Static: Issues.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 10, 2018 5:33:17 PM
Updated Apr 11, 2018 5:44:02 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Show-stopper
State Submitted
Type Bug
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 182.0.20180410.111135-eap00d.

        class MetaInfo
        {
            public string Id { get; set; }
            public string Name { get; set; }

            public static MetaInfo Merge(MetaInfo m1, MetaInfo m2)
            {
                return new MetaInfo
                {
                    Id = m1.Id + m2.Id,
                    Name = m1.Name + m2.Name
                };
            }
        }
  1. Invoke Make Method Non-Static on Merge.
  2. Inspect dialog.

Results:

  1. When dialog just opens and keyboard down arrow is pressed (1 - n times) then nothing happens (second parameter is not selected). Expected result: second parameter is selected after down arrow is pressed one time. NOTE: if keyboard up arrow is pressed and after that down arrow is pressed then second parameter is selected.
  2. When dialog just opens and mouse click on second parameter then second parameter is not selected (see screenshot). Expected result: second parameter is selected.
  3. If Undo checkbox is selected using keyboard-only input (tabs) then the rectangle around the label is NOT shown (first time). Expected result: rectangle around the label is shown. - Also applicable for "Make Static", "Replace Constructor With Factory Method".
  4. If Conflicts dialog appears and Back button is clicked then "Make Method Non-Static" dialog appears small.

RSRP-126181: Allow for Doc comments: options when working with Interfaces

$
0
0
Reporter Nathan Grier (npgrier) Nathan Grier (npgrier)
Created Oct 22, 2009 12:01:29 AM
Updated Apr 11, 2018 5:50:17 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Similar to when you are working with an abstract class, it would be nice to be able to have options for commenting when pulling up members in a class that is implementing an interface:

http://www.jetbrains.com/resharper/documentation/help20/Refactoring/pullMembersUp.html

This shows how it works with abstract classes. I'm working with interfaces though and it automatically copies the comments. Would be nice if I had the options that are shown in the documentation when working with an abstract class.

RSRP-125252: Analyze and fix: 'Replace + with Path.Combine'

$
0
0
Reporter Andrew Serebryansky (marcus23) Andrew Serebryansky (marcus23)
Created Oct 15, 2009 1:54:21 PM
Updated Apr 11, 2018 5:52:16 PM
Resolved Apr 11, 2018 5:52:16 PM
Subsystem No Subsystem
Assignee Ilya Ryzhenkov (orangy)
Priority Normal
State Declined
Type Feature
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Replace "<folder> + <file>" with Path.Combine(<folder>, <file>). This solves the problem of the user mistakenly not checking whether <folder> ends with a folder separator, thereby creating path values like

"c:\windowsMyFile.txt" or
"c:\windows\\MyFile.txt"

Not sure if it's possible, but you could also check for the unwieldy logic people use when trying to manually handle the ending directory separator.

RSRP-107189: Enable 'Find Dependent Code' menu item for Solution Explorer window in case of multiselection

$
0
0
Reporter Igor A (igor_a1265648516806) Igor A (igor_a1265648516806)
Created May 10, 2009 8:38:21 PM
Updated Apr 11, 2018 5:53:33 PM
Resolved Apr 11, 2018 5:53:31 PM
Subsystem No Subsystem
Assignee Ilya Ryzhenkov (orangy)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Now 'Find Dependent Code' menu item for Solution Explorer window -> References is enabled only for one item.
It would be convenient to enable it in case of multiselection.

RSRP-121257: Possibility to search containing text by default

$
0
0
Reporter Maciej (parslej) Maciej (parslej)
Created Sep 15, 2009 5:33:08 PM
Updated Apr 11, 2018 6:00:46 PM
Resolved Apr 11, 2018 6:00:44 PM
Subsystem No Subsystem
Assignee Ilya Ryzhenkov (orangy)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I'm looking for possibility to set up Resharper to search inside names (instead from beginning) ?
Eg assume when pressing Alt + \ in dialog's results I can see

* JohnSmith
* JonnyBalboa
* MariaSmith

I'm looking for all members contain 'Smith' substring - so I'm forced to use asterisk: *Smith
But I want just enter 'Smith' without anything more (like in DPack)

This can be one of configuration option so every user can set it up as he/she like

RSRP-223212: Don't prompt me to make a property getter private

$
0
0
Reporter Joe White (joewhite) Joe White (joewhite)
Created Mar 3, 2011 7:40:40 PM
Updated Apr 11, 2018 6:17:12 PM
Subsystem Quick Fixes
Assignee Ivan Serduk (IvanSerduk)
Priority Major
State Open
Type Usability Problem
Fix version Backlog
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
I often write an object with public, read/write auto properties that are set by outside code, and read only by the object itself. In these cases, ReSharper will put a green wavy underline under the auto property's "get" keyword, with hint "Accessor 'MyProperty.get' can be made private", and will show a quick-fix menu with "Make 'get' accessor private".

If I apply this quick-fix, I end up with a bad design. Write-only properties are frowned upon, and a property with a public setter but private getter is write-only as far as the outside world is concerned. Since the fix is worse than the "problem", I don't want Resharper to show me the warning in the first place.

I could disable the warning in ReSharper options, but then I wouldn't get warnings about setters that could be private, and I do want to know about those. (There's nothing wrong with read-only properties.)

Give me a way to disable the warning for getters, while still seeing it for setters. One option might be to change the inspection rules so that it never shows the warning for getters. Another option might be to split it into two warnings, one for the getter and one for the setter, so I can use either ReSharper options or "Suppress inspection with comment" to manually disable the getter warning while still having the setter warning.

RSRP-469226: Refactorings form && navigation

$
0
0
Reporter Alisa Afonina (alisa.afonina) Alisa Afonina (alisa.afonina)
Created Apr 11, 2018 6:21:37 PM
Updated Apr 11, 2018 6:21:55 PM
Subsystem Platform
Assignee Denis Korneev (Denis.Korneev)
Priority Critical
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Double click on element does not navigate to element from another file (file that does not contain that element). NOTE: if currently file that contains parameter is focused than navigation works.

RSRP-102034: 'Find dependent code' should work on folders (especially on web and service references)

$
0
0
Reporter Andrew Serebryansky (marcus23) Andrew Serebryansky (marcus23)
Created Apr 3, 2009 1:39:56 PM
Updated Apr 11, 2018 6:24:47 PM
Subsystem Navigation - Search (Find Usages)
Assignee Alexander Ulitin (alexander.ulitin)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
At the moment 'Find dependent code' is not available on service references

RSRP-108120: Limit number of opened editor tabs

$
0
0
Reporter Eugene Petrenko (eugene.petrenko) Eugene Petrenko (eugene.petrenko)
Created May 18, 2009 1:12:34 PM
Updated Apr 11, 2018 6:26:15 PM
Resolved Apr 11, 2018 6:26:15 PM
Subsystem No Subsystem
Assignee Ilya Ryzhenkov (orangy)
Priority Normal
State Declined
Type Feature
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Implement logic that is used in IDEA
Close rarely used tabs.

RSRP-88065: Highlight corresponding argument in format string

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Dec 9, 2008 4:49:41 PM
Updated Apr 11, 2018 6:31:20 PM
Subsystem Matching Elements - String Format
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
In the same way that matched parenthesis/braces are highlighted, it'd be nice to have a marker that indicates which value/token corresponds to the token/value under the caret.

For example:

string.Format("The r{0} in Sp{0} falls m{0}ly on the pl{0}.", "ain");

Having the caret on any of the {0} tokens would highlight the "ain" value.

Conversely, having the caret on the "ain" value would highlight all of the {0} tokens.

RSRP-69667: Suggest when field is not required

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created May 23, 2008 5:23:50 PM
Updated Apr 11, 2018 6:44:11 PM
Subsystem Code Analysis
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
In the following code, the field is not required. It would suffice to make both usages local in scope. I can't think of a scenario in which applying this change would break the code's behaviour.

public sealed class TestClass
{
private string _field;

public void A()
{
_field = "A";
_field.ToString();
}

public void B()
{
_field = "B";
_field.ToString();
}
}
Viewing all 106942 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>