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

RSRP-440505: Convert between Parse/TryParse and others

$
0
0
Reporter T (thymin) T (thymin)
Created May 29, 2015 4:08:14 PM
Updated Oct 18, 2018 1:13:06 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
R# should allow to convert between:

var x = int.Parse(s);

and

int x;
int.TryParse(s, out x);

There are others as well:

Uri uri;
Uri.TryCreate(codeBase, UriKind.Absolute);

Also think the failure case through. What if the conversion fails. Maybe:

if (!int.TryParse(s, out x)) return;

Allow the user to pick from a list of appropriate patterns. For example, if the enclosing method returns bool then use "return false;" or "return true;".

RSRP-471571: Code Analysis I attached a file to an e-mail sent to Alexandra. However, apparently, my e-mail server removed the file. I'm attaching the file here.

$
0
0
Reporter Andrew Perkins (rescuetpservices) Andrew Perkins (rescuetpservices)
Created Sep 20, 2018 3:46:39 PM
Updated Oct 18, 2018 1:22:34 PM
Subsystem Code Analysis
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Waiting for Info
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

I want to clean up code and I'm looking to use the code analysis to help in this task. One of the files I want to clean up yields to the code analysis column in Visual Studio 2015 to show a pause button at the top of the column. When I hover over this button, I get the following text. "File was isolated because code analysis led to exceptions". What can be done to have the code analysis run successfully?

RSRP-440509: Improve "move var declaration closer to assignment"

$
0
0
Reporter T (thymin) T (thymin)
Created May 29, 2015 4:49:34 PM
Updated Oct 18, 2018 1:24:00 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
Code:

static string Loadstring()
{
string x = null;
try
{
x = "";
}
catch (Exception ex)
{
}
return x;
}

R# should offer me to simplify this control flow to:

static string Loadstring()
{
try
{
return "";
}
catch (Exception ex)
{
return null;
}
}

Variations of this pattern are possible. I understand this is a vague feature request but I see this pattern a lot. Just now I has such a case. It arose because I extracted this code as a method. In that other method the variable "x" made sense but after extracting it to Loadstring the control flow is just unnecessarily complicated. In fact I extracted in order to simplify.

RSRP-440511: Remove redundant parenthesis -> comment removed too

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created May 29, 2015 5:21:24 PM
Updated Oct 18, 2018 1:26:58 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 9.1.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Please position a cursor at a redundant parenthesis in the third row, then select Remove redundant parenthesis. Comment is removed from the next row - at least in my case.
private void GetX() { 
if (1 == 1
&& (3 == 4 && 8 == 6)
// comment
&& 1 == 3) ;

}

RSRP-441143: Undoing 'Convert to for' context action breaks the code

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Jun 11, 2015 4:23:27 PM
Updated Oct 18, 2018 1:29:19 PM
Subsystem Context Actions
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
1. Try the following code
foreach (string name in names)
            {
                //dosmth
            }
2. Apply 'Convert to for' context action
3. Undo action

Result: another 'name' is added:
    foreach (string name name names)
            {
                //dosmth
            }

RSRP-441371: CA Suggestion: Replace array literal with collection initialiser

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Jun 16, 2015 12:25:35 PM
Updated Oct 18, 2018 1:33:44 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 9.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
new List<string>(new []{"Foo", "Bar"});

...to...

new List<string> {"Foo", "Bar"};

The latter avoids construction/collection of an array and is shorter.

Probably a good idea for other BCL collection types too.

RSRP-80754: OutOfMemoryException

$
0
0
Reporter Ilya Ryzhenkov (orangy) Ilya Ryzhenkov (orangy)
Created Sep 16, 2008 10:30:37 AM
Updated Oct 18, 2018 2:51:03 PM
Subsystem Crash
Assignee Sergey Shkredov (serjic.shkredov)
Priority Critical
State Reopened
Type Exception
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

RSRP-471827: Unit Test sees two tests with the same name but different signatures as the same test and executes only the 1st one

$
0
0
Reporter Andrey Simukov (Andrey.Simukov) Andrey Simukov (Andrey.Simukov)
Created Oct 12, 2018 4:44:13 PM
Updated Oct 18, 2018 2:55:02 PM
Subsystem Unit Testing
Assignee Eugene Strizhok (Eugene.Strizhok)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
When I have two tests with the same name but different signatures, the windows do not show the tests as separate tests. Have a look at the attached file OrderServiceTest.cs

Set a breakpoint on the second method OrderService_ShouldBeBackwardsCompatible and try to debug it. You'll note that the breakpoint doesn't get hit.

These may be two separate issues.


Reproduced with R# 2018.2.3




RSRP-471875: DocumentRange is invalid

$
0
0
Reporter Miguel Pinto (enchoir) Miguel Pinto (enchoir)
Created Jul 17, 2018 11:51:51 AM
Updated Oct 18, 2018 2:58:25 PM
Subsystem Context Actions
Assignee Alexander Shvedov (shvedov)
Priority Show-stopper
State Submitted
Type Exception
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _b33d9532 — JetBrains ReSharper Ultimate 2018.2 EAP 3 Build 182.0.20180711.65739-eap03

JetBrains dotTrace 182 Build 182.0.20180711.73821-eap03
JetBrains ReSharper 182 Build 182.0.20180711.70917-eap03
JetBrains TeamCity Add-in 182 Build 182.0.20180711.70915-eap03

DocumentRange is invalid

— EXCEPTION #1/2 [AssertionException]
Message = “DocumentRange is invalid”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Platform.DocumentModel
StackTraceString = “
 at JetBrains.DocumentModel.DocumentRange.AssertValid()
 at JetBrains.DocumentModel.DocumentRange.AssertValid()
 at JetBrains.ReSharper.Intentions.CSharp.ContextActions.Comments.CSharpCommentActionBase.ValidateSelectionBorders(IFile cSharpFile, ICSharpCommentNode commentNode)
 at JetBrains.ReSharper.Intentions.CSharp.ContextActions.Comments.CSharpCommentActionBase.ValidateSelectionRange(IFile cSharpFile, IList`1 commentNodes)
 at JetBrains.ReSharper.Intentions.CSharp.ContextActions.Comments.CSharpCommentActionBase.GetSelectedCommentNodes()
 at JetBrains.ReSharper.Intentions.CSharp.ContextActions.Comments.UncommentAction.IsAvailable(IUserDataHolder cache)
 at JetBrains.ReSharper.Feature.Services.ContextActions.ContextActionTableImpl.InstantiateAvailableActions(IPsiSourceFile sourceFile, IDictionary`2 providersCache, IUserDataHolder dataHolder)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “DocumentRange is invalid”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = “JetPool(S) #1”
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.2 EAP 3 Build 182.0.20180711.65739-eap03”
Data.SubProducts.#0 = “JetBrains dotTrace 182 Build 182.0.20180711.73821-eap03”
Data.SubProducts.#1 = “JetBrains TeamCity Add-in 182 Build 182.0.20180711.70915-eap03”
Data.SubProducts.#2 = “JetBrains ReSharper 182 Build 182.0.20180711.70917-eap03”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/182-eap3::2b55a007014dea4b041ef04e3fd1893fb9820541


Platform\VisualStudio:
    git::refs/heads/182-eap3::7d305aa324a045fb7468c2cc6200e062bc531798

Data.VsVersion = 15.7.27703.2042
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.ReSharper.Feature.Services.ContextActions.ContextActionTableImpl.InstantiateAvailableActions(IPsiSourceFile sourceFile, IDictionary`2 providersCache, IUserDataHolder dataHolder)
 at JetBrains.ReSharper.Feature.Services.ContextActions.ContextActionTableImpl.InstantiateAvailableActions(IPsiSourceFile sourceFile, IDictionary`2 providersCache, IUserDataHolder dataHolder)
 at JetBrains.ReSharper.Intentions.Bulbs.ContextActionsProvider.CollectActions(IntentionsBulbItems intentionsBulbItems, BulbItemsCache bulbItemsCache, ITextControl textControl, Lifetime caretPositionLifetime, IPsiSourceFile psiSourceFile, Object precalculatedData)
 at JetBrains.ReSharper.Intentions.Bulbs.BulbItems.<>c__DisplayClass21_0.<BuildAvailableActionsList>b__1()
 at JetBrains.Application.Threading.InterruptableReadActivityThe.Work()
 at JetBrains.Application.Threading.InterruptableReadActivity.DoWork()
 at JetBrains.Application.Threading.InterruptableReadActivity.WorkerThreadProc()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass2_0.<RunSafe>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()
 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.JetPool(S) #1(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-442929: Suggest invert lambda within Any to replace with All and method group

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Jul 6, 2015 1:57:24 PM
Updated Oct 18, 2018 3:02:51 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
bytes.Any(b => !IsValidByte(b))

Is simpler and more efficient as:

!bytes.All(IsValidByte)

Even if this weren't a suggestion, it'd make a useful CA.

RSRP-445560: CA not available to convert operator overload to expression body

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Jul 20, 2015 10:41:31 PM
Updated Oct 18, 2018 3:14:45 PM
Resolved Oct 18, 2018 3:14:44 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 9.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
public static bool operator !=(PngChunkType left, PngChunkType right)
{
return !Equals(left, right);
}

Select the operator != symbol. There should be a CA "To expression body" which produces:

public static bool operator !=(PngChunkType left, PngChunkType right) => !Equals(left, right);

RSRP-445798: CA to order switch case blocks by value

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Jul 26, 2015 7:30:49 PM
Updated Oct 18, 2018 3:19:24 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
I have several switch statements in a library, the values for which are defined by constants. The order they have been added over time has been somewhat random, and now they are quite disordered.

switch (foo)
{
case Foo.Bar: /* ... */ break;
case Foo.Baz: /* ... */ break;
case Foo.Bax: /* ... */ break;
// ... many more
}

I'd like to order these based on the numeric order of the constants. This could also work for integral literals, enums or strings.

RSRP-471847: This property is locked. It can only be changed by the owner of the token.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Oct 2, 2018 2:36:55 PM
Updated Oct 18, 2018 3:21:49 PM
Subsystem No Subsystem
Assignee Serge Baltic (baltic)
Priority Show-stopper
State Submitted
Type Exception
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 183 Hive _3f3919c0 — JetBrains ReSharper Ultimate 2018.3 EAP 1 D Build 183.0.20181002.50509-eap01d

JetBrains dotCover 2018.3 EAP 1 D Build 2018.3.20181002.54636-eap01d
JetBrains dotMemory 2018.3 EAP 1 D Build 2018.3.20181002.54430-eap01d
JetBrains dotTrace 2018.3 EAP 1 D Build 2018.3.20181002.54651-eap01d
JetBrains ReSharper 2018.3 EAP 1 D Build 2018.3.20181002.54318-eap01d
JetBrains ReSharper C++ 2018.3 EAP 1 D Build 2018.3.20181002.54321-eap01d
JetBrains TeamCity Add-in 2018.3 EAP 1 D Build 2018.3.20181002.54327-eap01d

This property is locked. It can only be changed by the owner of the token.

— EXCEPTION #1/2 [ReadOnlyException]
Message = “This property is locked. It can only be changed by the owner of the token.”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.DataStructures.ReadOnlyException
Data.PropertyID = ITextControl::JetTextControl
Data.AttemptedValue = VsTextControl(Class8.vb)/Zatu
Data.CurrentValue = VsTextControl(Class8.vb)/Syso
Data.AttemptedToken = <null>
Data.LockingToken = “Readonly{Property locked by an active SetValue()-with-lifetime call.}”
HResult = DataReadOnly=80131927
Source = JetBrains.Platform.Core
StackTraceString = “
 at JetBrains.DataFlow.Property`1.ThrowReadonlyFail(BeforePropertyChangedEventArgs`1 args, Object tokenExpected)
 at JetBrains.DataFlow.Property`1.ThrowReadonlyFail(BeforePropertyChangedEventArgs`1 args, Object tokenExpected)
 at JetBrains.DataFlow.PropertyValidator.<>c__DisplayClass4_0`1.<CreateReadonlyValidator>b__0(BeforePropertyChangedEventArgs`1 args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “This property is locked. It can only be changed by the owner of the token.”
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 1 D Build 183.0.20181002.50509-eap01d”
Data.SubProducts.#0 = “JetBrains dotCover 2018.3 EAP 1 D Build 2018.3.20181002.54636-eap01d”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.3 EAP 1 D Build 2018.3.20181002.54651-eap01d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.3 EAP 1 D Build 2018.3.20181002.54321-eap01d”
Data.SubProducts.#3 = “JetBrains TeamCity Add-in 2018.3 EAP 1 D Build 2018.3.20181002.54327-eap01d”
Data.SubProducts.#4 = “JetBrains ReSharper 2018.3 EAP 1 D Build 2018.3.20181002.54318-eap01d”
Data.SubProducts.#5 = “JetBrains dotMemory 2018.3 EAP 1 D Build 2018.3.20181002.54430-eap01d”
Data.SccRevisionEnv = “
Platform\Core\Shell,
Platform\VisualStudio:
    git::refs/heads/183::e74f46d2a0da2b322032116a265908f025e5910f

Data.VsVersion = 15.8.28010.2036
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.Property`1.FireBeforeChange(TValue old, TValue new, Object cookie)
 at JetBrains.DataFlow.Property`1.SetValue(TValue value, Object cookie)
 at JetBrains.DataFlow.IPropertyEx.<>c__DisplayClass30_0`1.<SetValue>b__0()
 at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
 at JetBrains.DataFlow.IPropertyEx.SetValue[TValue](IProperty`1 property, Lifetime lifetime, TValue value, Object cookie)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.VsTextControlDevTen.Init_AdvertiseOnVsObject()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.VsTextControlDevTen..ctor(IWpfTextView vstextview, VsDocumentWhidbey document, WindowFrame frame, ICreateTextControlParams createParams, IShellLocks locks, IWindowsHookManager windowsHookManager, IVsTextControlDevTenIncrementalSearchClient vsTextControlDevTenIncrementalSearchClient, IUIApplication environment, VsErrorStripeLayoutManagerDevTen errorStripeLayoutManager, TextControlTypingHandlers textControlTypingHandlers, VsCommandProcessor vsCommandProcessor, IVsActionManager vsActionManager, ChangeManager changeManager, DocumentChangeManager documentChangeManager, VsDocumentModelSynchronization vsDocumentModelSynchronization, Lazy`1 vsEditorAdaptersFactoryService, Lazy`1 outliningManagerService, Lazy`1 editorOperationsFactoryService, TextControlPreferences textControlPreferences, Lazy`1 classificationTypeRegistryService, Lazy`1 classificationFormatMapService)
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at JetBrains.Application.Components.SingletonTypeComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
 at JetBrains.Application.Components.SingletonTypeComponentDescriptor.CreateInstance(IValueResolveContext context)
 at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
 at JetBrains.Application.Components.SingletonDescriptor.GetValue()
 at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, ICollection`1 dscs, IComponentContainer container)
 at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
 at JetBrains.Application.Components.ComponentStorage.Compose()
 at JetBrains.Application.Components.FactoryComponentContainer.CreateInstanceCore(Lifetime lifetime, Type type, IComponentContainer parent, Object[] args)
 at JetBrains.Application.Components.FactoryComponentContainer.CreateInstance(Lifetime lifetime, Type objecttype, IComponentContainer parent, Object[] args)
 at JetBrains.Application.Components.FactoryComponentContainer.CreateInstance[TInstance](Lifetime lifetime, IComponentContainer parent, Object[] args)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.VsTextControlCreatorDevTen.CreateTextControl[TTextControl](CreateTextControlParams`1 param)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsAttachTextControlsToTextViews.<>c__DisplayClass0_1.<.ctor>b__1()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsAttachTextControlsToTextViews.<>c__DisplayClass0_0.<.ctor>b__0(Lifetime lifetimeView, VsTextViewDataForTextControlDevTen data)
 at JetBrains.DataFlow.ICollectionEventsEx.<>c__DisplayClass9_1`1.<ForEachItemCore>b__1()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.DataFlow.ICollectionEventsEx.<>c__DisplayClass9_0`1.<ForEachItemCore>b__0(AddRemoveEventArgs`1 args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.CollectionEvents`1.FireAddRemove(AddRemove action, TValue value, Object cookie)
 at JetBrains.DataFlow.CollectionEvents`1.InternalAdd(TValue value, Object cookie)
 at JetBrains.DataFlow.CollectionEvents`1.Add(TValue value, Object cookie)
 at JetBrains.DataFlow.ICollectionEventsEx.<>c__DisplayClass16_1`2.<FlowInto>b__1(AddRemoveEventArgs`1 args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.CollectionEvents`1.FireAddRemove(AddRemove action, TValue value, Object cookie)
 at JetBrains.DataFlow.DictionaryEvents`2.InternalAdd(KeyValuePair`2 value, Object cookie)
 at JetBrains.DataFlow.DictionaryEvents`2.set_Item(TKey key, Object cookie, TValue value)
 at JetBrains.DataFlow.DictionaryEvents`2.set_Item(TKey key, TValue value)
at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsTextViewDataForTextControlCollectorDevTen.<>c__DisplayClass0_1.<.ctor>g__ApplyData|4(IWpfTextView view, VsTextViewDataForTextControlDevTen newdata)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsTextViewDataForTextControlCollectorDevTen.<>c__DisplayClass0_7.<.ctor>b__17()
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsTextViewDataForTextControlCollectorDevTen.<>c__DisplayClass0_7.<.ctor>b__17()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.VsTextViewDataForTextControlCollectorDevTen.<>c__DisplayClass0_1.<.ctor>b__6(EventArgs`1 args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.TrackVsTextViewDataForTextControlChangesEx.<>c__DisplayClass0_0.<FireTextViewDataChanged>b__0()
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.TrackVsTextViewDataForTextControlChangesEx.FireTextViewDataChangedImpl(ITrackVsTextViewDataForTextControlChanges trackVsTextViewDataForTextControlChanges, Lifetime lifetime, IShellLocks locks, Action action)
 at JetBrains.Platform.VisualStudio.SinceVs10.TextControl.AttachTextControlsToTextViews.TrackVsTextViewDataForTextControlChangesEx.FireTextViewDataChanged(ITrackVsTextViewDataForTextControlChanges trackVsTextViewDataForTextControlChanges, Lifetime lifetime, IShellLocks locks, Func`1 isEventStillActual, IWpfTextView wpfTextView)
 at JetBrains.Platform.VisualStudio.SinceVs10.IDE.VsDocumentManagerWhidbey_TrackVsTextViewDataForTextControlChanges..ctor(Lifetime lifetime, VsDocumentManagerWhidbey docman, ITrackVsTextViewDataForTextControlChanges tracker, IShellLocks locks)
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at JetBrains.Application.Extensibility.PartCatalogTypeComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
 at JetBrains.Application.Extensibility.PartCatalogTypeComponentDescriptor.CreateInstance(IValueResolveContext context)
 at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
 at JetBrains.Application.Components.SingletonDescriptor.GetValue()
 at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, ICollection`1 dscs, IComponentContainer container)
 at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
 at JetBrains.Application.Components.ComponentStorage.Compose()
 at JetBrains.ProjectModel.SolutionInstance.OpenSolution(ISolutionOwner solutionOwner)
 at JetBrains.ProjectModel.SolutionManagerBase.<>c__DisplayClass23_0.<CreateSolutionInstance>b__0()
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.<>c__DisplayClass21_0.<ExecuteTask>b__1()
 at JetBrains.Util.ILoggerEx.Catch(ILogger thіs, Action F, ExceptionOrigin origin, LoggingLevel loggingLevel)
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.ExecuteTask(SolutionLoadTask task)
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerAsync.<Schedule>b__5_0()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.Application.Threading.IShellLocksEx.<>c__DisplayClass11_0.<QueueReadLock>b__0()
 at JetBrains.Threading.ReentrancyGuardEx.<>c__DisplayClass0_1.<Queue>b__3()
 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.ExternalIdleProcessing.OnExternalDriverIdle()
 at JetBrains.VsIntegration.Shell.VsDoIdleDispatcherSink.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FDoIdle(UInt32 grfidlef)

RSRP-447160: Refactoring removes argument name, potentially creating code with different behavior

$
0
0
Reporter Justin Constantino (Justin_Constantino) Justin Constantino (Justin_Constantino)
Created Aug 19, 2015 7:11:37 PM
Updated Oct 18, 2018 3:23:59 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 9.1.3, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Given:
public static class Program
{
public static void Main(string[] args)
{
string result;

if (args.Length > 0)
result = DoSomething(bar: true);
else
result = DoSomething(bar: false);

Console.WriteLine(result);
}

private static string DoSomething(bool? foo = null, bool? bar = null)
{
return bar == true ? "yes" : "no";
}
}

ReSharper will offer a refactoring for the if on line 7: Convert to method call with '?:' expression inside. If you apply it, you get:

public static class Program
{
public static void Main(string[] args)
{
string result;

result = DoSomething(args.Length > 0);

Console.WriteLine(result);
}

private static string DoSomething(bool? foo = null, bool? bar = null)
{
return bar == true ? "yes" : "no";
}
}

The argument name bar is gone, causing the value to go to the first parameter (foo) instead. If you're lucky, the type of the parameter will be different and you'll get a compile error. If you're not so lucky, the behavior of your code will now be different.

RSRP-447165: Don't suggest to make TestContext private

$
0
0
Reporter Alexandra Kuks (Asia.Rudenko) Alexandra Kuks (Asia.Rudenko)
Created Aug 19, 2015 9:02:35 PM
Updated Oct 18, 2018 3:37:19 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Open the attached solution, open Class1.cs - ReSharper suggests to make 'TestContext' property private; if you accept, the tests won't be detected anymore - so probably R# shouldn't make this suggestion.

RSRP-471889: Integration with Typemock Isolator broken

$
0
0
Reporter Joachim Lukasser (jluki) Joachim Lukasser (jluki)
Created Oct 18, 2018 3:33:31 PM
Updated Oct 18, 2018 3:40:31 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

Hi,

I upgraded R# Ultimate from 2018.1 to 2018.2.3 and found that the integration with Typemock Isolator is broken.
Running Isolated tests - with or without code coverage - results in "“<Test Class> is inconclusive".

Reverting R# to version 2018.1 fixed the issue but it's just a workaround.

Cheers,
Joachim

RSRP-448332: Bad wording in SwitchStatementMissingSomeCasesWarning

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Sep 23, 2015 4:09:06 PM
Updated Oct 18, 2018 3:43:07 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Open
Type Usability Problem
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
When there is a default label we should write something like Some values of the enum are not explicitly processed inside switch: and when added the default handler should be copied

namespace ConsoleApplication3
{
public enum E
{
A, B, C, D
}
class Program
{
static void Main(string[] args)
{
E e = E.A;
switch (e)
{
case E.A:
return;

default:
return;
}
}
}
}

RSRP-448782: When moving type to separate file type aliases also should be kept and moved along.

$
0
0
Reporter hype artist (Hypeartist.Hypeartist) hype artist (Hypeartist.Hypeartist)
Created Oct 3, 2015 12:24:43 PM
Updated Oct 18, 2018 3:46:31 PM
Subsystem Context Actions
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
Here is the content of file A.cs:

using System;

using T1 = System.Int16; // <------- type alias
using T2 = System.Int32; // <------- type alias

namespace N
{
    public class A
    {        
    }

    public class B
    {
        private T1 _t1;
        private T2 _t2;
    }
}

Hitting Alt+Enter right after B and choosing "Move to B.cs" we get the file with following content:

namespace N
{
    public class B
    {
        private Int16 _t1;
        private Int16 _t2;
    }
}

All type aliases are removed and replaced with actual type. This is not what I expected. I need aliases not actual types!

RSRP-471890: "Reorder using statements" Rosylyn Code Fix does not respect existing indentation

$
0
0
Reporter Ben Wallis (Ben.Wallis) Ben Wallis (Ben.Wallis)
Created Oct 18, 2018 3:47:22 PM
Updated Oct 18, 2018 3:47:22 PM
Subsystem Code Style
Assignee Razmik Seysyan (razmik)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion VS 2017 15.8.6
When running the "Reorder using statements" code fix (for Stylecop rule SA1210), existing indentation is lost and always replaced with 4 spaces rather than a more sensible option such as using the existing indentation of the using statements (if they're uniform), or using the Indent size Resharper setting.

This has the annoying knock-on effect of subsequently triggering SA1137 "Elements should have the same indentation" since it results in the rest of the file being a different indentation from the using statements.

RSRP-468425: Ctrl + Click doesn't show usages

$
0
0
Reporter Jacopo Gobbi (jacopogobbi) Jacopo Gobbi (jacopogobbi)
Created Nov 2, 2017 8:46:49 PM
Updated Oct 18, 2018 3:50:10 PM
Resolved Oct 18, 2018 3:49:30 PM
Subsystem Navigation - Contextual
Assignee Alexander Ulitin (alexander.ulitin)
Priority Normal
State Fixed
Type Feature
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Intellij Idea supports the amazing functionality of showing a method usages when doing ctrl + click. I can do that by pressing Alt + F7 but it is not immediate and doesn't show the built in context menu. I don't understand if feature like this are created to be easier to use from visual studio (as another example, there is no progress bar when running unit tests) but I really love how intellij is made and I hope the JetBrains team can port some of its amazing features to Rider.
Viewing all 106942 articles
Browse latest View live


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