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

RSRP-416476: "Move declaration closer to usage" quickfix is not applied

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Jun 18, 2014 6:35:29 PM
Updated Oct 11, 2018 12:41:23 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 8.2.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
1. Use the following code:
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

namespace Library.Programming.Ui.Wpf.Controls
{
public class Class1
{
public void Method()
{
int counterOne = 0;

int counterTwo = 0;

counterOne++;

Console.WriteLine(counterOne);

counterTwo++;

Console.WriteLine(counterTwo);
}
}
}

Expected Result: the declaration “int counterTwo = 0;” should be moved closer to its first usage which is “counterTwo++;” (reason: minimize scope of variables)

RSRP-416779: Remove redundant else shouldn't remove comment block inside

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Jun 24, 2014 5:29:24 PM
Updated Oct 11, 2018 12:43:38 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I like the ability to remove redundant else clauses, but I think it should only remove those that don't have comments inside them (like else { /*some comment*/ }). It is common to have some commented out code in an else clause that needs to stay there.

RSRP-427052: Remove redundant else also removes comments

$
0
0
Reporter sebingel (sebingel) sebingel (sebingel)
Created Oct 30, 2014 1:56:19 PM
Updated Oct 11, 2018 12:46:20 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
If you have code like this:
bool Foo(bool bar)
{
if (bar)
return true;
else
// lorem ipsum
return false;
}

ReSharper will correctly suggest to remove the redundant else but will also remove the comment:
bool Foo(bool bar)
{
if (bar)
return true;
return false;
}

But if you write it like this:
        bool Foo(bool bar)
{
if (bar)
{
return true;
}
else
{
// lorem ipsum
return false;
}
}

Resharper won't remove the comment:
        bool Foo(bool bar)
{
if (bar)
{
return true;
}
// lorem ipsum
return false;
}

The comment shouldn't be removed as it could contain valuable informations wether or not i put the brackets in there or not.

RSRP-418344: Wrong result of "If to LINQ expression" quickfix

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jul 14, 2014 5:15:49 PM
Updated Oct 11, 2018 1:07:30 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Converted the following:
For Each tag In currentTags 
Dim li As ListItem = TagsDualList.Items.FindByValue(CStr(tag.Id))
If Li IsNot Nothing Then Li.Selected = True
Next
Into
For Each li As ListItem In From tag In currentTags Select li1 = TagsDualList.Items.FindByValue(CStr(tag.Id)) Where li IsNot Nothing 
li.Selected = True
Next
Which should have been
For Each li As ListItem In From tag In currentTags Select li1 = TagsDualList.Items.FindByValue(CStr(tag.Id)) Where li1 IsNot Nothing 
li.Selected = True
Next

RSRP-419174: Suggestion for IDictionary item look-up

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jul 23, 2014 5:53:10 PM
Updated Oct 11, 2018 1:10:35 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
When performing a look-up of a value in an IDictionary<TKey, TValue> you can either use dictionary[key] or dictionary.TryGetValue(key, out value). I find myself switching between these variations quite often and would appreciate a ReSharper refactoring to move from one to the other.

RSRP-420064: Incorrect suggestion from Resharper

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Aug 1, 2014 12:37:49 PM
Updated Oct 11, 2018 1:14:04 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Critical
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
I consider this a serious bug. For this code:
if (id.GetType() == typeof(int)) { 
return (int)id;
}
R# is telling me to replace it with this code
if (id is int) { 
return (int)id;
}
which is not correct. I can of course turn this setting off, but in reality you should be telling developers to do it the OTHER way. The reason why is because the resulting IL code for both operations is different, and the code in the first style is actually 2x faster at runtime than the code in the second style (which is of course why we do it that way). You would think it would be the other way around, and if you are in DEBUG mode you would be correct. However once the optimizer is turned on in release mode, the more verbose method is actually almost 2x faster than the more concise method. To verify this is still indeed the case I just wrote a simple profile program and ran it in debug mode and release mode:

Debug Mode:
Verbose way: 7.9779565 seconds
Concise way: 3.0920403 seconds

Release Mode:
Verbose way: 0.3569981 seconds
Concise way: 0.6160091 seconds

Code is attached for your enjoyment :)

RSRP-420142: "Reduce nesting" suggestion is not always good

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Aug 4, 2014 2:43:36 PM
Updated Oct 11, 2018 1:16:44 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Imagine I have smth like:
if (sameDevice == null) 
{
sameDevice = new DeviceInfo(userAgent, devicePlatform);
devices.Add(sameDevice);
}
return sameDevice;
Resharper will underline "if" statement to reduce nesting. But I find this particular example as a tipicall pattern where nesting is ok. Just for your considiration. (hope you understood what I ment :))

RSRP-420443: keyboard accelerators for constructor methods should be C, not T

$
0
0
Reporter Joshua McKinney (joshka) Joshua McKinney (joshka)
Created Aug 7, 2014 10:04:40 AM
Updated Oct 11, 2018 1:18:06 PM
Resolved Oct 11, 2018 1:18:06 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Usability Problem
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Given the following code, the suggestions on Bar are: "This is a constructor" and "This is a void method", The keyboard accelerators are T and i. They would make more sense to be C and v (or m)

    class Foo
{
public Bar()
{
}
}

RSRP-421065: Bulk "Redundant field initializer" does not affect all items

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Aug 15, 2014 12:00:43 PM
Updated Oct 11, 2018 1:25:42 PM
Resolved Oct 11, 2018 1:25:42 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 8.2.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
        public class Class1
{
public Class1(string name,
int a)
{
this.name = name;
A = a;
}

public int A = 0;

private string name = null;
}

Run bulk quickfix for the file - "public int A = 0;" is still there.

RSRP-423742: Class used instead of parameter if both have the same name (lambda cleanup)

$
0
0
Reporter Mike McBain (mike.s.mcbain) Mike McBain (mike.s.mcbain)
Created Sep 15, 2014 2:12:51 PM
Updated Oct 11, 2018 1:31:26 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.1, 8.2.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
namespace Foo
{
public class Test
{
void Method()
{
var someList = new List<bool>();
var truth = someList.Where(bar => bar == true);
}
}

public class bar
{
}
}

In the above code, using resharper's 'Comparison with true is redundant' cleanup, instead of transforming the statement to .Where(bar => bar) it will instead transform to .Where(bar => Foo.bar), incorrectly using a class that happens to share the same name as the lambda parameter.

The list could comprise any type of object, I just used bool for brevity in this example. The actual parameter name/class name could be anything as well (so long as they exactly match). Other cleanups may suffer the same issue, but I haven't noticed any.

This has only been noted in our project because an external reference we rely on seems to have a public class for every lower case letter of the alphabet. So our where clauses are becoming e.g. .Where(p => global::p.Enabled) instead of .Where(p => p.Enabled).

RSRP-425601: VB: "Initialize field from constructor parameter" quick-fix leads to build error

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Oct 10, 2014 4:57:16 PM
Updated Oct 11, 2018 1:34:05 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
1. Try the following code:
Module Module1

Sub Main()
Dim issue As New ReSharperIssue
Debug.Print(issue.Test)
End Sub

Public Class ReSharperIssue

Public ReadOnly Test As String

Sub New()
AssignOnNew(Test)
End Sub

Sub AssignOnNew(ByRef val As String)
val = "Hello Wolrd!"
End Sub
End Class

End Module
2. Apply "Initialize field from constructor parameter" quick-fix on Test declaration

Result: result code leads to "Argument not specified for parameter 'test' of 'Public Sub New(test As String)' error:
Module Module1

Sub Main()
Dim issue As New ReSharperIssue
Debug.Print(issue.Test)
End Sub

Public Class ReSharperIssue

Public ReadOnly Test As String

Sub New(ByVal test As String)
Me.Test = Test
AssignOnNew(Test)
End Sub

Sub AssignOnNew(ByRef val As String)
val = "Hello Wolrd!"
End Sub
End Class

End Module

RSRP-425692: Bulk Actions should allow review before applying them

$
0
0
Reporter T (thymin) T (thymin)
Created Oct 13, 2014 9:45:55 PM
Updated Oct 11, 2018 1:35:48 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
R# 9 will have better bulk action support (http://blog.jetbrains.com/dotnet/2014/10/13/introducing-the-resharper-9-early-access-program/). It will allow the programmer to fix a specific issue solution-wide.

It would be important to be able to preview the changes, though, and to disable a few of them. Often, a specific issue such as a redundant this qualifier has a few valid uses. I'd like to be able to exclude specific instances from this bulk action before it is applied.

Subjective note: R# has such a great infrastructure for finding and fixing issues. I don't know why you are not going the last extra mile and offer a comprehensive bulk action feature. Now that there finally is a bulk action feature it, again, is the minimal viable version of it. 99% of the cost of this is in the infrastructure which is already implemented. Now offer a decent UI for developers and architects at an additional 1% of the cost.

Just applying a bulk action in 10k places in a solution without looking at them is just unrealistic.

RSRP-427906: Create and Initialize Auto Property generates non compilable code

$
0
0
Reporter Anton Sizikov (sizikov.anton) Anton Sizikov (sizikov.anton)
Created Nov 19, 2014 6:27:52 PM
Updated Oct 11, 2018 2:31:23 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 10.0.2, 9.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS 2013 RTM, VS 2015 RTM
When I have the following class declaration:

    public class Foo
{
public Foo(string foo)
{
}
}

and I hit the "Create and initialize auto-property" quick fix ReSharper produces non compilable code:

    public class Foo
{
public string Foo { get; set; } //Member name can not be the same as enclosing type name

public Foo(string foo)
{
Foo = foo;
}
}

RSRP-428729: Quick fix suggestions

$
0
0
Reporter Szymon Miazga (setch) Szymon Miazga (setch)
Created Dec 5, 2014 2:00:21 PM
Updated Oct 11, 2018 2:38:17 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
1. It would be nice to have a quick fix action for null checking of nullable types. What I would like to have is with Alt + Enter change a piece of code in 1.1 to 1.2. It is not a big deal but I often do it manually.
2. There is a way to make concatenation of string with + operator transform into string.Format() (2.1.png -> 2.2.png). This is very useful. What I would like to have is the other way. From string.Format() to using + operator or string.Concat() function. Why would anybody do t? There are numerous discussion on the Internet about the best way of adding strings and there is no clear answer on that. On my part I started using string.Concat() and + operator more and more often.

RSRP-429454: Several identical QFs on 'xml comment is not placed on a valid language element' issue for a multi line comment

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Dec 24, 2014 12:08:36 PM
Updated Oct 11, 2018 2:39:00 PM
Resolved Oct 11, 2018 2:39:00 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 9.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
1. Try the following code:
/// <summary>
/// test
/// test
/// test
/// test
/// test
/// </summary>
namespace ConsoleApplication18
{
class Program
{
static void Main(string[] args)
{
}
}
}
2. Alt+Enter on comment

Result: several identical QFs are suggested, see attached screenshot

RSRP-429467: ReSharper inappropriate suggestions in VB: Read-only auto properties

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Dec 24, 2014 5:47:03 PM
Updated Oct 11, 2018 2:43:53 PM
Resolved Oct 11, 2018 2:43:53 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
If I have the following code:

Private _foo as string 
Public ReadOnly Property Foo as string
Get
Return _foo
End Get
End Property

Resharper suggests I can replace this with an auto-property:

Public Readonly Foo As String

However, VB does not support read only auto properties and so this gives a compiler error

RSRP-429468: Resharper inappropriate suggestions in VB: Properties with a private set

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Dec 24, 2014 5:47:53 PM
Updated Oct 11, 2018 2:49:58 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Submitted
Type Bug
Fix version Backlog
Affected versions 10.0.2, 2016.1.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
If I have the following code:
Private _foo as string 
Public ReadOnly Property Foo as string
Get
Return _foo
End Get
Private Set(value as String)
_foo = value
End Set
End Property

Resharper suggests I replace this with an auto-property:

Public Property Foo As String

However, this has changed the functionality of the statement as the Set is now public too.

RSRP-430283: Implement missing members/Generate constructor put missing constructor in different places

$
0
0
Reporter Victor Kropp (kropp) Victor Kropp (kropp)
Created Jan 13, 2015 3:51:51 PM
Updated Oct 11, 2018 2:59:45 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
If I have a class implementing abstract class without default constructor two options available in Alt-Enter menu:
  • Implement missing members: adds missing constructor to the end of class
  • Generate constructor: inserts missing constructor on top of class

They should behave consistently.

RSRP-471815: One or more errors occurred. DeclaredElement JetBrains.ReSharper.Psi.ExtensionsAPI.Caches2.Class is not valid.

$
0
0
Reporter Felipe Chiumeo (fchiumeo) Felipe Chiumeo (fchiumeo)
Created Jul 3, 2018 9:10:34 PM
Updated Oct 11, 2018 3:16:11 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Submitted
Type Exception
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _deb15e48 — JetBrains ReSharper Ultimate 2018.2 EAP 1 Build 182.0.20180628.124316-eap01

JetBrains dotCover 182 Build 182.0.20180628.132216-eap01
JetBrains ReSharper 182 Build 182.0.20180628.125556-eap01

One or more errors occurred. DeclaredElement JetBrains.ReSharper.Psi.ExtensionsAPI.Caches2.Class is not valid.

— EXCEPTION #1/3 [InvalidOperationException]
Message = “DeclaredElement JetBrains.ReSharper.Psi.ExtensionsAPI.Caches2.Class is not valid.”
ExceptionPath.1 = Root.InnerException.InnerException
ExceptionPath.2 = Root.InnerException.InnerExceptions.#0
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.ReSharper.Psi
StackTraceString = “
 at JetBrains.ReSharper.Psi.DeclaredElementExtensions.AssertIsNullOrValid(IDeclaredElement element)
 at JetBrains.ReSharper.Psi.DeclaredElementExtensions.AssertIsNullOrValid(IDeclaredElement element)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Caches2.CachedTypeMemberBase.GetContainingType()
 at JetBrains.ReSharper.Psi.CSharp.Impl.DeclaredElement.CSharpMethod.JetBrains.ReSharper.Psi.IClrDeclaredElement.GetContainingType()
 at JetBrains.ReSharper.Psi.Impl.OverridableMemberImpl.<GetImmediateImplement>d__9.MoveNext()
 at JetBrains.ReSharper.Psi.Impl.OverridableMemberImpl.<GetImmediateSuperMembers>d__8.MoveNext()
 at JetBrains.ReSharper.Psi.ExtensionsAPI.AttributeInstanceUtil.<CollectFromSuperMembers>d__4.MoveNext()
 at JetBrains.Util.LocalList`1.AddRange[TSource](IEnumerable`1 items)
 at JetBrains.ReSharper.Psi.CSharp.Impl.DeclaredElement.CSharpOverridableMember`1.GetAttributeInstances(Boolean inherit)
 at JetBrains.ReSharper.Psi.CodeAnnotations.AttributeInstancesProvider.GetAttributeInstances(IAttributesOwner attributesOwner)
 at JetBrains.ReSharper.Psi.CodeAnnotations.AttributeInstancesProvider.GetAndProcessAttributeInstances(IAttributesOwner attributesOwner, IAttributeInstancesConsumer requestor)
 at JetBrains.ReSharper.Psi.CodeAnnotations.CodeAnnotationInfoProviderBase`2.GetInfoInternal(TAttributesOwner attributesOwner)
 at JetBrains.ReSharper.Psi.CodeAnnotations.CodeAnnotationInfoProvider`2.GetInfo(TAttributesOwner attributesOwner)
 at JetBrains.ReSharper.I18n.Services.CSharp.LocalizableManager.GetLocalizableAttributeValue(IDeclaredElement element, IDictionary`2 cacheLocalizableItems, LocalizationRequiredAnnotationProvider localizationRequiredAnnotationProvider)
 at JetBrains.ReSharper.I18n.Services.CSharp.LocalizableManager.IsLocalizable(IDeclaredElement owner, IDictionary`2 cacheLocalizableItems, LocalizationRequiredAnnotationProvider localizationRequiredAnnotationProvider)
 at JetBrains.ReSharper.Daemon.Resx.CSharpDaemon.LocalizableElementDaemonStage.LocalizableElementProcess.InteriorShouldBeProcessed(ITreeNode element, IHighlightingConsumer context)
 at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.ProcessorBase.InteriorShouldBeProcessed(ITreeNode element)
 at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendants(ITreeNode root, IRecursiveElementProcessor processor)
 at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessThisAndDescendants(ITreeNode root, IRecursiveElementProcessor processor)
at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_0.<Execute>g__MemberHighlighter|0(ICSharpTypeMemberDeclaration declaration)
 at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_1.<Execute>b__2()
 at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_1.<Execute>b__2()
 at JetBrains.ReSharper.Psi.Extensions.<>c__DisplayClass0_0.<EnqueueJob>b__0()
 at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
 at System.Threading.Tasks.Task.InnerInvoke()
 at System.Threading.Tasks.Task.Execute()


— Outer —

— EXCEPTION #2/3 [AggregateException]
Message = “One or more errors occurred.”
ExceptionPath = Root.InnerException
ClassName = System.AggregateException
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Platform.Core
InnerExceptions.#0 = “Exception #1 at Root.InnerException.InnerException”
StackTraceString = “
 at JetBrains.Application.Threading.Tasks.TaskBarrier.DisposeUnmanagedResources()
 at JetBrains.Application.Threading.Tasks.TaskBarrier.DisposeUnmanagedResources()
 at JetBrains.Util.SafeDisposable.DisposeInternal()
 at JetBrains.Util.SafeDisposable.Dispose()
 at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.Execute(Action`1 committer)
 at JetBrains.ReSharper.Daemon.Resx.CSharpDaemon.LocalizableElementDaemonStage.LocalizableElementProcess.Execute(Action`1 committer)
 at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.RunStage(IDaemonStage stage, DaemonProcessKind processKind, Action`2 commiter, IContextBoundSettingsStore contextBoundSettingsStore, JetHashSet`1 disabledStages)


— Outer —

— EXCEPTION #3/3 [LoggerException]
Message = “One or more errors occurred.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = “JetPool(L) #3”
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.2 EAP 1 Build 182.0.20180628.124316-eap01”
Data.SubProducts.#0 = “JetBrains dotCover 182 Build 182.0.20180628.132216-eap01”
Data.SubProducts.#1 = “JetBrains ReSharper 182 Build 182.0.20180628.125556-eap01”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/182-eap1::389b2b0a5d2b33c46224f8f1850bc61276990d1e


Platform\VisualStudio:
    git::refs/heads/182-eap1

Data.VsVersion = 15.7.27703.2035
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.RunStage(IDaemonStage stage, DaemonProcessKind processKind, Action`2 commiter, IContextBoundSettingsStore contextBoundSettingsStore, JetHashSet`1 disabledStages)
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass44_1.<DoHighlighting>g__Stage|2(IDaemonStage stage)
 at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass46_1.<PrepareRunActionForStages>b__0()
 at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass46_1.<PrepareRunActionForStages>b__0()
 at JetBrains.Application.Threading.Tasks.TaskBarrier.<>c__DisplayClass22_1.<EnqueueDependentJobs>b__2()
 at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
 at System.Threading.Tasks.Task.InnerInvoke()
 at System.Threading.Tasks.Task.Execute()
 at System.Threading.Tasks.Task.ExecutionContextCallback(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.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
 at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #4.JetPool(L) #3(Action )
 at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<Start>b__19_0()
 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
 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 System.Threading.ThreadHelper.ThreadStart()

RSRP-433029: How to "always use var in foreach" but everywhere else "use var when evident" going RS 7.1 => RS 9?

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Feb 10, 2015 12:27:12 PM
Updated Oct 11, 2018 3:18:04 PM
Subsystem Code Style - Cleanup
Assignee Razmik Seysyan (razmik)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 9.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
Hi, thread: https://devnet.jetbrains.com/thread/459726

Base dilemma is I have difficulties fixing so RS 9 applies to our code style. in RS 7.1 we had a setting "always use var in foreach" during code cleanup, and then we used the "use var when evident" or similar in RS 7.1.

I cannot get this to work in RS 9, how do I define so we treat foreach-cases (since here var vs explicit type differs in behavior) differently than the rest of cases?
Viewing all 106942 articles
Browse latest View live


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