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

RSRP-292204: "Copy comments from base" does not work for class definitions

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Mar 29, 2012 5:15:40 PM
Updated Oct 17, 2018 12:03:58 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 6.1.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
A derived class may just differ slightly from its base. Copying the comments should be possible just as it is already for overridden methods.

RSRP-471880: Sequence contains no elements

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Oct 17, 2018 12:04:58 PM
Updated Oct 17, 2018 12:14:49 PM
Subsystem Platform - VS Integration
Assignee Alexander Ulitin (alexander.ulitin)
Priority Critical
State Submitted
Type Exception
Fix version No Fix versions
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 183 Hive _3f3919c0 — JetBrains ReSharper Ultimate 2018.3 EAP 4 D Build 183.0.20181016.190206-eap04d

JetBrains dotCover 2018.3 EAP 4 D Build 2018.3.20181017.30126-eap04d
JetBrains dotMemory 2018.3 EAP 4 D Build 2018.3.20181017.34600-eap04d
JetBrains dotTrace 2018.3 EAP 4 D Build 2018.3.20181017.30130-eap04d
JetBrains ReSharper 2018.3 EAP 4 D Build 2018.3.20181016.211029-eap04d
JetBrains ReSharper C++ 2018.3 EAP 4 D Build 2018.3.20181016.211112-eap04d
JetBrains TeamCity Add-in 2018.3 EAP 4 D Build 2018.3.20181016.211146-eap04d

Sequence contains no elements

— EXCEPTION #1/2 [InvalidOperationException]
Message = “Sequence contains no elements”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
Data.ReentrancyGuard.ActionName = “Get projects”
HResult = COR_E_INVALIDOPERATION=80131509
Source = System.Core
StackTraceString = “
 at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocumentsNuget.Thin.NugetServicesWrapper.<>c__DisplayClass8_0.<PublishServices>g__FindExtProject|28(FileSystemPath projectFilePath)
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocumentsNuget.Thin.NugetServicesWrapper.<>c__DisplayClass8_0.<PublishServices>b__24(Lifetime lifetime, ValueTuple`5 tuple)
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocumentsNuget.Thin.NugetServicesWrapper.<>c__DisplayClass8_0.<PublishServices>b__24(Lifetime lifetime, ValueTuple`5 tuple)
 at JetBrains.Platform.RdFramework.Tasks.InprocRpc`2.Start(TReq request, IScheduler responseScheduler)
 at JetBrains.PsiFeatures.VisualStudio.SinceVs10.NuGet.Common.NuGetApi.InstallPackage(String source, IProject project, String packageId, String version, Boolean ignoreDependencies, IInstallationStateController installationStateController)
 at JetBrains.PsiFeatures.VisualStudio.SinceVs10.NuGet.NuGetBrowser.Services.NuGetInstallationService.<>c__DisplayClass4_0.<InstallPackageForProject>b__0()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.Application.Threading.IShellLocksEx.<>c__DisplayClass1_0.<ExecuteOrQueueReadLock>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Sequence contains no elements”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.3 EAP 4 D Build 183.0.20181016.190206-eap04d”
Data.SubProducts.#0 = “JetBrains dotCover 2018.3 EAP 4 D Build 2018.3.20181017.30126-eap04d”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.3 EAP 4 D Build 2018.3.20181017.30130-eap04d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.3 EAP 4 D Build 2018.3.20181016.211112-eap04d”
Data.SubProducts.#3 = “JetBrains TeamCity Add-in 2018.3 EAP 4 D Build 2018.3.20181016.211146-eap04d”
Data.SubProducts.#4 = “JetBrains ReSharper 2018.3 EAP 4 D Build 2018.3.20181016.211029-eap04d”
Data.SubProducts.#5 = “JetBrains dotMemory 2018.3 EAP 4 D Build 2018.3.20181017.34600-eap04d”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/183::042c16fb58e8f38e98ee6fcd8ee72076cfcfa656


Platform\VisualStudio:
    git::refs/heads/183::869df3ab59be379dd922b49c62acf249d670e6c9

Data.VsVersion = 15.8.28010.2046
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.ExecutePendingActions()
 at JetBrains.Threading.JetDispatcher.Closure.Execute()
 at JetBrains.Util.Concurrency.WinJetDispatcher.ProcessQueue(Int32 nMinBucket)
 at JetBrains.Util.Concurrency.WinJetDispatcher.<>c__DisplayClass18_0.<BeginInvokeCore>b__0()
 at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
 at System.Windows.Threading.DispatcherOperation.InvokeImpl()
 at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
 at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Windows.Threading.DispatcherOperation.Invoke()
 at System.Windows.Threading.Dispatcher.ProcessQueue()
 at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
 at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

RSRP-293067: Join or separate attributes formatting never respected for context actions

$
0
0
Reporter Julien Lebosquain (mrjul) Julien Lebosquain (mrjul)
Created Apr 6, 2012 12:52:20 PM
Updated Oct 17, 2018 12:24:48 PM
Resolved Oct 17, 2018 12:24:48 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version Backlog
Affected versions 6.0, 6.1.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Context actions that add an attribute, such as 'Annotate with CanBeNull/NotNull attribute' or the quickfix 'Annotate with Localizable(false)' never respect the attribute formatting option. I have it set to "separate" but they are always outputted joined.

RSRP-38911: Annotate With Attribute: Should Obey Formatting Rules

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Apr 13, 2007 10:16:09 PM
Updated Oct 17, 2018 12:24:48 PM
Resolved Aug 24, 2018 2:34:40 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
If there's already one attr present, the new one should be added either into the same brackets or with a new pair of such, depending on the settings. Currently it's always "add to the same".

RSRP-297188: Suggest to convert [Optional] attribute to default value syntax

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 24, 2012 1:02:10 AM
Updated Oct 17, 2018 12:37:56 PM
Subsystem Context Actions
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
using System.Runtime.InteropServices;

class C
{
static void Foo([Optional][DefaultParameterValue(5)] int x) { }
}

Expected result after CA:

using System.Runtime.InteropServices;

class C
{
static void Foo(int x = 5) { }
}

RSRP-298099: Merge concatenated invocations of string.Format() into single string.Format()

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 28, 2012 8:04:00 AM
Updated Oct 17, 2018 12:43:56 PM
Subsystem Context Actions
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
class C
{
static void Main()
{
var x = string.Format("{0}{1}", 1, 2) + string.Format("{0}{1}", 3, 4);
}
}

Actual:

class C
{
static void Main()
{
var x = string.Format("{0}{1}", string.Format("{0}{1}", 1, 2), string.Format("{0}{1}", 3, 4));
}
}

Expected:

class C
{
static void Main()
{
var x = string.Format("{0}{1}{2}{3}", 1, 2, 3, 4);
}
}

RSRP-393237: Invert if vs Flip if

$
0
0
Reporter Charlie Hayes (cosmotic) Charlie Hayes (cosmotic)
Created Nov 15, 2013 9:49:49 PM
Updated Oct 17, 2018 12:46:37 PM
Subsystem Context Actions
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
I don't think 'invert if' accurately describes what the intention is doing.

Consider this if statement:
if(!obj || obj.prop){return "a";}else{return "b";}

Invert could mean flip the condition and the control flow(having the same effect):
if(obj && !obj.prop){return "b";}else{return "a";}
or it could mean flipping just the condition or just the control flow (having the opposite effect)
if(obj && !obj.prop){return "a";}else{return "b";}
if(!obj || obj.prop){return "b";}else{return "a";}

There is only one intention and it does the former.

Consider removing this intention and replacing it with "Invert condition", "Invert control flow", and "Invert condition and control flow"

RSRP-300372: Invert if statement + return

$
0
0
Reporter Alexander Shvedov (shvedov) Alexander Shvedov (shvedov)
Created May 8, 2012 4:59:31 AM
Updated Oct 17, 2018 12:48:17 PM
Resolved Oct 17, 2018 12:48:17 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
{
if (a) return;
}
Result:

{
if (!a) { };
}

RSRP-448134: Command "Invert 'if'" forget a "else return".

$
0
0
Reporter Pedro (pierre.lando) Pedro (pierre.lando)
Created Sep 21, 2015 8:04:33 PM
Updated Oct 17, 2018 12:48:17 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Open
Type Bug
Fix version Backlog
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
See this code:

for (var i = 0; i < 10; i++)
{
if (condition1)
{
if (condition2) // this one
{
return;
}

Console.WriteLine("i: " + i);
throw new Exception();
}
}

When I call "invert if" on the second if I got :

for (var i = 0; i < 10; i++)
{
if (condition1)
{
if (!condition2)
{
Console.WriteLine("i: " + i);
throw new Exception();
}
}
}

I should got :

for (var i = 0; i < 10; i++)
{
if (condition1)
{
if (!condition2)
{
Console.WriteLine("i: " + i);
throw new Exception();
}
return;
}
}

Also inverting this last one give a strange result. A return after a throw...

RSRP-301259: "Convert to method group" does not extend to code when it should.

$
0
0
Reporter Bryan Boettcher (Bryan.Boettcher) Bryan Boettcher (Bryan.Boettcher)
Created May 10, 2012 9:21:04 PM
Updated Oct 17, 2018 12:53:26 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
I have included a sample program to reproduce this.

RSRP-304194: Suggest bool.TrueString instead of true.ToString(CultureInfo.InvariantCulture)

$
0
0
Reporter Sakharov S (bushed) Sakharov S (bushed)
Created May 22, 2012 8:18:07 PM
Updated Oct 17, 2018 1:02:26 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 6.1.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
If resharper encounters sth like:

true.ToString() or false.ToString()

it suggests to make it culture invariant by setting explicit culture on ToString. Alternatively, for boolean values, those code blocks could be converted into:

bool.TrueString and bool.FalseString

Potentially this refactoring could be suggested as a replacement for strings "True" and "False"..

RSRP-304303: Suggest redundant AsEnumerable()

$
0
0
Reporter David Oliván Ubieto (David.Oliván.Ubieto) David Oliván Ubieto (David.Oliván.Ubieto)
Created May 23, 2012 12:58:43 AM
Updated Oct 17, 2018 1:03:58 PM
Resolved Oct 17, 2018 1:03:58 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Suggest redundant AsEnumerable() when assigning an array to an IEnumerable, like:
// Redundant
MyComboBox.ItemsSource = new [] { "Foo" }.AsEnumerable();
// Suggestion
MyComboBox.ItemsSource = new [] { "Foo" };

RSRP-430019: Add a refactoring to remove redundant AsEnumerable and AsQueryable

$
0
0
Reporter T (thymin) T (thymin)
Created Jan 7, 2015 9:29:48 PM
Updated Oct 17, 2018 1:03:58 PM
Subsystem Code Analysis - Linq Tools
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Sometimes, a previously meaningful call to AsEnumerable becomes redundant as the code evolves over time:

IEnumerable<int> seq = ...;
IEnumerable<int> seq2 = seq.AsEnumerable();

The refactoring should apply only if the source type is not IQueryable.

A similar refactoring should remove AsQueryable.

RSRP-307962: Change resources to using

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Jun 5, 2012 4:29:21 PM
Updated Oct 17, 2018 1:09:47 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 6.1.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
If resharper doesn't do this then this is a suggestion. Does resharper take and replace something like

sqlConnection.Connection.open()
... do stuff with sql connection
sqlConnection.Connection.close()

and suggest making it into using
(sqlConnection = new sqlConnection()) {
sqlConnection.connection.open()
.... do something with the sql co
}

RSRP-471881: Code style suggestion: nameof are not pretty in DebuggerDisplay expressions

$
0
0
Reporter Espen Røvik Larsen (espen.rovik.larsen) Espen Røvik Larsen (espen.rovik.larsen)
Created Oct 17, 2018 1:14:34 PM
Updated Oct 17, 2018 1:14:34 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

ReSharper suggests that I should be using nameof to reference member names in DebuggerDisplay.

I like nameof a lot and I use it whenever I see fit. The DebuggerDisplay is a case where nameof actually makes my code uglier I think. Up for discussion! :)


RSRP-309072: 'Convert to method group' is not suggested

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Jun 8, 2012 4:07:15 AM
Updated Oct 17, 2018 1:15:56 PM
Resolved Oct 17, 2018 1:15:56 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
using System;

static class C
{
static void Foo(this string x) { }

static void Main()
{
Action<string> a = x => x.Foo();
}
}

Expected result:

using System;

static class C
{
static void Foo(this string x) { }

static void Main()
{
Action<string> a = Foo;
}
}

RSRP-385005: Lambda not simplified when used with extension method

$
0
0
Reporter Dmitri Nesteruk (dnesteruk) Dmitri Nesteruk (dnesteruk)
Created Sep 2, 2013 2:07:23 PM
Updated Oct 17, 2018 1:15:56 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
ReSharper typically offers to turn Foo(x => x.Bar()) to Foo(Bar) but it seems like for extension methods it does not. Here is an example:

public static bool ContainsWildcardCharacter(this string s)
{
return s.Any(c => c.IsWildcardCharacter());
}

public static bool IsWildcardCharacter(this char c)
{
return c == '*' || c == '?';
}

RSRP-310063: c# context action to rewrite a function call using named parameters

$
0
0
Reporter Dan Meismer (Dan.Meismer) Dan Meismer (Dan.Meismer)
Created Jun 11, 2012 4:56:18 PM
Updated Oct 17, 2018 1:17:03 PM
Resolved Oct 17, 2018 1:17:03 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
suppose i have
x.DoSomething(id, messageid, DateTime.Now, "don't forget!", null);

it's more clear if it is rewritten as:

x.DoSomething(
userId: id,
messageId: messageId,
sendAfter: DateTime.Now,
subject: "dont' forget to wake up",
sendFrom: null);

RSRP-206613: Convert to C# named parameters

$
0
0
Reporter sean kearon (seankearon) sean kearon (seankearon)
Created Jan 22, 2011 2:02:27 PM
Updated Oct 17, 2018 1:17:03 PM
Resolved Oct 16, 2018 4:21:19 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions 5.1.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
Add a context action to convert a method call to use named parameters.


Given a method:
void AddPerson(string name, int age){...}

The context action would convert the call
AddPerson("Fred", 21);

Into this:
AddPerson(name: "Fred", age: 21);

RSRP-310629: [VB] 'Remove redundant qualifier' should escape contextual keywords or add parentheses/whitespace to keep correct parsing

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Jun 13, 2012 3:11:43 AM
Updated Oct 17, 2018 1:18: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
Module M
Sub Main()
Dim x = From y In ""
M.Take() ' Remove redundant M.
End Sub

Sub Take()
End Sub
End Module

Actual:

Module M
Sub Main()
Dim x = From y In ""
Take() ' error BC30201: Expression expected.
End Sub

Sub Take()
End Sub
End Module

Expected:

Module M
Sub Main()
Dim x = From y In ""
[Take]() ' OK
End Sub

Sub Take()
End Sub
End Module

or

Module M
Sub Main()
Dim x = (From y In "")
Take() ' OK
End Sub

Sub Take()
End Sub
End Module

Module M
Sub Main()
Dim x = From y In ""

Take() ' OK
End Sub

Sub Take()
End Sub
End Module
Viewing all 106942 articles
Browse latest View live


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