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

RSRP-274425: Renaming instance fields that begin with m_

$
0
0
Reporter Darin Heuermann (dheuer8) Darin Heuermann (dheuer8)
Created Jul 26, 2011 4:56:24 PM
Updated Oct 8, 2018 2:29:23 PM
Resolved Oct 8, 2018 2:29:22 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Usability Problem
Fix version Backlog
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
Many companies/people use m_ as a prefix for instance field. The suggested name for the Instance fields (private) rule should not include the m in it. For example (using the defaults), m_InstanceField should have a suggested name of _instanceField, NOT _mInstanceField.

RSRP-274684: "Change To Proper Type" in LightBulb Menu

$
0
0
Reporter Denis Abramov (sparky2708) Denis Abramov (sparky2708)
Created Aug 3, 2011 9:57:26 PM
Updated Oct 8, 2018 2:40:49 PM
Resolved Oct 8, 2018 2:40:49 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Please add to LightBulb Menu the ability to change from:

  Dim response As Object = MsgBox("Would you like to make this account GLOBAL?", MsgBoxStyle.YesNoCancel Or MsgBoxStyle.DefaultButton2, "Save To GLOBAL")

to:

  Dim response As MsgBoxResult = MsgBox("Would you like to make this account GLOBAL?", MsgBoxStyle.YesNoCancel Or MsgBoxStyle.DefaultButton2, "Save To GLOBAL")

RSRP-59186: Change variable type context action

$
0
0
Reporter Matt Eland (meland) Matt Eland (meland)
Created Feb 24, 2008 9:03:16 PM
Updated Oct 8, 2018 2:41:16 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
If I have the following property:

public Foo Bar {get; }

and the following code:

public void Baz()
{
// anotherObject is declared and has a Bar property that returns type Foo.
object item = anotherObject.Bar;
// Do something with item
}

I can use context actions on object to change it to var and then context actions on var to change it to a Foo (via specify type explicitly). It'd be nice if there was a context action on object to change it to another type (such as Foo, an interface of Foo, or a base type of Foo). This would be especially handy for parameters as it would make it easy to use the most generic parameter type available.

RSRP-274885: Move declarations to namespace does not preserve alias usages

$
0
0
Reporter Stefan (GreenMoose) Stefan (GreenMoose)
Created Aug 15, 2011 1:01:44 PM
Updated Oct 8, 2018 2:46:03 PM
Resolved Oct 8, 2018 2:46:03 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
[Build 6.0.2202]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Foo.Bar
{
using IO = System.IO;
class Foo
{
public Foo()
{
var file = IO.File.Open("foo", IO.FileMode.Append);
}
}
}

Execute "Move declarations to namespace" on "namespace Foo.Bar".
"using IO = System.I" is removed and instead a "using System.IO" is inserted.
"IO.FileMode" is replaced with "FileMode".

RS Options have setting "use fully qualified names" checked as well as "Do not remove using directives if alias name...".

RSRP-275307: Make non-static quick fix shouldn't operate on enums

$
0
0
Reporter Ilya Ryzhenkov (orangy) Ilya Ryzhenkov (orangy)
Created Sep 6, 2011 12:11:50 PM
Updated Oct 8, 2018 2:50:04 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Enum X
a
b
End Enum

Class C
Sub D()
dim instance as new x;
instance.a
End Sub
End Class

RSRP-275431: Code Generated for "check if variable is null" Quick-Fix is Incorrect

$
0
0
Reporter John W Saunders III (johnwsaundersiii) John W Saunders III (johnwsaundersiii)
Created Sep 9, 2011 2:05:21 AM
Updated Oct 8, 2018 2:55:54 PM
Resolved Oct 8, 2018 2:55:54 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
This quick fix currently generates code like this:

PasswordReset reset = workAround.FirstOrDefault();
if (reset == null)
{
throw new ArgumentNullException("reset");
}

This is incorrect because "reset" is not a parameter to to the method.

At the very least, you should generate

PasswordReset reset = workAround.FirstOrDefault();
if (reset == null)
{
throw new InvalidOperationException("reset is null");
}

It would be better, of course, if the generated code could be configured in ReSharper Options.

RSRP-275483: "Await expression" quick fix

$
0
0
Reporter Alexander Shvedov (shvedov) Alexander Shvedov (shvedov)
Created Sep 11, 2011 1:01:43 AM
Updated Oct 8, 2018 2:58:08 PM
Resolved Oct 8, 2018 2:58:08 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Feature
Fix version Backlog
Affected versions 6.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
await syntax forces me to think about awaiting before writing the async call. It whould be really nice to allow user just write the async call first and then wrap invokation into await-expression. Quickfix availability conditions should be nearly the same as Introduce variable context action.

RSRP-275695: Generating Code Prefixes LINQ Keyword Variable Names With @ When It Isn't Necessary

$
0
0
Reporter Kevin Watkins (MrKWatkins) Kevin Watkins (MrKWatkins)
Created Sep 16, 2011 2:36:11 PM
Updated Oct 8, 2018 3:03:31 PM
Resolved Oct 8, 2018 3:03:31 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version Backlog
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
If I have a variable name that is the same a LINQ keyword, e.g. select, group, then generate some code from it I get variable names prefixed with @ when it isn't necessary. For example enter the following C# code:

public sealed class Test
{
private readonly string group;
}

Click on 'group'. In the actions list select 'Initialize field from constructor(s) parameter'. The code generated will be:

public sealed class Test
{
private readonly string group;

public Test(string @group)
{
this.@group = @group;
}
}

However the @s are unnecessary; the following will still compile:

public sealed class Test
{
private readonly string group;

public Test(string group)
{
this.group = group;
}
}

I'm using Visual Studio 2008 with .NET 3.5.

RSRP-459185: 'Redundant verbatim prefix' for @group and @from

$
0
0
Reporter Edward Avis (epa) Edward Avis (epa)
Created Jun 9, 2016 4:30:14 PM
Updated Oct 8, 2018 3:03:31 PM
Subsystem Psi - C#
Assignee Alexander Shvedov (shvedov)
Priority Critical
State Open
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
If C# code contains variables 'group' and 'from', some Resharper operations will automatically change them to @group and @from. But at the same time they are flagged as 'redundant verbatim prefix' and Resharper prompts you to remove the @.

RSRP-275801: Fix double comparison should insert double.Epsilon

$
0
0
Reporter Ilya Ryzhenkov (orangy) Ilya Ryzhenkov (orangy)
Created Sep 20, 2011 10:40:31 AM
Updated Oct 8, 2018 3:06:32 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State To be discussed
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
private double _innerRadius = 0;
public double InnerRadius
{
get { return _innerRadius; }
set {
if(_innerRadius == value) // use QF here
return;
_innerRadius = value;
}
}

RSRP-471764: Creating class and retyping it to enum makes it reload

$
0
0
Reporter Andrey Simukov (Andrey.Simukov) Andrey Simukov (Andrey.Simukov)
Created Oct 5, 2018 4:59:03 PM
Updated Oct 8, 2018 3:08:13 PM
Subsystem Platform - VS Integration
Assignee Serge Baltic (baltic)
Priority Show-stopper
State Open
Type Bug
Fix version 2018.3
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
1) Locate shared project
2) Create class through Add / New Item / Class - call it "TestEnum"
3) Observe "TestEnum.cs" being created
4) Rewrite the "class" part to "public enum" so you get "public enum TestEnum"
5) Start typing enum values
6) Observe that a dialog to reload the file is presented.
7) Click "No"
8) The dialog is then presented again

Disabling ReSharper solves this problem

RSRP-275986: [QF] Create missing async-pattern memebers

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Sep 21, 2011 9:46:53 PM
Updated Oct 8, 2018 3:16:41 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Open
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
if foo() returns some type with not all async-pattern members implemented
 var x = await foo();

RSRP-275989: QF await async method

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Sep 21, 2011 9:57:28 PM
Updated Oct 8, 2018 3:17:31 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Open
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
{code}
public Task<int> getIntAsync() {}

void bar() {
int x = getIntAsync(); // here
}

RSRP-277390: Attribute Used in Metadata, Redundancy

$
0
0
Reporter Jacob Berger (jberger) Jacob Berger (jberger)
Created Oct 21, 2011 9:06:35 PM
Updated Oct 8, 2018 3:24:02 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 6.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Example:

[DefaultValueAttribute(true)] // should provide a quick-fix to...
public bool IsEnabled { get; set; }

[DefaultValue(true)]
public bool IsEnabled { get; set; }
The "Attribute" text is redundant.

This seems similar to the "Qualifier is redundant" quick-fix where one would specify a namespace when there is already a using statement:

using System.Drawing;
...
public System.Drawing.Point Location { get; set; }// quick-fix to...
public Point Location { get; set; }

RSRP-278550: Change signature of Sub '...' in interface does not add optional keyword

$
0
0
Reporter christiaan Baes (chrissie11306834885318) christiaan Baes (chrissie11306834885318)
Created Nov 7, 2011 12:19:25 PM
Updated Oct 8, 2018 3:28:08 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
If you have something like this in your interface

Code
Public Sub Method()

and then implement it as such in your class

Code
Public Sub Method() Implements Interface.Method

If you then add an Optional value to the class.

Code
Public Sub Method(Optional ByVal param As String = "") Implements Interface.Method

You of course get the red squigly and the option Change signature of Sub 'Method' in interface.

If you do that it does this in the interface.

Code
Public Sub Method(ByVal param As String)

In other words it does not add the optional keyword nor the default value which is not in agreement with the contract and thus we get another error.

Version

JetBrains ReSharper 6.0 Full Edition
Build 6.0.2202.688 on 2011-06-29T19:14:16

RSRP-471219: Creating base method for the override one creates a private method (not protected by default)

$
0
0
Reporter Kirill Skrygan (kirill.skrygan) Kirill Skrygan (kirill.skrygan)
Created Aug 23, 2018 12:46:51 PM
Updated Oct 8, 2018 3:29:06 PM
Subsystem Generate
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Critical
State Fixed In Branch
Type Bug
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
See the gif...

RSRP-278848: No "Convert to method group" is proposed for fields

$
0
0
Reporter Julien Lebosquain (mrjul) Julien Lebosquain (mrjul)
Created Nov 7, 2011 9:23:46 PM
Updated Oct 8, 2018 3:30:24 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 6.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
private Func<int, bool> _condition;

void SomeMethod() {
new int[0].Where(i => _condition(i));
}

ReSharper should underline i => _condition(i) and propose to replace it with _condition. It works fine with local variables though.

RSRP-471125: Extend selection on start of string interpolation expression select the whole string instead of single expression

$
0
0
Reporter Alexander Ulitin (alexander.ulitin) Alexander Ulitin (alexander.ulitin)
Created Aug 17, 2018 4:08:58 PM
Updated Oct 8, 2018 3:31:27 PM
Subsystem Extend_Shrink Selection
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Critical
State Fixed In Branch
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

sample to reproduce:

Console.WriteLine($"Something {|CARET|Console.BackgroundColor}");

sample

RSRP-279692: Fix removes #IF directive in C#

$
0
0
Reporter Aleksey Syryh (Ender) Aleksey Syryh (Ender)
Created Nov 10, 2011 12:45:35 PM
Updated Oct 8, 2018 3:37:06 PM
Resolved Oct 8, 2018 3:37:06 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Usability Problem
Fix version Backlog
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
There is a code example

public class SomeClass
{
public SomeClass(bool isDebug)
{

}
}
public class AnotherClass
{
private SomeClass _value;
public SomeClass Value
{
get
{
if (_value == null)
{
#if DEBUG
_value = new SomeClass(true);
#else
_value = new SomeClass(false)
#endif
}
return _value;
}
}
}

In this code if statement marked as "'if' statement can be re-written as '??' expression", but if i am trying to fix it code is replaced by
get { return _value ?? (_value = new SomeClass(true)); }
(or get { return _value ?? (_value = new SomeClass(false)); } in case that build configuration is Release)

Suggested fix will be something like this
get { #if DEBUG
return _value ?? (_value = new SomeClass(true));
#else
return _value ?? (_value = new SomeClass(true));
#endif}
or maybe something another, but it shoud`t remove #if directive.

RSRP-461211: Custom patterns: Type placeholders does not capture generic parameters

$
0
0
Reporter Mikal Schacht Jensen (remoni) Mikal Schacht Jensen (remoni)
Created Oct 11, 2016 10:03:25 AM
Updated Oct 8, 2018 3:37:48 PM
Resolved Oct 8, 2018 3:37:48 PM
Subsystem Structured Patterns (SSR)
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Normal
State Fixed
Type Bug
Fix version 2018.2
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Creating a custom pattern with the following search:
public $returntype$ $method$($parameters$)
{
$statements$
}

...the following replace:
public async Task<$returntype$> $method$Async($parameters$)
{
$statements$
}

And applying it to this code
public List<int> MyMethod() { ... }

Yields:
public async Task<List> MyMethodAsync() { ... }

I would have expected it to yield
public async Task<List<int>> MyMethodAsync() { ... }

It seems the $returntype$ placeholder does not properly capture generic parameters of a type.
Viewing all 106942 articles
Browse latest View live


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