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

RSRP-438521: Unit Tests: Wrong "Expression is always null" leads to "Code is heuristically unreachable" detection

$
0
0
Reporter Marcel (aureole82) Marcel (aureole82)
Created Apr 29, 2015 7:33:48 PM
Updated Jun 7, 2018 5:31:52 PM
Resolved Jun 7, 2018 5:11:41 PM
Subsystem Code Analysis - Control Flow
Assignee Ivan Serduk (IvanSerduk)
Priority Critical
State Workaround
Type Bug
Fix version Backlog
Affected versions 9.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
I don't know why but my ReSharper thinks that my device.Offset as CombinedOffset is always null!?


public class Device
{
[NotMapped]
public Offset Offset { get; set; }

[Column("Offset")]
public string OffsetRaw {
get { return Offset.SerializedValue; }
set { Offset = Offset.Parse(value); } }
}

public abstract class Offset { .. }

public class CombinedOffset : Offset {}

public class SingleOffset : Offset {}

See screenshot for final proof!

RSRP-294204: False warning "Impure method is called for readonly field of value type" for TimeSpan.ToString(string) method

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 13, 2012 2:57:41 AM
Updated Jun 7, 2018 5:31:58 PM
Resolved Jun 7, 2018 5:31:55 PM
Subsystem Code Analysis
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
var s = System.TimeSpan.Zero.ToString("c");

http://www.rsdn.ru/forum/jetbrains/4700201.1.aspx

RSRP-469214: Extract Members To Partial: Issues.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 11, 2018 2:45:45 PM
Updated Jun 7, 2018 5:32:59 PM
Resolved Jun 7, 2018 5:32:59 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Show-stopper
State Fixed
Type Bug
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 182.0.20180410.111135-eap00d.

Not fixed:

  1. Annoying: After Navigate link is clicked (and focus go to code) it takes 2 clicks to open dropdown. - Duplicate of RSRP-469348.
  2. Double click on parameter does not navigate to it from another file (file that does not contain that parameter). NOTE: if currently file that contains parameter is focused than navigation works. - Duplicate of RSRP-469347.

Fixed:

  1. No icons in "Select existing part:" dropdown. - Fixed in branch 182-alisa.refactorings.
  2. Layout of items in dropdown is incorrect (see screenshot).- Fixed in branch 182-alisa.refactorings.
  3. When some existing part is selected in "Select existing part:" dropdown and then "Create new part" is selected the members still moved to previously selected existing part instead of new one.- Fixed in branch 182-alisa.refactorings.
  4. File name in dropdown does not contain underscore (actual file name does contain underscore).- Fixed in branch 182-alisa.refactorings.

Won't be fixed:

  1. Accelerator Alt+e (for "Select existing part") does not highlight dropdown.
  2. Minor: "Navigate" link style is not disabled when create new part is selected in dropdown.
  3. Minor: "Navigate" link layout is incorrect (should end where Cancel button ends).

RSRP-422266: Incorrect loop control variable never changed inside loop with DateTime.Now

$
0
0
Reporter Alexander Zaytsev (hazzik) Alexander Zaytsev (hazzik)
Created Aug 27, 2014 6:26:19 AM
Updated Jun 7, 2018 5:33:01 PM
Subsystem Code Analysis - Control Flow
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
DateTime dtTimer = DateTime.Now.AddMilliseconds(1000);
while (dtTimer > DateTime.Now) // here
{
System.Threading.Thread.Sleep(0);
}

RSRP-470015: Extract Members To Partial: Navigate not working

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Jun 4, 2018 4:52:55 PM
Updated Jun 7, 2018 5:33:51 PM
Resolved Jun 7, 2018 5:33:51 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Show-stopper
State Fixed
Type Bug
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains.ReSharperUltimate.2018.2.EAP0D.Checked.(182.0.20180604.80852-eap00d)

Actual result:
Nothing happens when Navigate link in "Extract Members To Partial" dialog is clicked.

Expected result:
Part that selected is shown in editor.

RSRP-469911: Element JetBrains.ReSharper.Psi.VB.Impl.Tree.MethodDeclaration is not valid.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created May 29, 2018 5:49:51 PM
Updated Jun 7, 2018 5:34:42 PM
Resolved Jun 7, 2018 5:34:42 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Show-stopper
State Fixed
Type Exception
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _3f3919c0 — JetBrains ReSharper Ultimate 2018.2 EAP 0 D Build 182.0.20180523.141736-eap00d

JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d
JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d
JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d
JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d

SubProducts.0 = JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d
SubProducts.1 = JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d
SubProducts.2 = JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.3 = JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.4 = JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.5 = JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d

Element JetBrains.ReSharper.Psi.VB.Impl.Tree.MethodDeclaration is not valid.

— EXCEPTION #1/2 [InvalidOperationException]
Message = “Element JetBrains.ReSharper.Psi.VB.Impl.Tree.MethodDeclaration is not valid.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
Data.ReentrancyGuard.ActionName = TextDataModel.Validate
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.ReSharper.Psi
StackTraceString = “
 at JetBrains.ReSharper.Psi.Tree.TreeNodeExtensions.AssertIsValid(ITreeNode element, String messageText)
 at JetBrains.ReSharper.Psi.Tree.TreeNodeExtensions.AssertIsValid(ITreeNode element, String messageText)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.GetPsiModule()
 at JetBrains.ReSharper.Psi.Tree.TreeNodeExtensions.GetResolveContext(ITreeNode treeNode)
 at JetBrains.ReSharper.Feature.Services.Refactorings.DataModels.TextDataValidationEx.IsValidIdentifierRule.<>c__DisplayClass1_0.<.ctor>b__1(String s)
 at JetBrains.ReSharper.Feature.Services.UI.DataModels.GuardedValidationRule`1.<>c__DisplayClass2_0.<.ctor>b__4(T text)
 at JetBrains.IDE.UI.Extensions.ValidationRule`1.GetResult(Func`2 validate, T text)
 at JetBrains.ReSharper.Feature.Services.UI.DataModels.GuardedValidationRule`1.<>c__DisplayClass2_1.<.ctor>b__3()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock[TValue](IShellLocks thіs, Func`1 F)
 at JetBrains.ReSharper.Feature.Services.UI.DataModels.GuardedValidationRule`1.<>c__DisplayClass2_1.<.ctor>b__1()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Element JetBrains.ReSharper.Psi.VB.Impl.Tree.MethodDeclaration is not valid.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.2 EAP 0 D Build 182.0.20180523.141736-eap00d”
Data.SubProducts.#0 = “JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#3 = “JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#4 = “JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#5 = “JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/182::105f28313c28cac82662e6b5631bf97a60100a23


Platform\VisualStudio:
    git::refs/heads/182-alisa.refactorings.2

Data.VsVersion = 15.7.27703.2018
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-469925: '0' is not a valid value for property 'ColumnSpan'.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created May 30, 2018 10:38:54 AM
Updated Jun 7, 2018 5:35:20 PM
Resolved Jun 7, 2018 5:35:20 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Show-stopper
State Fixed
Type Exception
Fix version 2018.2
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _3f3919c0 — JetBrains ReSharper Ultimate 2018.2 EAP 0 D Build 182.0.20180523.141736-eap00d

JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d
JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d
JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d
JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d

SubProducts.0 = JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d
SubProducts.1 = JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d
SubProducts.2 = JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.3 = JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.4 = JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d
SubProducts.5 = JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d

'0' is not a valid value for property 'ColumnSpan'.

— EXCEPTION #1/2 [ArgumentException]
Message = “'0' is not a valid value for property 'ColumnSpan'.”
ExceptionPath = Root.InnerException
ClassName = System.ArgumentException
Data.ViewType = “JetBrains.Platform.UIInteractive.Ide.Controls.SpanGridViewControl, JetBrains.Platform.UIInteractive.Ide, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”
Data.AutomationType = “JetBrains.Rider.Model.UIAutomation.BeSpanGrid, JetBrains.Platform.RdProtocol, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”
HResult = E_INVALIDARG=COR_E_ARGUMENT=80070057
Source = WindowsBase
StackTraceString = “
 at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
 at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
 at System.Windows.Controls.Grid.SetColumnSpan(UIElement element, Int32 value)
 at JetBrains.Platform.UIInteractive.Ide.Controls.SpanGridViewControl.InitElements(List`1 items)
 at JetBrains.Platform.UIInteractive.Ide.Controls.SpanGridViewControl.OnRenderView(Lifetime lifetime, BeSpanGrid automation)
 at JetBrains.UI.SrcView.Automation.ViewControl`1.<>c__DisplayClass1_0.<.ctor>b__1()


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “'0' is not a valid value for property 'ColumnSpan'.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = vb
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.2 EAP 0 D Build 182.0.20180523.141736-eap00d”
Data.SubProducts.#0 = “JetBrains dotCover 2018.2 EAP 0 D Build 2018.2.20180523.143546-eap00d”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.2 EAP 0 D Build 2018.2.20180523.143433-eap00d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#3 = “JetBrains TeamCity Add-in 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#4 = “JetBrains ReSharper 2018.2 EAP 0 D Build 2018.2.20180523.143151-eap00d”
Data.SubProducts.#5 = “JetBrains dotMemory 2018.2 EAP 0 D Build 2018.2.20180523.143423-eap00d”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/182::105f28313c28cac82662e6b5631bf97a60100a23


Platform\VisualStudio:
    git::refs/heads/182-alisa.refactorings.2

Data.VsVersion = 15.7.27703.2018
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.UI.SrcView.Automation.ViewControl`1.<>c__DisplayClass1_0.<.ctor>b__1()
 at JetBrains.UI.SrcView.Automation.ViewControl`1.<>c__DisplayClass1_0.<.ctor>b__1()
 at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
 at JetBrains.UI.SrcView.Automation.ViewControl`1.<.ctor>b__1_0(Lifetime lifetime, TAutomation automation, ViewControl`1 view)
 at JetBrains.UI.Extensions.AvalonTemplates.<>c__DisplayClass7_0`2.<WithAutomationObject>b__4(Lifetime lifeAutomation, TAutomation automation)
 at JetBrains.DataFlow.IPropertyEx.<>c__DisplayClass26_0`1.<ForEachValue>b__0(Lifetime lf, TValue value, Object cookie)
 at JetBrains.DataFlow.IPropertyEx.<>c__DisplayClass27_1`1.<ForEachValue>b__1(Lifetime lifetimeValue)
 at JetBrains.DataFlow.SequentialLifetimes.<>c__DisplayClass4_0.<Next>b__0(LifetimeDefinition definition, Lifetime lifetime)
 at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILog logger)
 at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
 at JetBrains.DataFlow.SequentialLifetimes.Next(Action`1 FNext)
 at JetBrains.DataFlow.IPropertyEx.<>c__DisplayClass27_0`1.<ForEachValue>b__0(PropertyChangedEventArgs`1 args)
 at JetBrains.DataFlow.Property`1.PropertyChangeSignal.Acknowledge(Action`1 handler, AddRemove addremove)
 at JetBrains.DataFlow.Property`1.PropertyChangeSignal.OnAfterAdvise(Action`1 handler)
 at JetBrains.DataFlow.Signal`1.<>c__DisplayClass19_0.<AdviseCore>b__0()
 at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
 at JetBrains.DataFlow.Signal`1.AdviseCore(Action`1 handler, Lifetime lifetime)
 at JetBrains.DataFlow.Signal`1.Advise(Lifetime lifetime, Action`1 handler)
 at JetBrains.DataFlow.IPropertyEx.ForEachValue[TValue](IProperty`1 property, Lifetime lifetime, Func`2 FCondition, Action`3 FHandler)
 at JetBrains.DataFlow.IPropertyEx.ForEachValue[TValue](IProperty`1 property, Lifetime lifetime, Func`2 FCondition, Action`2 FHandler)
 at JetBrains.DataFlow.IPropertyEx.ForEachValue[TValue](IProperty`1 property, Lifetime lifetime, Action`2 FHandler)
 at JetBrains.UI.Extensions.AvalonTemplates.<>c__DisplayClass7_0`2.<WithAutomationObject>b__0(Lifetime lifeLoaded)
 at JetBrains.UI.Extensions.AvalonEx.<>c__DisplayClass56_0.<WhenLoaded>b__6(LifetimeDefinition definition, Lifetime lifeLoaded)
 at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILog logger)
 at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
 at JetBrains.UI.Extensions.AvalonEx.<>c__DisplayClass56_0.<WhenLoaded>b__0(Object <p0>, RoutedEventArgs <p1>)
 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
 at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
 at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
 at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
 at MS.Internal.LoadedOrUnloadedOperation.DoWork()
 at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
 at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
 at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
 at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
 at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
 at System.Windows.Interop.HwndTarget.OnResize()
 at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
 at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)
 at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
 at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
 at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
 at JetBrains.Interop.WinApi.User32Dll.SetWindowPos(Void* hWnd, Void* hWndInsertAfter, Int32 X, Int32 Y, Int32 cx, Int32 cy, UInt32 uFlags)
 at JetBrains.UI.CrossFramework.JetElementHost.SetHWndSourceWindowPos()
 at JetBrains.UI.CrossFramework.JetElementHost.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)
 at System.Windows.Forms.SafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
 at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
 at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
 at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
 at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
 at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
 at System.Windows.Forms.Control.OnResize(EventArgs e)
 at System.Windows.Forms.Panel.OnResize(EventArgs eventargs)
 at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
 at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
 at System.Windows.Forms.Control.UpdateBounds()
 at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
 at System.Windows.Forms.Control.WndProc(Message& m)
 at System.Windows.Forms.ScrollableControl.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)
 at System.Windows.Forms.SafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
 at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
 at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
 at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
 at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
 at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
 at System.Windows.Forms.Control.OnResize(EventArgs e)
 at System.Windows.Forms.Panel.OnResize(EventArgs eventargs)
 at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
 at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
 at System.Windows.Forms.Control.UpdateBounds()
 at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
 at System.Windows.Forms.Control.WndProc(Message& m)
 at System.Windows.Forms.ScrollableControl.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)
 at System.Windows.Forms.SafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
 at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
 at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
 at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
 at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
 at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
 at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.Form.OnLayout(LayoutEventArgs levent)
 at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
 at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
 at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
 at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
 at System.Windows.Forms.Control.WmShowWindow(Message& m)
 at System.Windows.Forms.Control.WndProc(Message& m)
 at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
 at System.Windows.Forms.Form.WmShowWindow(Message& m)
 at System.Windows.Forms.Form.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)
 at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
 at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
 at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
 at System.Windows.Forms.Form.Show(IWin32Window owner)
 at JetBrains.UI.Controls.OwnedForm.Show()
 at JetBrains.PsiFeatures.UIInteractive.Refactorings.CommonUI.WorkflowHostWithWizardForm.ShowPage(IRefactoringPage page, Boolean hasBack)
 at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.InitPage(IRefactoringPage page)
 at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.FirstPage()
 at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.StartRefactoring()
 at JetBrains.ReSharper.Feature.Services.Refactorings.WorkflowExecuter.ExecuteWithCustomHost(IDataContext context, IRefactoringWorkflow refactoringWorkflow, IWorkflowHost host)
 at JetBrains.PsiFeatures.UIInteractive.Refactorings.CommonUI.WinformsRefactoringActionHostProvider.ExecuteRefactoring(IDataContext context, IRefactoringWorkflow workflow)
 at JetBrains.ReSharper.Feature.Services.Refactorings.RefactoringActionUtil.ExecuteRefactoring(IDataContext context, IRefactoringWorkflow refactoringWorkflow)
 at JetBrains.ReSharper.Refactorings.WorkflowNew.IntroduceWithOccurrencesAction`1.Execute(IDataContext context, IRefactoringWorkflow refactoringWorkflow)
 at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.<>c__DisplayClass7_1.<ExecuteGroup>b__4(Object args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass49_0.<InitViewModel>b__3(JetPopupMenuItem item)
 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.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.Application.UI.Controls.JetPopupMenu.Detail.JetPopupMenuDoc.ExecuteSelectedItem()
 at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.OnMouseUp(MouseEventArgs e)
 at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
 at System.Windows.Forms.Control.WndProc(Message& m)
 at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
 at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.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)
 at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
 at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.InternalPumpMessagesOnce()
 at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.JetBrains.Util.Concurrency.IJetDispatcherStaticMethods.Run(Func`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout)
 at JetBrains.UI.SrcView.Controls.JetPopupMenu.JetPopupMenuOverlordView.Show(Boolean isModal)
 at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowCore(JetPopupMenu menu, ShowWhen when, Boolean isModal, LifetimeDefinition lifetimeDefinitionOptional, IJetPopupMenuOverlordView parentView)
 at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.<>c__DisplayClass14_0.<ShowModal>b__0(LifetimeDefinition defMenu, Lifetime lifeMenu)
 at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILog logger)
 at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowModal(ShowWhen when, Action`2 FFillMenu)
 at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.ExecuteGroup(IDataContext context, IEnumerable`1 workflows)
 at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.Execute(IDataContext dataContext, DelegateExecute nextExecute)
 at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__23_0(Lifetime lt)
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass21_1.<PrepareRequirementsAsync>b__2()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass21_1.<PrepareRequirementsAsync>b__0()
 at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(OuterLifetime lifetime, Func`1 executeWhenRequirementsReady, Action`1 failWith)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
 at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass17_0.<CommandTargetExec>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
 at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.CommandTargetExec(CommandID commandid, OLECMDEXECOPT cmdExecOpt)
 at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass12_0.<.ctor>b__3(CommandID commandid, OLECMDEXECOPT opt, IntPtr in, IntPtr out)
 at JetBrains.VsIntegration.Shell.Package.VsPackageSdkStub.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidGroup, UInt32 nCmdId, UInt32 nCmdExcept, IntPtr vIn, IntPtr vOut)

RSRP-310047: Inconsistency with "Return statement is missing" / "code is heuristically unreachable" errors

$
0
0
Reporter Matt Richardson (mattrichardson) Matt Richardson (mattrichardson)
Created Jun 11, 2012 4:02:49 PM
Updated Jun 7, 2018 5:37:53 PM
Resolved Jun 7, 2018 5:36:51 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Fixed
Type Bug
Fix version 2018.2
Affected versions 6.1.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
With this code, I get a "code is heuristically unreachable" warning:

private static int Foo()
{
try
{
return 100;
}
catch (Exception)
{
Assert.Fail("Not expecting an exception");
return -1;
}
}

When I remove the "return -1" line, I get a "return statement is missing" error.

This happens in resharper 6.1.1000.82.

RSRP-413251: XUnit assertions: Incorrect analysis of heuristic unreachability

$
0
0
Reporter Jouni Heikniemi (jouniheikniemi) Jouni Heikniemi (jouniheikniemi)
Created Apr 21, 2014 8:11:57 AM
Updated Jun 7, 2018 5:38:56 PM
Resolved Jun 7, 2018 5:38:56 PM
Subsystem Code Analysis - Control Flow
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 8.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
In the following code snippet, everything below Assert.Null(order.Operation) is interpreted as heuristically unreachable, although it certainly is not. Assert.Null is XUnit's Assert.Null(object object).

private class Ob {
    internal string Text = "Whatever";
}

[Fact]
public void Foo() {

    Ob o = new Ob();
    int len = o.Text.Length; // Implies o.Text cannot be null

    SetValue(o); // But this may change things

    Assert.Null(o.Text);
    // Line below marked as unreachable
    o.Text = "This is really reachable";
}

private void SetValue(Ob ob) {
    ob.Text = null;
}

Edit: Replaced the original code sample with a (fairly) minimized test case that reproes this bug.

RSRP-434752: Unreachable code after NUnit's Assert.Fail() isn't greyed out

$
0
0
Reporter Alexandra Kuks (Asia.Rudenko) Alexandra Kuks (Asia.Rudenko)
Created Mar 6, 2015 2:55:26 PM
Updated Jun 7, 2018 5:39:57 PM
Resolved Jun 7, 2018 5:39:54 PM
Subsystem Code Analysis
Assignee Ivan Serduk (IvanSerduk)
Priority Major
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Screenshot attached, you can try with the following snippet:
class TestsWithTimeout
{
[Test, Timeout(1000)]
public void TestWithTimeout()
{
Assert.Pass();
Assert.Pass("Hi!");
Assert.Pass("Hello!", Equals(true));
Assert.Fail();
Assert.Fail("I just fail");
Assert.Fail("I fail with grace", Equals(true));
}
}
- everything after Assert.Pass() should be grey as it is after Assert.Fail().

RSRP-177778: falsely claims "expression is always false"

$
0
0
Reporter Corey Kosak (kosak) Corey Kosak (kosak)
Created Apr 9, 2010 6:53:58 PM
Updated Jun 7, 2018 5:42:15 PM
Subsystem Code Analysis - C#
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
R# falsely claims that "expression is always false", leading to incorrect warnings in Func1 and Func2.

Perhaps it is bad style for a property's value to change over time, but it is certainly not illegal.

This is version 5.0.1648.10


using System.Diagnostics;

namespace ConsoleApplication13 {
public class Program {
public static void Main() {
Func1();
Func2();
}

public static void Func1() {
var j=new Jerk();
if(j.Item==null) {
return;
}
if(j.Item==null) { //falsely claims "expression is always false"
Debug.WriteLine("R# incorrectly thinks this line is unreachable, but here I am");
}
}

public static void Func2() {
var j=new Jerk();
if(!(j.Item is string)) {
return;
}
if(!(j.Item is string)) { //falsely claims "expression is always false"
Debug.WriteLine("R# also incorrectly thinks this line is unreachable, but here I am");
}
}
}

public class Jerk {
private string lastItem="hello";

public object Item {
get {
var result=lastItem;
lastItem=null;
return result;
}
}
}
}

RSRP-304349: "possible null assignment" where null assigned symbol unreachable

$
0
0
Reporter lusitania (lusitania) lusitania (lusitania)
Created May 23, 2012 12:00:22 PM
Updated Jun 7, 2018 5:45:04 PM
Resolved Jun 7, 2018 5:45:04 PM
Subsystem Code Analysis
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Answered
Type Bug
Fix version Backlog
Affected versions 6.1.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
var reference = new StringReader(RegularIniFile); 
if(null==reference)
throw new AssertFailedException();

Assert.IsNotNull(reference);
var expectedLines = reference.ReadLine().Count();

reference.ReadLine() yields Possible 'null' assignment to an entity marked with 'Value cannot be null' attribute altough you can never run into a NULL. The Assert should have been enough but even the exlicit check is ignored.

RSRP-451389: Invalid unreachable code detection for "some == null"

$
0
0
Reporter Viacheslav Ivanov (_FRED_) Viacheslav Ivanov (_FRED_)
Created Nov 27, 2015 11:39:45 AM
Updated Jun 7, 2018 5:47:57 PM
Subsystem Code Analysis - Control Flow
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 10.0.1
Fixed In Version ReSharper Undefined
VsVersion VS 2015 RTM
Code in Main method under "if(thing == null)" treated as unreachable. This is wrong.

using System;

class Program
{
static void Main() {
var thing = new Thing();
if(thing == null) {
Console.WriteLine("thing == null");
}//if
}
}

class Thing
{
public override bool Equals(object obj) => true;
public override int GetHashCode() => 13;

public static bool operator ==(Thing x, Thing y) => true;
public static bool operator !=(Thing x, Thing y) => false;
}

RSRP-328412: Do not mess up conditionally unreachable code with code that is unreachable at all

$
0
0
Reporter Guest 256 (guest256) Guest 256 (guest256)
Created Jul 26, 2012 1:56:50 PM
Updated Jun 7, 2018 5:48:23 PM
Resolved Jun 7, 2018 5:48:23 PM
Subsystem Code Analysis - Control Flow
Assignee Ivan Serduk (IvanSerduk)
Priority Major
State Fixed
Type Feature
Fix version 2018.2
Affected versions 7.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
Say, you have the following code in debug configuration:

public void Foo(int value)
{
if (value == 42)
{
Debug.Fail("foo");
return; // ← heuristically unreachable code
}

// ...
}

Current: R# warns about unreachable code which isn't unreachable at all, but only unreachable in debug mode. User needs to use HeuristicUnreachableCode suppression every time, because both cases are treated as “unreachable at all”

Expected: R# allows to set separate warning level settings for conditionally unreachable code, so user is able to ignore such cases, but still see warnings for obvious unconditional redundancies. Default value for the new setting should be less than warning (for example, “Do not show” or “Hint”).

RSRP-422137: "Expression is always 'true' or 'false'" inspection is wrong

$
0
0
Reporter Thomas Piskol (thomas.piskol) Thomas Piskol (thomas.piskol)
Created Aug 25, 2014 7:09:09 PM
Updated Jun 7, 2018 5:49:07 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.2
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
For the following code it's reported, that the expression is always false.
But this is wrong, it's only false in "debug".
If the code is executed is under "release" it is possible that the expression is true.
So this suggestion is quite dangerous.

...
SomeComplexType localVariable = HelperClass.GetMeSomeType() as SomeComplexType;

Debug.Assert(localVariable != null, "bla bla");

if( localVariable == null)
{
doSomething();
}

RSRP-420029: Code compiles, but ReSharper shows an error.

$
0
0
Reporter Dmitry Gokun (Dmitry_Gokun) Dmitry Gokun (Dmitry_Gokun)
Created Jul 31, 2014 11:21:38 PM
Updated Jun 7, 2018 5:54:06 PM
Resolved Jun 7, 2018 5:54:04 PM
Subsystem Code Analysis - Solution-wide
Assignee Ivan Serduk (IvanSerduk)
Priority Major
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 8.2
Fixed In Version ReSharper Undefined
VsVersion VS 2012 RTM U2
JetBrains ReSharper 8.2 C# Edition
Build 8.2.0.2160 on 2014-03-20T17:53:08

Plugins: 2
  1. 1. “NuGet support for ReSharper” v1.3.0.35071 by JetBrains
  2. 2. “xUnit.net unit test provider” v1.6.2.19405 by “xunitcontrib Team”
Visual Studio 11.0.61030.0.

To reproduce:
1. Create a console C# project (.NET 4.5)
2. Add nuget reference "FluentAssertions" (current version 3.1.229, problem did not exist with version 3.0.107).
3. Type in this code:

using FluentAssertions;

namespace ConsoleApplication1
{
internal static class Program
{
private static void Main()
{
var x = new[] {1};

x.Should().Contain(v => v == 1);
}
}
}

Now, code compiles and runs just fine. But R#'s "Code Analysis" (with "Analyze errors in whole solution" enabled) complains about 1 error in the solution:

Solution ConsoleApplication1.sln
Project ConsoleApplication1
ConsoleApplication1\Program.cs:11 Cannot resolve method 'Contain(lambda expression)', candidates are:
FluentAssertions.AndConstraint<FluentAssertions.Collections.GenericCollectionAssertions<int>> Contain(System.Collections.Generic.IEnumerable<int>, params int[]) (in class SelfReferencingCollectionAssertions<int,GenericCollectionAssertions<int>>)
FluentAssertions.AndConstraint<FluentAssertions.Collections.GenericCollectionAssertions<int>> Contain(System.Collections.IEnumerable, string, params object[]) (in class CollectionAssertions<IEnumerable<int>,GenericCollectionAssertions<int>>)
FluentAssertions.AndWhichConstraint<FluentAssertions.Collections.GenericCollectionAssertions<int>,int> Contain(int, string, params object[]) (in class SelfReferencingCollectionAssertions<int,GenericCollectionAssertions<int>>)
FluentAssertions.AndWhichConstraint<FluentAssertions.Collections.GenericCollectionAssertions<int>,int> Contain(System.Linq.Expressions.Expression`1, string, params object[]) (in class SelfReferencingCollectionAssertions<int,GenericCollectionAssertions<int>>)

RSRP-419114: VB: 'if' is matched incorrectly when single-line and multi-line syntax are used together

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Jul 22, 2014 4:47:36 PM
Updated Jun 7, 2018 5:59:32 PM
Resolved Jun 7, 2018 5:59:30 PM
Subsystem Matching Elements
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 8.2.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
See attached screenshot.

RSRP-469130: Failed to unmarshal 20 at 612 An item with the same key has already been added.

$
0
0
Reporter Maltseva Ekaterina (Maltseva.Ekaterina) Maltseva Ekaterina (Maltseva.Ekaterina)
Created Apr 6, 2018 2:48:31 PM
Updated Jun 7, 2018 5:59:40 PM
Subsystem Platform - Project Model
Assignee Slava Tutushkin (slava.tutushkin)
Priority Normal
State Submitted
Type Exception
Fix version 2018.2
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 12 Hive _8ca9bb57 — JetBrains ReSharper Ultimate 2018.1 EAP 7 Build 112.0.20180406.62948-eap07

JetBrains dotCover 2018.1 EAP 7 Build 2018.1.20180406.82524-eap07
JetBrains dotMemory 2018.1 EAP 7 Build 2018.1.20180406.71202-eap07
JetBrains dotTrace 2018.1 EAP 7 Build 2018.1.20180406.71156-eap07
JetBrains ReSharper 2018.1 EAP 7 Build 2018.1.20180406.64659-eap07
JetBrains ReSharper C++ 2018.1 EAP 7 Build 2018.1.20180406.64407-eap07

SubProducts.0 = JetBrains dotCover 2018.1 EAP 7 Build 2018.1.20180406.82524-eap07
SubProducts.1 = JetBrains dotTrace 2018.1 EAP 7 Build 2018.1.20180406.71156-eap07
SubProducts.2 = JetBrains ReSharper C++ 2018.1 EAP 7 Build 2018.1.20180406.64407-eap07
SubProducts.3 = JetBrains ReSharper 2018.1 EAP 7 Build 2018.1.20180406.64659-eap07
SubProducts.4 = JetBrains dotMemory 2018.1 EAP 7 Build 2018.1.20180406.71202-eap07

Failed to unmarshal 20 at 622 An item with the same key has already been added.

— EXCEPTION #1/2 [ArgumentException]
Message = “An item with the same key has already been added.”
ExceptionPath = Root.InnerException
ClassName = System.ArgumentException
HResult = E_INVALIDARG=COR_E_ARGUMENT=80070057
Source = mscorlib
StackTraceString = “
 at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
 at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
 at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
 at JetBrains.ProjectModel.Model2.Assemblies.Impl.AssemblyCollection.AddAssembly(Assembly assembly)
 at JetBrains.ProjectModel.Persistence.Marshallers.AssemblyMarshaller.UnmarshallImpl(UnsafeReader reader, ProjectModelCaches projectModelCaches)
 at JetBrains.ProjectModel.Persistence.Marshallers.ProjectModelElementMarshallerBase`1.Unmarshall(UnsafeReader reader, ProjectModelCaches projectModelCaches)
 at JetBrains.ProjectModel.Persistence.UnsafeProjectModelElementMarshaller.Unmarshal(UnsafeReader reader)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Failed to unmarshal 20 at 622 An item with the same key has already been added.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.1 EAP 7 Build 112.0.20180406.62948-eap07”
Data.SubProducts.#0 = “JetBrains dotCover 2018.1 EAP 7 Build 2018.1.20180406.82524-eap07”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.1 EAP 7 Build 2018.1.20180406.71156-eap07”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.1 EAP 7 Build 2018.1.20180406.64407-eap07”
Data.SubProducts.#3 = “JetBrains ReSharper 2018.1 EAP 7 Build 2018.1.20180406.64659-eap07”
Data.SubProducts.#4 = “JetBrains dotMemory 2018.1 EAP 7 Build 2018.1.20180406.71202-eap07”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/wave12-eap7::b6d4fc267b98dd6dc689ea7e69e4dd615e877e0e


Platform\VisualStudio:
    git::refs/heads/wave12-eap7::354ded50254700719df3b367deb0035883f54de7

Data.VsVersion = 15.6.27428.2027
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.ProjectModel.Persistence.UnsafeProjectModelElementMarshaller.Unmarshal(UnsafeReader reader)
 at JetBrains.ProjectModel.Persistence.UnsafeProjectModelElementMarshaller.Unmarshal(UnsafeReader reader)
 at JetBrains.Application.PersistentMap.LevelDbMap`2.TryGetValue(TKey key, TValue& value)
 at JetBrains.Application.PersistentMap.OptimizedPersistentSortedMap`2.TryGetValue(TKey key, TValue& value)
 at JetBrains.ProjectModel.Persistence.ProjectModelCaches.<Load>b__20_0(Lifetime lifetime)
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
 at JetBrains.ProjectModel.Persistence.ProjectModelCaches.Load()
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocuments.VsSolutionManager10.<>c__DisplayClass5_0.<EnqueueLoadFromCache>b__0()
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.<>c__DisplayClass24_0.<ExecuteOneTask>b__1()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.ExecuteOneTask(SolutionLoadTask task)
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerAsync.ExecuteTask()
 at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerAsync.DispatchTasks(Boolean background)
 at JetBrains.ProjectModel.SolutionManagerBase.CreateSolutionInstance(SolutionElement solutionElement, SolutionInstance solutionInstance)
 at JetBrains.VsIntegration.ProjectDocuments.VSSolutionManager.<>c__DisplayClass37_0.<OpenVSSolution>b__0(Lifetime lifetime)
 at JetBrains.DataFlow.SequentialLifetimes.<>c__DisplayClass4_0.<Next>b__0(LifetimeDefinition definition, Lifetime lifetime)
 at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILog logger)
 at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
 at JetBrains.DataFlow.SequentialLifetimes.Next(Action`1 FNext)
 at JetBrains.VsIntegration.ProjectDocuments.VSSolutionManager.OpenVSSolution(Boolean openSolution, Boolean sync)
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocuments.VsSolutionManager10.<OnAfterBackgroundSolutionLoadComplete>b__15_1()
 at JetBrains.Application.Threading.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocuments.VsSolutionManager10.<OnAfterBackgroundSolutionLoadComplete>b__15_0()
 at JetBrains.Util.Concurrency.UnguardedCallbackMerger.<>c__DisplayClass8_0.<ExecuteOrQueueOrMerge>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuardEx.ExecuteOrQueue(ReentrancyGuard thіs, Lifetime lifetime, String name, Action F, TaskPriority priority)
 at JetBrains.Util.Concurrency.UnguardedCallbackMerger.ExecuteOrQueueOrMerge(Lifetime lifetimeQueue, String name, Action F)
 at JetBrains.Platform.VisualStudio.SinceVs10.ProjectDocuments.VsSolutionManager10.OnAfterBackgroundSolutionLoadComplete()
 at Microsoft.VisualStudio.Shell.Interop.IVsSolution.OpenSolutionFile(UInt32 grfOpenOpts, String pszFilename)
 at Microsoft.VisualStudio.PlatformUI.Packages.MRU.ExtensionMethods.TryOpenProject(IVsSolution solution, String projectPath, Guid projectGuid)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerAccessManager.<OpenLocalCodeContainerAsync>d__9.MoveNext()
 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerAccessManager.OpenLocalCodeContainerAsync(CodeContainer codeContainer)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerAccessManager.<OpenAsync>d__6.MoveNext()
 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerAccessManager.OpenAsync(CodeContainer codeContainer)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerListViewModel.<>c__DisplayClass17_0.<<OnOpen>b__0>d.MoveNext()
 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerListViewModel.<>c__DisplayClass17_0.<OnOpen>b__0()
 at Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob[T](Func`1 asyncMethod, JoinableTask job)
 at Microsoft.VisualStudio.Threading.JoinableTaskFactory.RunAsync(Func`1 asyncMethod, Boolean synchronouslyBlocking, JoinableTaskCreationOptions creationOptions, Delegate entrypointOverride)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerListViewModel.OnOpen(CodeContainerViewModelBase codeContainerViewModel)
 at Microsoft.VisualStudio.PlatformUI.CodeContainerViewModelBase.<>c__DisplayClass49_0.<.ctor>b__0(Object o)
 at Microsoft.VisualStudio.PlatformUI.DelegateCommand.Execute(Object parameter)
 at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
 at System.Windows.Controls.Primitives.ButtonBase.OnClick()
 at System.Windows.Controls.Button.OnClick()
 at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
 at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
 at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
 at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
 at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
 at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
 at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
 at System.Windows.Input.InputManager.ProcessStagingArea()
 at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
 at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
 at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
 at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at System.Windows.Interop.HwndSource.InputFilterMessage(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-468890: Index was outside the bounds of the array.

$
0
0
Reporter Patrick Davis (poodle2000) Patrick Davis (poodle2000)
Created Mar 2, 2018 4:07:43 PM
Updated Jun 7, 2018 6:00:22 PM
Subsystem Smart copy-paste
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Submitted
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 12 Hive _1a8e4269 — JetBrains ReSharper Ultimate 2018.1 EAP 1 Build 112.0.20180222.102651-eap01

JetBrains ReSharper 2018.1 EAP 1 Build 2018.1.20180222.104120-eap01

Index was outside the bounds of the array.

— EXCEPTION #1/2 [IndexOutOfRangeException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root.InnerException
ClassName = System.IndexOutOfRangeException
HResult = COR_E_INDEXOUTOFRANGE=80131508
Source = JetBrains.ReSharper.Feature.Services
StackTraceString = “
 at JetBrains.ReSharper.Feature.Services.Clipboard.CopyPasteAssistManager.CoerceRangeAfterPaste(String pastedText, DocumentRange documentRange)
 at JetBrains.ReSharper.Feature.Services.Clipboard.CopyPasteAssistManager.CoerceRangeAfterPaste(String pastedText, DocumentRange documentRange)
 at JetBrains.ReSharper.Feature.Services.Clipboard.CopyPasteAssistManager.DoPaste(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardHandler.HandleAction(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardActionHandler.Execute(Int32 handlerIndex, IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardActionHandler.<>c__DisplayClass5_0.<Execute>b__0()
 at JetBrains.ReSharper.InplaceRefactorings.CutCopyPaste.CopyPasteManager.DoPaste(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardHandler.HandleAction(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardActionHandler.Execute(Int32 handlerIndex, IDataContext context, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.Clipboard.ClipboardActionHandler.Execute(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
 at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.<>c__DisplayClass5_1.<Execute>b__0()
 at JetBrains.ReSharper.Feature.Services.TypingAssist.ActionContext.CallNext()
 at JetBrains.ReSharper.Feature.Services.TypingAssist.TypingAssistManager.ChainedContextBase`2.CallNext()
 at JetBrains.ReSharper.Feature.Services.TypingAssist.TypingAssistManager.Handle[TContext,THandler](TContext context, List`1 handlers, ChainedContextBase`2 chainedContextFactory)
 at JetBrains.ReSharper.Feature.Services.TypingAssist.TypingAssistManager.Act(ITextControl textControl, String actionId, DelegateExecute nextExecute)
 at JetBrains.ReSharper.Feature.Services.TypingAssist.ExternalActionHandler.Execute(IDataContext context, DelegateExecute nextExecute)
 at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__23_0(Lifetime lt)
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass21_0.<PrepareRequirementsAsync>b__1()
 at JetBrains.Util.Logging.Logger.Catch(Action action)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.1 EAP 1 Build 112.0.20180222.102651-eap01”
Data.SubProducts.#0 = “JetBrains ReSharper 2018.1 EAP 1 Build 2018.1.20180222.104120-eap01”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/wave12-eap1

Platform\VisualStudio:
    git::refs/heads/wave12-eap1::9d28b6e35c395cef932aff004f5d3c2c8e6b14c2

Data.VsVersion = 15.5.27130.2027
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass21_0.<PrepareRequirementsAsync>b__0()
 at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(OuterLifetime lifetime, Func`1 executeWhenRequirementsReady, Action`1 failWith)
 at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.<>c__DisplayClass26_0.<TryDelegateToTypingHandlers_NonTyping>b__0()
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.WithRegisteredDelegateBackToVsHandler(String sCommandName, Action`1 FExecDelegateBackToVs, Action FRun)
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.TryDelegateToTypingHandlers_NonTyping(CommandID commandid, Action`1 FExecDelegateBackToVs)
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.TryDelegateToTypingHandlers(Boolean bIsTyping, CommandID commandid, IntPtr pvaIn, Action`1 FExecDelegateBackToVsClosed)
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.<>c__DisplayClass29_0.<Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
 at JetBrains.VsIntegration.TextControl.VsTextControlOleCommandTarget.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& pguidCmdGroupRef, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)

RSRP-470109: Adding InspectCode CLT task as after-build target to .NET Core .csproj breaks R# Build

$
0
0
Reporter Andrey Simukov (Andrey.Simukov) Andrey Simukov (Andrey.Simukov)
Created Jun 7, 2018 5:48:00 PM
Updated Jun 7, 2018 6:08:07 PM
Subsystem Solution builder
Assignee Anton Spilnyy (Anton.Spilnyy)
Priority Critical
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.1.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
Just add the target to csproj:

    <Target Name="InspectCode" AfterTargets="Build"> 
<InspectCode SolutionFile="$(SolutionPath)" IncludedProjects="$(ProjectName)" />
</Target>

VS builds such solution. R# Build says
Build failed without errors.


without the target:

target added:
Viewing all 106942 articles
Browse latest View live


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