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

RSRP-213514: QF add return type to method is missing

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Feb 10, 2011 11:30:17 AM
Updated Oct 5, 2018 3:18:29 PM
Resolved Oct 5, 2018 3:18:29 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
   protected override IReference BindReferenceAfterComplete(ITextControl textControl, TextRange nameRange)
{
var reference = base.BindReferenceAfterComplete(textControl, nameRange);
if (reference != null)
reference = FixInsertedText(reference);
return reference;
}

private void FixInsertedText(IReference reference)
{
var attribute = reference.GetTreeNode() as IXmlAttribute;
if (attribute != null && attribute.Eq == null)
{

}
}

NB the same applied to VB

RSRP-214200: Import method quick fix suggests to import useless method

$
0
0
Reporter Olga Lukianova (olka) Olga Lukianova (olka)
Created Feb 11, 2011 8:34:18 PM
Updated Oct 5, 2018 3:26:45 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
It is useless to import method which has the same signature as problematic one.

namespace MyNamespace
{
public static class X
{
public static void Foo(this C c) { }
}

}

public partial class C
{
void A()
{
this.Foo({caret});
}

void Foo()
{
//body 1
}
}

public partial class C
{
void Foo(){}
}

RSRP-471763: Remove braces: Removes first brace only!

$
0
0
Reporter Marcel (aureole82) Marcel (aureole82)
Created Oct 5, 2018 2:51:41 PM
Updated Oct 5, 2018 3:33:02 PM
Subsystem Context Actions
Assignee Andrew Karpov (andrew.karpov)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Remove braces breaks code:
Remove braces breaks code


Microsoft Visual Studio Community 2017 Version 15.8.6
JetBrains ReSharper Ultimate 2018.2.3 Build 182.0.20180912.70621

RSRP-216475: Quick-fix for flags enum bit-test inserts dead code

$
0
0
Reporter William Dean (willdean) William Dean (willdean)
Created Feb 19, 2011 1:00:39 AM
Updated Oct 5, 2018 3:40:55 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
The following code:

    class Test
{
[Flags]
enum TestEnum
{
a = 0x01,
b = 0x02,
}

void MyMethod()
{
TestEnum val = TestEnum.a;

if(val & TestEnum.a)
{
;
}
}
}

Contains an error at "val & TestEnum.a"
R# offers a quick-fix "Compare with default value", which converts the if to:

 if((val & TestEnum.a) != (TestEnum)0) 

The (TestEnum) cast is redundant and so, after a short pause, is marked as dead code, requiring a reposition and another quick-fix to get a clean line.

It would be better if the first quick-fix could insert the clean code to start with.

RSRP-217151: Import popup in VB problem

$
0
0
Reporter Olga Lukianova (olka) Olga Lukianova (olka)
Created Feb 21, 2011 6:34:53 PM
Updated Oct 5, 2018 3:42:29 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
Import popup is suggested at caret place. But it is impossible to import this type here cause of module with name 'Bug'.


Module Bug
End Module

Namespace Bug
Public Class ImportWanted
End Class
End Namespace

Public Class Bla
Dim x As ImportWanted{caret}

Public Sub H()
End Sub

End Class

RSRP-217412: "Convert to 'return' statement" inappropriate when comments exist in between

$
0
0
Reporter Samuel Neff (_sam_) Samuel Neff (_sam_)
Created Feb 22, 2011 5:48:49 AM
Updated Oct 5, 2018 3:46:34 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 5.1.3, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Given the following code:

    // some comment
    if (condition)
    {
        return value1;
    }

    // another comment
    return value2;

Resharper will highlight the if statement and suggest "*Convert to 'return' statement.*". However, this is not really an appropriate conversion given the comments above the if and the second return. Doing the refactoring produces this result:    
    
    // some comment
    return condition ? value1 : value2;

    // another comment

Notice how the second comment is now after value2 and not visually linked to it at all. In my view, this refactored code is wrong. The suggested refactoring should take comments into account and either refactor appropriately separating the conditional on different lines and interleaving the comments or it should not offer the refactoring.

RSRP-221941: ReSharper inserts invalid integer constant in VB code

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Mar 2, 2011 6:34:30 AM
Updated Oct 5, 2018 3:56:28 PM
Resolved Oct 5, 2018 3:56:28 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Interface I
Sub Foo(Optional ByVal x As Long = Long.MinValue)
End Interface

Class C
Implements I ' Implement members
End Class

Result:

Interface I
Sub Foo(Optional ByVal x As Long = Long.MinValue)
End Interface

Class C
Implements I

Public Sub Foo(Optional ByVal x As Long = - 9223372036854775808) Implements I.Foo ' error BC30036: Overflow.
Throw New NotImplementedException()
End Sub
End Class

RSRP-223913: New quick fixes to "cannot apply operator != to ...": 1) change type of a local variable; 2) change type of a parameter

$
0
0
Reporter Andrey Simanovsky (ands) Andrey Simanovsky (ands)
Created Mar 4, 2011 10:38:35 PM
Updated Oct 5, 2018 3:57:28 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Consider a code
void Foo(Guid arg)
{
string guid = null;
//...
if (arg == guid)
{
//..
}
}
In the code above I would like to have a quick-fixes "Change type of 'guid' to 'Guid'" and "Change type of 'arg' to 'string'".

RSRP-224374: Suggest convert method to non-static when argument is of same type as containing class

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Mar 6, 2011 9:32:32 PM
Updated Oct 5, 2018 4:01:20 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
class Foo
{
public static void Bar([NotNull] Foo foo, Arg arg1, Arg arg2) { ... }
}

R# could provide a hint-level analysis that this method could be made non-static via one of it's arguments, and provide appropriate QF. Only appropriate when argument is provably non-null (i.e. annotation, throw NRE statement or enclosing type is a struct.)

class Foo
{
public void Bar(Arg arg1, Arg arg2) { ... }
}

...with updated usages, of course

RSRP-451429: ReSharper UTR has unexpected behavior for debugging tests with same name and different parameters

RSRP-460000: Using the unit test coverage leads to the contents of the output tab not to be shown

$
0
0
Reporter Matthias Jansen (celplusplus) Matthias Jansen (celplusplus)
Created Jul 27, 2016 1:07:53 PM
Updated Oct 5, 2018 4:09:11 PM
Resolved Oct 5, 2018 4:09:11 PM
Subsystem Unit Testing
Assignee Fedor Buyvol-Kot (Fedor.Buyvol-Kot)
Priority Normal
State Obsolete
Type Bug
Fix version No Fix versions
Affected versions 2016.1.2
Fixed In Version ReSharper Undefined
VsVersion VS 14
Using the unit test coverage leads to the contents of the output tab not to be shown.

After running the coverage, the contents of the output tab are not shown anymore. They are still present in the visual tree and can be copied, so the data is there. They just appear covered by some element. Parts of the headline and its background are visible.

As long as tests are run without coverage, the output can be viewed. Once the coverage was used Visual Studio needs to be restarted in order to be able to view the output again.

RSRP-231811: Create file from usage QF

$
0
0
Reporter Ilya Ryzhenkov (orangy) Ilya Ryzhenkov (orangy)
Created Mar 18, 2011 1:01:58 PM
Updated Oct 5, 2018 4:18:50 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Need QF to create file on unresolved path reference. E.g.
    <script type="text/javascript" src="myTests.js"></script>  

RSRP-233873: Quick fix 'Add parameter' cosmetics

$
0
0
Reporter Olga Lukianova (olka) Olga Lukianova (olka)
Created Mar 22, 2011 1:49:56 PM
Updated Oct 5, 2018 4:20:03 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Cosmetics
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
The text of quick fix is:

'Add parameter at Foo(IEnumerable enumerable, Integer)'

But it should be in VB style:

'Add parameter at Foo(ByVal enumerable as IEnumerable, Integer)'

Imports System.Collections

Public Module MM
Sub Main()
Dim x as IEnumerable
Foo(x{caret}, 34)
End Sub

sub Foo(x As Integer)
End Sub
End Module

RSRP-235342: QFix 'Implement members' puts generated members under CDATA section

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Mar 24, 2011 12:31:38 AM
Updated Oct 5, 2018 4:21:32 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
Class A
Implements IEnumerable(Of String) ' Invoke QFix here
Dim x = <![CDATA[

Result:

Class A
Implements IEnumerable(Of String)
Dim x = <![CDATA[

Public Function IEnumerable_GetEnumerator() As IEnumerator(Of String) Implements IEnumerable(Of String).GetEnumerator
Throw New NotImplementedException()
End Function

Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
Throw New NotImplementedException()
End Function
End Class

RSRP-235546: missing namespace suggestion for an attribute

$
0
0
Reporter Michaël Willemot (Michaël.Willemot) Michaël Willemot (Michaël.Willemot)
Created Mar 24, 2011 10:59:06 AM
Updated Oct 5, 2018 4:22:39 PM
Resolved Oct 5, 2018 4:22:39 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions 5.1.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
This gives MyType is not an attribute, without resharper suggesting the using MyNamespace.Attributes;

//using MyNamespace.Attributes;
namespace MyNamespace.Attributes
{
public class MyTypeAttribute : Attribute
{}
}
namespace MyNamespace.Models
{
public class MyType
{}
public class MyModel
{
[MyType]
public string MyProperty { get; set; }
}
}

RSRP-235968: Unsatisfied Generic Constraint: QFixes: Prefer "Add Constraint" over "Remove Constraint"

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Mar 24, 2011 6:39:48 PM
Updated Oct 5, 2018 4:26:16 PM
Resolved Oct 5, 2018 4:26:16 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Usability Problem
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
    public static IEnumerable<PartCatalogueType> GetPartsWithAttribute<TAttribute>(this IPartsCatalogue t) where TAttribute : Attribute
{
new CatalogueAttributeFilter<TAttribute>()
}

The CatalogueAttributeFilter class requires that its formal generic parameter be of type PartAttribute, but my method's TAttribute is only an Attribute, which is not enough.

This is a common case when you're writing generic utility methods calling some other generic methods: you begin with no or weak constraints, and the methods you call usually make them more strict.

By default, R# suggests a QFix to remove PartAttribute constraint from the CatalogueAttributeFilter class.
The correct QFix I should use in this case has lower priority.

Should be right the other way: prefer local code modification to modifying the code you call.

RSRP-240933: QF 'Remove redundant assignment' changes overload resolution and breaks code

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Mar 31, 2011 1:25:32 AM
Updated Oct 5, 2018 4:28:38 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
class C
{
static void Main()
{
byte x = 1;
var y = Foo(x += 1).ToLower(); // Remove assignment
}

static void Foo(int x) { }

static string Foo(byte x)
{
return "";
}
}

Actual result:

class C
{
static void Main()
{
byte x = 1;
var y = Foo(x + 1).ToLower(); // error CS0023: Operator '.' cannot be applied to operand of type 'void'
}

static void Foo(int x) { }

static string Foo(byte x)
{
return "";
}
}

Expected result:

class C
{
static void Main()
{
byte x = 1;
var y = Foo((byte)(x + 1)).ToLower(); // OK
}

static void Foo(int x) { }

static string Foo(byte x)
{
return "";
}
}

RSRP-465044: Resharper unit test runner fails with VS2017 .NET core 1.0 unit tests

$
0
0
Reporter Lucas Gulbranson (lucasgulbranson) Lucas Gulbranson (lucasgulbranson)
Created Jun 9, 2017 6:53:57 PM
Updated Oct 5, 2018 4:29:20 PM
Resolved Oct 5, 2018 4:29:20 PM
Subsystem Unit Testing
Assignee Fedor Buyvol-Kot (Fedor.Buyvol-Kot)
Priority Normal
State Can't Reproduce
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
MS Test seems to work fine

2017.06.09 08:47:53.025 ERROR Run: 7a6c1d55-972e-4574-939e-64c136d21a57 - Faulted
2017.06.09 08:47:53.025 ERROR System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> JetBrains.ReSharper.UnitTestFramework.DotNetCore.Exceptions.ProcessExitedUnexpectedlyException: dotnet exited unexpectedly with the code (-1)
Output stream:
Error stream: dotnet-test Error: 0 : System.InvalidOperationException: C:\TFS\TestProj\Logger\test\LoggerTest\src\LoggerTest\project.json does not exist.
 at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
 at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
 at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)
--- End ---
--- End ---
 at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.RunTestsStage.<>c__DisplayClassc.<StartSingleRun>b__8()
--- > ---
> JetBrains.ReSharper.UnitTestFramework.DotNetCore.Exceptions.ProcessExitedUnexpectedlyException: dotnet exited unexpectedly with the code (-1)
Output stream:
Error stream: dotnet-test Error: 0 : System.InvalidOperationException: C:\TFS\TestProj\Logger\test\LoggerTest\src\LoggerTest\project.json does not exist.
 at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
 at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
 at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)
--- End ---
--- > ---
<—

RSRP-447792: Select text to paste dialog improvements

$
0
0
Reporter Peder Holt (peder) Peder Holt (peder)
Created Sep 1, 2015 12:06:21 PM
Updated Oct 5, 2018 4:30:24 PM
Resolved Sep 8, 2018 6:42:28 PM
Subsystem Smart copy-paste
Assignee Alexander Petrovsky (apetrov2)
Priority Normal
State Fixed
Type Usability Problem
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
When you bring up the Recent Clipboard items, the first item in the list is highlighted.
This is seldom what you want to paste. You can use CTRL+V for this. It would be better to instead make the second item the default item.
This is what Visual Assist does, and it reduces the number of clicks to complete a paste.

RSRP-470739: Unit test runner fails "ProcessExitedUnexpectedlyException" with .NET Core 2.1 and xunit

$
0
0
Reporter Matthew Lymer (matthew.lymer) Matthew Lymer (matthew.lymer)
Created Jul 24, 2018 6:43:53 PM
Updated Oct 5, 2018 4:30:40 PM
Resolved Oct 5, 2018 4:30:40 PM
Subsystem Unit Testing
Assignee Eugene Strizhok (Eugene.Strizhok)
Priority Normal
State Can't Reproduce
Type Bug
Fix version No Fix versions
Affected versions 2018.1.3 RTM
Fixed In Version ReSharper Undefined
VsVersion VS 2017 RTM

When I do a full rebuild of my application, I can run the unit test project successfully. However, if I make any code change to the code under test, either tests will disappear, or they will show up as inconclusive.

The tests themselves are fairly simple, no async or anything like that.

I am unable to determine what the actual error is as it looks like ReSharper is supressing the output from the invocation of dotnet.

Specifications:

Windows 10 Pro
Visual Studio Community 2017 15.7.1
ReSharper Ultimate 2018.1.3
.NET Core SDK 2.1.300

Project:

<PropertyGroup>
  <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
  <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
  <PackageReference Include="Moq" Version="4.8.2" />
  <PackageReference Include="xunit" Version="2.3.1" />
  <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
  <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta4-build3742" />
</ItemGroup>

2018.07.24 11:15:47.219 WARN dotnet exited unexpectedly with the code (1)
Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Error stream: Timeout to connect or process request for DesignModeClient on port: 64498

2018.07.24 11:15:47.220 ERROR JetBrains.ReSharper.UnitTestFramework.DotNetCore.Exceptions.ProcessExitedUnexpectedlyException: dotnet exited unexpectedly with the code (1)
Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Error stream: Timeout to connect or process request for DesignModeClient on port: 64498

2018.07.24 11:15:47.221 WARN Element MyProject.Api.Tests.Endpoints.Availability.AvailabilityRequestValidatorTests was left pending after its run completion.

2018.07.24 11:15:47.221 WARN Element MyProject.Api.Tests.Endpoints.Availability.AvailabilityRequestValidatorTests.ShouldValidateInboundId was left pending after its run completion.

Viewing all 106942 articles
Browse latest View live


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