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

RSRP-469682: Simple rename of parameter in method takes much time, because whole solution being scanned

$
0
0
Reporter Георгий Аксенов (aksenovgera1) Георгий Аксенов (aksenovgera1)
Created Jun 27, 2017 12:41:19 PM
Updated Oct 10, 2018 2:33:28 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Performance Problem
Fix version Backlog
Affected versions 2018.1.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Can you please place checkbox or something in dialog window of parameter rename refactoring to choose, should refactoring scan whole project or just rename parameter as local variable.
In that case user have to be sure that nowhere in project this method invoked with named parameters. But i'd rather use Alt+j combination than Shift+F6, because I don't want to wait 5 secs when I'm sure there is no invokes with named parameters for that method.

RSRP-471797: C# files identified as JavaScript by CleanupCode.exe

$
0
0
Reporter Florian (f-tischler) Florian (f-tischler)
Created Oct 10, 2018 2:08:22 PM
Updated Oct 10, 2018 2:35:02 PM
Resolved Oct 10, 2018 2:18:03 PM
Subsystem ReSharper Automation Tools (Command Line)
Assignee Slava Trenogin (derigel)
Priority Normal
State Answered
Type Bug
Fix version No Fix versions
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains Cleanup Code 2018.2.3
Running in 64-bit mode, .NET runtime 4.0.30319.42000 under Microsoft Windows NT 6.2.9200.0
Cleanup profile is not specified. Predefined 'Full cleanup' profile will be used to run cleanup
<FireflyAPI>\FireflyAPI.csproj
<FireflyAPI>\Calculation\CalibrationLight.cs
<FireflyAPI>\Calculation\CalibrationLight.cs - JavaScript decoration
<FireflyAPI>\Calculation\CalibrationLight.cs - Reformat JavaScript
<FireflyAPI>\Calculation\CalibrationLight.cs - Applying code style
<FireflyAPI>\Calculation\CalibrationLight.cs - Processing redundancies
<FireflyAPI>\Calculation\CalibrationLight.cs - Formatting
<FireflyAPI>\Calculation\CalibrationLight.cs - Indenting
<FireflyAPI>\Calculation\CalibrationLight.cs - Formatting
<FireflyAPI>\Calculation\CalibrationLight.cs - Making blank lines
<FireflyAPI>\Calculation\CalibrationLight.cs - Aligning in columns
<FireflyAPI>\Calculation\CalibrationLight.cs - Indenting
<FireflyAPI>\Calculation\CalibrationLight.cs - Formatting
<FireflyAPI>\Calculation\CalibrationLight.cs - Making blank lines
<FireflyAPI>\Calculation\CalibrationLight.cs - Aligning in columns
...
Output truncated

RSRP-367650: Allow replacing type declarations with others for resolved types

$
0
0
Reporter Igal Tabachnik (hmemcpy) Igal Tabachnik (hmemcpy)
Created Jun 4, 2013 4:35:59 PM
Updated Oct 10, 2018 2:41:19 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
Essentially, I would like something like 'Replace all/local' quickfix, but for types and variables that are resolved.
Often times I'd like to do this:

public SomethingImpl GetSomething()
{
var impl = new SomethingImpl();

...

return impl;
}

If I want to replace SomethingImpl with another type, I have to do it manually. I'd like to Alt-Enter either the return type of the method, or the new... and it would mark both declarations as editable, so I could type another name.

RSRP-347218: parent.PrevSibling != null

$
0
0
Reporter ReSharper anonymous (resharper) ReSharper anonymous (resharper)
Created Mar 21, 2013 8:28:05 PM
Updated Oct 10, 2018 2:42:35 PM
Resolved Oct 10, 2018 2:42:35 PM
Subsystem No Subsystem
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharper 8 EAP Version=8.0.0.19479, Built=2013-03-06T12:47:04, Configuration=“CLR4 Csharp PublicMode VS1100”
parent.PrevSibling != null

— EXCEPTION #1/2 [AssertionException]
Message = “parent.PrevSibling != null”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.ReSharper.Psi
StackTraceString = “
 at JetBrains.ReSharper.Psi.Util.TreeRangeUtil.PrepareAnchorForAddingBefore(ITreeNode parent, ITreeRange range) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Util\TreeRangeUtil.cs:line 22
 at JetBrains.ReSharper.Psi.Util.TreeRangeUtil.PrepareAnchorForAddingBefore(ITreeNode parent, ITreeRange range) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Util\TreeRangeUtil.cs:line 22
 at JetBrains.ReSharper.Psi.Util.RegionStructureExtensions.AddToStructure[T](IRegionStructure codeStructure, ITreeNode parent, Predicate`1 shouldAddBefore, Func`2 addAfter, Func`2 addBefore) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Util\RegionStructure.cs:line 132
 at JetBrains.ReSharper.Psi.CSharp.Impl.UsingUtil.AddImportTo(ICSharpTypeAndNamespaceHolderDeclaration scope, IUsingDirective directive) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\CSharp\src\Impl\UsingUtil.cs:line 199
 at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.CSharpFile.AddImport(IUsingDirective param) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\CSharp\src\Impl\Tree\CSharpFile.cs:line 144
 at JetBrains.ReSharper.Refactorings.CSharp.Move.Common.CSharpMoveUtil.AddUsings(ICSharpFile newFile, IList`1 importedNamespaces, Boolean addImportsToDeepestScope) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\CSharp\src\Move\Common\CSharpMoveUtil.cs:line 135
 at JetBrains.ReSharper.Refactorings.CSharp.Move.Common.CSharpMoveUtil.CopyFileAndFixNamespaces(ICSharpFile newFile, ICSharpFile oldFile, String expectedNamespaceName, IList`1 importedNamespaces) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\CSharp\src\Move\Common\CSharpMoveUtil.cs:line 48
 at JetBrains.ReSharper.Refactorings.CSharp.Move.AdjustNamespaces.CSharpAdjustNamespaceHelper.FixFile(IFile file, String expectedNamespaceName, ResolveImagesRepository repository, List`1 importedNamespaces) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\CSharp\src\Move\AdjustNamespaces\CSharpAdjustNamespaceHelper.cs:line 33
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.FixFile(IFile file, PsiLanguageType language, ProjectFileWrapper wrapper) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 148
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.<>c__DisplayClass18.<FixFiles>b__10(IFile file, PsiLanguageType language) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 74
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.AdjustNamespacesWorkflow.MakeActionWithPsi(ProjectFileWrapper wrapper, Action`2 action) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\AdjustNamespacesWorkflow.cs:line 206
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.<FixFiles>b__f(ProjectFileWrapper x, IProgressIndicator subSubPi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 74
 at JetBrains.Application.Progress.ProgressIndicatorExtensions.<>c__DisplayClassc`1.<>c__DisplayClasse.<ForEachWithProgress>b__b(IProgressIndicator subPi) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\ProgressIndicatorExtensions.cs:line 157
 at JetBrains.Application.Progress.ProgressIndicatorExtensions.Advance(IProgressIndicator progressParent, Double fUnitsInParentIndicator, Action`1 funcAdvanceSubprogress) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\ProgressIndicatorExtensions.cs:line 38
 at JetBrains.Application.Progress.ProgressIndicatorExtensions.<>c__DisplayClassc`1.<ForEachWithProgress>b__a(IProgressIndicator startedProgress, T t) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\ProgressIndicatorExtensions.cs:line 157
 at JetBrains.Application.Progress.ProgressIndicatorExtensions.ForEachWithProgressImpl[T](ICollection`1 collection, IProgressIndicator progress, String taskname, Boolean throwOnCancel, Action`2 handler) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\ProgressIndicatorExtensions.cs:line 114
 at JetBrains.Application.Progress.ProgressIndicatorExtensions.ForEachWithProgress[T](ICollection`1 collection, IProgressIndicator progress, String taskname, Action`2 handler) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\ProgressIndicatorExtensions.cs:line 152
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.FixFiles(IProgressIndicator pi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 73
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.<>c__DisplayClass5.<Execute>b__4() in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 41
 at JetBrains.ReSharper.Psi.Transactions.PsiTransactions.Execute(String commandName, Action handler) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Transactions\PsiTransactions.cs:line 263


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “parent.PrevSibling != null”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.LastExtension = cs
Data.PlatformSccRevision = CompiledWithoutBuildServer
Data.ProductSccRevision = CompiledWithoutBuildServer
Data.VsVersion = 11.0.51106.1
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.ReSharper.Psi.Transactions.PsiTransactions.Execute(String commandName, Action handler) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Transactions\PsiTransactions.cs:line 274
 at JetBrains.ReSharper.Psi.Transactions.PsiTransactions.Execute(String commandName, Action handler) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Psi\_Core\src\Transactions\PsiTransactions.cs:line 274
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.Impl.AdjustNamespaceRunner.Execute(IProgressIndicator pi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\Impl\AdjustNamespaceRunner.cs:line 42
 at JetBrains.ReSharper.Refactorings.Move.AdjustNamespaces.AdjustNamespacesWorkflow.PreExecute(IProgressIndicator pi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Move\AdjustNamespaces\AdjustNamespacesWorkflow.cs:line 93
 at JetBrains.ReSharper.Refactorings.Workflow.DrivenRefactoringConflictSearcher.SearchConflicts(IProgressIndicator pi, Boolean canPerformRefactoring) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Workflow\DrivenRefactoringConflictSearcher.cs:line 32
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowExecuter.<>c__DisplayClass14.<InitPage>b__b(IProgressIndicator pi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowExecuter.cs:line 308
 at JetBrains.ReSharper.Refactorings.WorkflowNew.FunctionWrapper`1.ExecuteAction(IProgressIndicator pi) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\FunctionWrapper.cs:line 34
 at JetBrains.UI.Application.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\UI\src\Progress\UITaskExecutorRun.cs:line 319
 at JetBrains.UI.Application.Progress.UITaskExecutorRun.<>c__DisplayClass3.<RunCore>b__0(Lifetime lifetime) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\UI\src\Progress\UITaskExecutorRun.cs:line 143
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 F) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\DataFlow\Lifetime\Lifetimes.cs:line 42
 at JetBrains.UI.Application.Progress.UITaskExecutorRun.RunCore(TaskThreadAffinity taskThreadAffinity, Action`1 FTask, Func`3 FAttachUi, ProgressIndicator progressIndicator, IWin32Window parentWindow, IThreading threading, Boolean enforceModalityState) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\UI\src\Progress\UITaskExecutorRun.cs:line 85
 at JetBrains.UI.Application.Progress.UITaskExecutorRun.Run(TaskThreadAffinity taskThreadAffinity, Action`1 task, Func`3 FAttachUi, ProgressIndicator indicator, IWin32Window parentWindow, IThreading threading, Boolean enforceModalityState) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\UI\src\Progress\UITaskExecutorRun.cs:line 46
 at JetBrains.ReSharper.Refactorings.Workflow.RefactoringsTaskExecutor.JetBrains.Application.Progress.ITaskExecutor.ExecuteTask(String name, TaskCancelable cancelable, Action`1 task) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\Workflow\RefactoringsTaskExecutor.cs:line 54
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowExecuter.RunWithProgress[TResult](Func`2 action, String taskName, TResult& result) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowExecuter.cs:line 385
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowExecuter.InitPage(IRefactoringPage page) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowExecuter.cs:line 308
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowExecuter.NextPage(IRefactoringPage currentPage) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowExecuter.cs:line 271
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowExecuter.MoveToNextPage() in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowExecuter.cs:line 170
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowHostWithWizardForm.<NextClick>b__9() in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowHostWithWizardForm.cs:line 166
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 267
 at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action) in c:\BuildAgent\work\1d5606e7e667bf54\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 305
 at JetBrains.ReSharper.Refactorings.WorkflowNew.WorkflowHostWithWizardForm.NextClick(Object sender, EventArgs e) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowNew\WorkflowHostWithWizardForm.cs:line 167
 at JetBrains.ReSharper.Refactorings.WorkflowW.RefactoringWizardForm.myContinueButton_Click(Object sender, EventArgs e) in c:\BuildAgent\work\1d5606e7e667bf54\Psi.Features\src\Refactorings\_Core\src\WorkflowW\RefactoringWizardForm.cs:line 679
 at System.Windows.Forms.Control.OnClick(EventArgs e)
 at System.Windows.Forms.Button.OnClick(EventArgs e)
 at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
 at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
 at System.Windows.Forms.Control.WndProc(Message& m)
 at System.Windows.Forms.ButtonBase.WndProc(Message& m)
 at System.Windows.Forms.Button.WndProc(Message& m)
 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
 at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

RSRP-367746: ReSharper breaks code when method calls are "dynamic"

$
0
0
Reporter Alexander Prokhorov (Athari) Alexander Prokhorov (Athari)
Created Jun 4, 2013 7:32:32 PM
Updated Oct 10, 2018 2:44:53 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 7.1.3, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Example code:

namespace DynamicCallRefactoring {
class Program {
static void Main () {
new Program().Proc();
}
void Proc () {
this.Call((dynamic)1);
}
void Call (int a) {
Console.WriteLine("int");
}
static void Call (double a) {
Console.WriteLine("double");
}
}
}

This program compiles and works correctly. ReSharper suggests two fixes:

  1. Method 'Call' can be made static. It is incorrect, because this.Call() code suggests the call is not static. If a quick fix "Make 'Call' static" is applied, RuntimeBinderException is thrown with a message "Member 'DynamicCallRefactoring.Program.Call(int)' cannot be accessed with an instance reference; qualify it with a type name instead".

  2. Parameter 'a' is never used. It is incorrect, because arguments are used for choosing the method. If a quick fix "Remove parameter (and update usages)" is applied, the code stops woring correctly. It is broken even more if further quick fixes "Remove unused method" are applied.

RSRP-367790: inspection for "convert local to const"& context actions for type identifier should be joined.

$
0
0
Reporter Dan Meismer (Dan.Meismer) Dan Meismer (Dan.Meismer)
Created Jun 4, 2013 9:35:36 PM
Updated Oct 10, 2018 2:47:26 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 8.0 EAP, 7.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
For a local variable, the quick-actions menu offers different choices depending on whether I invoke it from the type identifier or the variable name:
Pressing Alt+Enter overtop 'var' provides a context menu with the option: "Specify type explicitly"
Pressing Alt+Enter overtop the variable name provides a context menu with the options: "To Const" and "Split declaration & assignment".

This breaks my concentration when I'm refactoring because I have to stop thinking about my code and instead think about where resharper wants me to put the cursor so that it will let me convert a variable to const. It would be better if these 3 suggestions were joined into a single context menu invoked from either location, having the suggestions in this order:
"To Const"
"Specify type explicitly"
"Split declaration & assignment"


public static void Foo()
{
//test with 'var' and with 's'
var s = "i'm a string!";
Console.WriteLine(s + DateTime.Now);
}

RSRP-375337: QF 'Remove parameter (and update usages)' produces red code

$
0
0
Reporter Alexander Nesterenko (alexn) Alexander Nesterenko (alexn)
Created Jul 2, 2013 6:31:47 PM
Updated Oct 10, 2018 2:53:04 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 8.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have following code
public static class Test
{
public static void Test1()
{
Test2("Foo", "Bar", "Bazz");
}

private static void Test2(string a, string b, string c)
{
System.Console.Write("a:{0} c:{1}", a, c);
}
}

I want to delete argument "Bar", and i did it
public static class Test
{
public static void Test1()
{
Test2("Foo", "Bazz");
}

private static void Test2(string a, string b, string c)
{
System.Console.Write("a:{0} c:{1}", a, c);
}
}

Now i have error "method 'Test2' has 3 parameters but invocated with 2 arguments" and following quick fix "Create overload for 'Test2'".

But i want to remove parameter 'b' from the method 'Test2'. Than, i go to the method 'Test2' and see warning "Parameter 'b' is never used". Cool, i call QF 'Remove parameter (and update usages)' and get following red code.
public static class Test
{
public static void Test1()
{
Test2("Foo");
}

private static void Test2(string a, string c)
{
System.Console.Write("a:{0} c:{1}", a, c);
}
}

RSRP-378754: VB.NET - invalid "yield break"

$
0
0
Reporter Mauricio Scheffer (mausch) Mauricio Scheffer (mausch)
Created Jul 15, 2013 7:37:00 PM
Updated Oct 10, 2018 2:55:17 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
Given this function:

    Iterator Function Foo() As IEnumerable(Of String)
If 1 = 2 Then
Yield "a"
End If
End Function

Applying the "invert if" refactor gives:

    Iterator Function Foo() As IEnumerable(Of String)
If 1 <> 2 Then Yield Break

Yield "a"
End Function

Which is invalid, since VB.NET doesn't have a "yield break".
The expected result is:

    Iterator Function Foo() As IEnumerable(Of String)
If 1 <> 2 Then Return

Yield "a"
End Function

RSRP-379313: Comment unused accessor doesn't add read/writeonly

$
0
0
Reporter mark leavesley (markleavesley) mark leavesley (markleavesley)
Created Jul 17, 2013 5:54:35 PM
Updated Oct 10, 2018 2:58:55 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 8.0 EAP, 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS10 (2010)

RSRP-471798: Introduce Parameter in local function yields different results when selecting a string or placing caret in string

$
0
0
Reporter Maarten Balliauw (Maarten.Balliauw) Maarten Balliauw (Maarten.Balliauw)
Created Oct 10, 2018 3:02:21 PM
Updated Oct 10, 2018 3:04:07 PM
Subsystem Refactorings
Assignee Andrey Dyatlov (Andrey.Dyatlov)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
See attached video

RSRP-380763: "Move to other file to match type name": copy the XML "FileComment" at the top of the file

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jul 26, 2013 3:35:47 PM
Updated Oct 10, 2018 3:10:41 PM
Resolved Oct 10, 2018 3:10:41 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Duplicate
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
New Feature: please can you change the "Move to other file to match type name" feature so that it automatically copies the XML "FileComment" at the top of the file, especially if it adheres to the FxCop convention. Thanks.

RSRP-281782: File Header text should be included always

$
0
0
Reporter Philipp Dolder (philippdolder) Philipp Dolder (philippdolder)
Created Nov 18, 2011 1:43:10 PM
Updated Oct 10, 2018 3:10:41 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Open
Type Usability Problem
Fix version 2018.3
Affected versions 6.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
The file header setting should also be respected when refactorings that create new files are performed (e.g. Extract Interface)

RSRP-175910: Introduce variable is unintuitive

$
0
0
Reporter Alexander Sieb (arsieb) Alexander Sieb (arsieb)
Created Apr 6, 2010 9:15:48 PM
Updated Oct 10, 2018 3:14:27 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Usability Problem
Fix version Backlog
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
VS2010RC, R# 5.0.1654.51, C#
Introduce variable with the caret placed before 1 transforms:
Id = -1;
to
int i = Id = -1;
which doesn't make sense to me.

I would expect the refactoring to act as if -1 is selected:
Id = -1;
to
int id = -1;
Id = id;
if the caret is placed on or before the -1 (generally for any constant).
I believe 'no selection' shouldn't mean 'refactor the whole statement', but instead 'refactor what is
under or after the caret'.

RSRP-471800: Angular (v6): error when using Safe Navigation Operator

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

RSRP-381262: Incorrect Hint and Quickfix for "Convert to 'return' statement"

$
0
0
Reporter bitbonk (bitbonk) bitbonk (bitbonk)
Created Aug 2, 2013 12:36:44 PM
Updated Oct 10, 2018 3:28:36 PM
Resolved Oct 10, 2018 3:28:36 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 7.1.3
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
See attached screenshot.

RSRP-382923: Add Parameter Refactoring with named Params

$
0
0
Reporter Hadi Hariri (hadihariri) Hadi Hariri (hadihariri)
Created Aug 14, 2013 10:45:37 AM
Updated Oct 10, 2018 3:30:40 PM
Resolved Oct 10, 2018 3:30:40 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Duplicate
Type Feature
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have this:

var foo = new Foo(42);

I change that to

var foo = new Foo(42, "bar");

Resharper gives me a quick fix "Add parameter at Foo(int, string bar)"

if I do this:

var foo = new Foo(42, bar: "bar");

no Quick Fix.

RSRP-329850: Suggest user to modify method signature when using named arguments

$
0
0
Reporter Kirill Orlov (diverofdark) Kirill Orlov (diverofdark)
Created Sep 10, 2012 9:29:59 PM
Updated Oct 10, 2018 3:30:48 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
Let's see at following code:
        private void doSomething(int a=0,int b=1, int c=2);

doSomething(b:9, {caret}d:10)

There should be an quickFix which adds new parameter for existing method.

RSRP-471799: Angular (v6): error in event handler when calling function named delete()

$
0
0
Reporter Espen Røvik Larsen (espen.rovik.larsen) Espen Røvik Larsen (espen.rovik.larsen)
Created Oct 10, 2018 3:21:25 PM
Updated Oct 10, 2018 3:31:19 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions

The function has to be named delete() to provoke the error message. The message I get is "=> expected".

Happens in html - see image.

ReSharper v2018.2.3

RSRP-383321: Incorrect suggestion to add 'await' to code inside finally block

$
0
0
Reporter Nathan Alden, Sr. (VisualCSharp) Nathan Alden, Sr. (VisualCSharp)
Created Aug 20, 2013 2:48:41 AM
Updated Oct 10, 2018 3:43:17 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
public static async void OtherAsync()
{
    unsafe
    {
        MethodAsync();
    }
    lock (new object())
    {
        MethodAsync();
    }
    try
    {
        await MethodAsync();
    }
    catch
    {
        MethodAsync();
    }
    finally
    {
        MethodAsync();
    }
}

In the above code, ReSharper incorrectly suggests to add 'await' to the MethodAsync() call within the unsafe, lock, catch and finally blocks. Code within these blocks cannot be awaited.

"Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call."

Although it is correct to say that the code will run asynchronously, it is incorrect to suggest adding 'await' in these contexts. Additionally, the 'Await expression' tool should not be available in these contexts.

RSRP-383546: "Loop can be converted to LINQ expression" invalid for dynamic type

$
0
0
Reporter Thilo Wawrzik (profix898) Thilo Wawrzik (profix898)
Created Aug 21, 2013 11:21:28 PM
Updated Oct 10, 2018 4:07:57 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharper 8 suggests "Loop can be converted to LINQ expression" on the following foreach loop:

var tree = 123; // Usually a COM object (modified for demonstration)

dynamic node = tree;
var items = new[] { "abc", "def", "ghi" };
foreach (string item in items)
node = GetChildNode(node, item);

where tree is a COM object in my case (but can be replaced with var tree = 123; or sth. for demonstration purposes). However, following R#'s suggestion leads to the following code which is invalid with dynamic type involved here.

dynamic node = tree;
var items = new[] { "abc", "def", "ghi" };
node = Enumerable.Aggregate(items, node, (current, item) => GetChildNode(current, item));

R# 8's inspection actually notes "An anonymous function or method group cannot be used as a constituent value of a dynamically bound operation". But still R# is doing the conversion for me ;)

P.S. I'd guess that there are other inspections (esp. for LINQ) which are invalid whenever a dynamic object is involved. Haven't checked though ...
Viewing all 106942 articles
Browse latest View live


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