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

RSRP-329967: "Add 'base.' to property name." action for 'Virtual member call in constructor'

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Sep 14, 2012 5:14:59 PM
Updated Oct 9, 2018 2:50:24 PM
Subsystem Quick Fixes
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
For 'Virtual member call in constructor' I would recommend an additional (and probably default) action, which in my case seems the most common correct fix: "Add 'base.' to property name."

RSRP-329979: No quick fix for "Explicit argument passed to parameter with caller info attribute" warning

$
0
0
Reporter Thomas Levesque (Thomas.Levesque) Thomas Levesque (Thomas.Levesque)
Created Sep 15, 2012 4:31:43 AM
Updated Oct 9, 2018 2:53:12 PM
Resolved Oct 9, 2018 2:53:12 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions 7.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Consider the following code:

        private int _foo;
public int Foo
{
get { return _foo; }
set
{
if (value != _foo)
{
_foo = value;
OnPropertyChanged("Foo"); // warning here
}
}
}


The OnPropertyChanged method is declared as follows:

        protected void OnPropertyChanged([CallerMemberName] string propertyName = null)

Resharper shows the following warning on "Foo":

Explicit argument passed to parameter with caller info attribute


But there is no quick fix for this; it would be useful to add a quick fix to remove the redundant argument (if and only if it has the same value as the one that would be passed implicitly).

RSRP-330074: insert using at correct position

$
0
0
Reporter Christian Helmbold (cryptos_de) Christian Helmbold (cryptos_de)
Created Sep 21, 2012 2:33:26 PM
Updated Oct 9, 2018 2:56:19 PM
Resolved Oct 9, 2018 2:56:19 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Unspecified
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
If a C# using is added via Alt+Enter it is often placed at the (alphabetically) wrong position. A second step to order the using is required though.

Please let ReSharper insert the usings at correct positions.

RSRP-330179: "Introduce and initialize field" doesn't respect the use of "this" setting

$
0
0
Reporter Rob Richardson (robrich) Rob Richardson (robrich)
Created Sep 25, 2012 10:31:33 PM
Updated Oct 9, 2018 2:59:23 PM
Resolved Oct 9, 2018 2:59:23 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 7.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Repro steps:

a. ReSharper -> Options -> Code Editing -> C# -> Formatting Style -> Other -> Force "this." qualifier for instance members -> set to "Use Always" -> click Save

b. Create a class definition like so:

    public class Class1 {
        public Class1(string Parameter) {
            
        }
    }

(omitting namespace and using statements for brevity)

c. Mouse over "Parameter", click Alt - Enter to bring up the context menu, and choose Introduce and initialize field 'parameter'

d. Note the now modified code looks like this:

    public class Class1 {
        private readonly string parameter;

        public Class1(string Parameter) {
            parameter = Parameter;
        }
    }

Note that it should look like this:

    public class Class1 {
        private readonly string parameter;

        public Class1(string Parameter) {
            this.parameter = Parameter;
        }
    }

(note the only difference is the expected code has an additional "this.".)

RSRP-471424: Invoking "Go to next location" may permanently hide caret

$
0
0
Reporter Olga Rodygina (olgarodygina) Olga Rodygina (olgarodygina)
Created Sep 7, 2018 2:53:06 PM
Updated Oct 9, 2018 3:05:31 PM
Subsystem Navigation - Search (Find Usages)
Assignee Alexander Ulitin (alexander.ulitin)
Priority Normal
State Fixed In Branch
Type Bug
Fix version No Fix versions
Affected versions 2018.2.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
void DoSomething(){}
int main()
{
DoSomething();
return 0;
}


1) Regular case:
Put caret on "DoSomething"
ReSharper->Find->Highlight usages in file
ReSharper->Find->Go to next location
Everything is fine.

2) Irregular case:
Remove any highlighting in file
When caret disappears (due to its natural flickering) invoke "ReSharper->Find->Go to next location" using keyboard shortcut.

Expected: nothing happens
Actual: caret permanently disappears

In fact, caret is always there but for some reasons it is not rendered, it means we are able to write symbols and even move invisible caret (looks really weird).
Mouse click in document makes caret visible again.
https://gfycat.com/ru/WateryJaggedDassierat

RSRP-330953: Incorrect LINQ suggestion

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Oct 9, 2012 12:27:24 PM
Updated Oct 9, 2018 3:08:26 PM
Resolved Oct 9, 2018 3:08:26 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Duplicate
Type Bug
Fix version Backlog
Affected versions 7.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Resharper suggests to refactor
            var enumerators = new List<IEnumerator<DateTimeInterval>>();

foreach (var e in Domains.Select(d => d.GetReverseEnumerator()))
{
if (!e.MoveNext())
{
yield break;
}

enumerators.Add(e);
}
to
            var enumerators = Domains.Select(d => d.GetReverseEnumerator()).TakeWhile(e => e.MoveNext()).ToList();
It would seem the 'yield break' is treated as a 'break'

RSRP-299082: Yield keyword should be considered for Convert to Linq Expression

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created May 2, 2012 5:32:43 PM
Updated Oct 9, 2018 3:10:06 PM
Subsystem Code Analysis - Linq Tools
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 6.1.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have Resharper trying to convert:
        foreach (TElement element in ElementFinder.FindAll())
yield return element;
to:
        return ElementFinder.FindAll().Cast<TElement>();

Doesn't this cause problems WRT the yield keyword?

RSRP-332123: Warning :: "Empty For Loop Is Redundant": Missing QFix

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Oct 17, 2012 11:32:09 PM
Updated Oct 9, 2018 3:11:32 PM
Subsystem Quick Fixes
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
Should have a QFix for removing the redundant code.

RSRP-471313: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was r

$
0
0
Reporter ReSharper anonymous (resharper) ReSharper anonymous (resharper)
Created Aug 28, 2018 4:18:10 PM
Updated Oct 9, 2018 3:28:42 PM
Resolved Oct 9, 2018 3:28:42 PM
Subsystem Licensing and Evaluation
Assignee Sergey Kuks (coox)
Priority Critical
State Fixed
Type Exception
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _f9c9cb7b — JetBrains ReSharper Ultimate 2018.2 Build 182.0.20180821.113637

JetBrains ReSharper 2018.2 Build 2018.2.20180821.115000

A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

— EXCEPTION #1/3 [FormatException]
Message = “The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.”
ExceptionPath.1 = Root.InnerException.InnerException
ExceptionPath.2 = Root.InnerException.InnerExceptions.#0
ClassName = System.FormatException
HResult = COR_E_FORMAT=80131537
Source = mscorlib
StackTraceString = “
 at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
 at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
 at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
 at System.Convert.FromBase64String(String s)
 at JetBrains.Application.License2.NewLicenses.BlackListAndCrl.Decode[T](String response, CertificateRevocationList crl, Func`3 fetchData)
 at JetBrains.Application.License2.NewLicenses.BlackListAndCrl.DecodeBl(String responseBl)
 at JetBrains.Application.License2.NewLicenses.BlackListAndCrl.<>c__DisplayClass14_1.<.ctor>b__1()
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass30_0.<QueueRecurring>b__1(DateTime time)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass30_1.<QueueRecurring>b__3()
 at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
 at System.Threading.Tasks.Task.InnerInvoke()
 at System.Threading.Tasks.Task.Execute()


— Outer —

— EXCEPTION #2/3 [AggregateException]
Message = “A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.”
ExceptionPath = Root.InnerException
ClassName = System.AggregateException
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = COR_E_EXCEPTION=80131500
InnerExceptions.#0 = “Exception #1 at Root.InnerException.InnerException”

— Outer —

— EXCEPTION #3/3 [LoggerException]
Message = “A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.”
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 Build 182.0.20180821.113637”
Data.SubProducts.#0 = “JetBrains ReSharper 2018.2 Build 2018.2.20180821.115000”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/182-eap9-rtm::24155adb8cb5edf92658bd59db8b52fc0659cfb3


Platform\VisualStudio:
    git::refs/heads/182-eap9-rtm

Data.VsVersion = 15.8.28010.2003
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Application.Threading.Tasks.TaskHost.OnUnobservedTaskException(Object sender, UnobservedTaskExceptionEventArgs args)
 at JetBrains.Application.Threading.Tasks.TaskHost.OnUnobservedTaskException(Object sender, UnobservedTaskExceptionEventArgs args)
 at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
 at System.Threading.Tasks.TaskScheduler.PublishUnobservedTaskException(Object sender, UnobservedTaskExceptionEventArgs ueea)
 at System.Threading.Tasks.TaskExceptionHolder.Finalize()

RSRP-333636: R# duplicates variable name while copying foreach @-prefixed variable from local to closure via QF

$
0
0
Reporter Anton Lobov (Anton.Lobov) Anton Lobov (Anton.Lobov)
Created Oct 30, 2012 10:20:26 AM
Updated Oct 9, 2018 3:35:30 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 7.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Code:

        foreach (var @var in vars)
{
Foo(() => Console.WriteLine(@var));
}

R# suggests to create local copy of "@var" used in Console.WriteLine.
(Access to foreach variable in closure may lead to different compiler behaviour.)

If I apply corresponding QF, I get red code, because created by R# copy-variable name is the same as the original name:

        foreach (var @var in vars)
{
string @var = @var;
Foo(() => Console.WriteLine(@var));
}

RSRP-471791: Indent mismatch

$
0
0
Reporter Maltseva Ekaterina (Maltseva.Ekaterina) Maltseva Ekaterina (Maltseva.Ekaterina)
Created Oct 9, 2018 3:31:16 PM
Updated Oct 9, 2018 3:39:51 PM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Major
State Submitted
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 183 Hive _8ca9bb57ReSharper — JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.231709-eap02d

JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.232820-eap02d
JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.232819-eap02d

Indent mismatch

— EXCEPTION #1/2 [AssertionException]
Message = “Indent mismatch”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Platform.RdCore
StackTraceString = “
 at JetBrains.Util.Assertion.Assert(Boolean condition, String message)
 at JetBrains.Util.Assertion.Assert(Boolean condition, String message)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.AutoDetectIndentingStage`2.CheckIndentAndCreateNewHolder(ITreeNode current)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.AutoDetectIndentingStage`2.FindAndProcessIndentingRegions(IndentType startTypes)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.JetBrains.ReSharper.Psi.Impl.CodeStyle.ISequentialNodeProcessor<TSettingsKey>.ProcessDescendIntoNode()
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.DoProcessDescendIntoNode()
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.IterateOnce(ITreeNode untilNode, IteratorState untilState)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.Iterate(ITreeNode untilNode, IteratorState untilState)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.IterateWithProgress(ITreeNode untilNode, IteratorState untilState, String name, IProgressIndicator progress)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.DoIndent(ITreeNode onlyChange, IProgressIndicator progressIndicator, String taskName)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.DoIndent(Boolean allowNoLinebreaks)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase`1.DoAutoDetectFormat[TContext](ITreeNode firstElement, ITreeNode lastElement, CodeFormatProfile profile, FormatterInfoProviderBase`2 provider, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.CSharp.Impl.CodeStyle.Formatter.CSharpCodeFormatter.AutoDetectFormat(ITreeNode firstElement, ITreeNode lastElement, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.FormatterImplHelper.AutoDetectFormat(IFile file, TreeTextRange range, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.CodeStyle.CodeFormatterHelper.AutoDetectFormat(PsiLanguageType languageType, ISolution solution, DocumentRange docRange, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Intentions.Formatting.DocumentRangeBoundCodeFormatter.AutoDetectFormat(Lifetime lifetime, IProgressIndicator progress, IContextBoundSettingsStore settingsStore)
 at JetBrains.ReSharper.Intentions.Formatting.AutoDetectFormatViewModel.<>c__DisplayClass3_0.<AutoDetectFormat>b__1(IProgressIndicator progress)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Indent mismatch”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = UiTaskExecutorWorker
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.231709-eap02d”
Data.SubProducts.#0 = “JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.232819-eap02d”
Data.SubProducts.#1 = “JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.232820-eap02d”
Data.SccRevisionEnv = “
Platform\Core\Shell,
Platform\VisualStudio:
    git::refs/heads/183-autodetect-formatter-settings

Data.VsVersion = 15.8.28010.2041
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.<>c__DisplayClass11_0.<RunStartTask>b__0()
 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)
 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()
 at JetBrains.Threading.JetDispatcher.<>c__DisplayClass22_1.<CreateDispatcherThread>b__1()
 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-334826: "convert part of body to LINQ expression" quickfix removes local variable copy

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Nov 8, 2012 1:17:32 PM
Updated Oct 9, 2018 3:43:19 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 7.1 EAP, 7.0.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
This refactoring case creates access to a foreach variable within a closure, where there was previously was none.

(variable "anInt")

initial code:
            foreach (var v in tn.GetAnInt())
{
if (v > 0)
{
int anInt = v;
ti = new foo();
ti.Event += (o, ie) => tn.Huzzah(anInt);
}
}

refactor'd code (foreach: convert part of body to linq expression)
            foreach (int anInt in tn.GetAnInt().Where(v => v > 0))
{
ti = new foo();
ti.Event += (o, ie) => tn.Huzzah(anInt);
}

R# then (correctly, IMO) recommends creating a local variable copy of the "anInt" variable, which it just removed in the re-factor.

RSRP-335470: "Fix all" QF action in Inspection Results

$
0
0
Reporter Anton Lobov (Anton.Lobov) Anton Lobov (Anton.Lobov)
Created Nov 14, 2012 11:51:37 AM
Updated Oct 9, 2018 3:48:24 PM
Subsystem Quick Fixes
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 would very love the feature if I could do "fix all" just from Inspection Results window, or apply individual same QFs for several issues at once from there, without the need to navigate to the code.

Currently I need to navigate to each issue and apply corresponding QF.
(see current.png and current-qf.png)

It would be much easier if there will be an ability to apply common QFs to all the similar issues, and if there will be some wizard to guide me through the process of fixing all issues in solution without the need to navigate to each and apply QF manually if something could be solved automatically.
(see dream.png and dream2.png)

RSRP-471792: Indent mismatch

$
0
0
Reporter Maltseva Ekaterina (Maltseva.Ekaterina) Maltseva Ekaterina (Maltseva.Ekaterina)
Created Oct 9, 2018 3:49:44 PM
Updated Oct 9, 2018 3:51:01 PM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Major
State Submitted
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 183 Hive _8ca9bb57ReSharper — JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.231709-eap02d

JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.232820-eap02d
JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.232819-eap02d

Indent mismatch

— EXCEPTION #1/2 [AssertionException]
Message = “Indent mismatch”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Platform.RdCore
StackTraceString = “
 at JetBrains.Util.Assertion.Assert(Boolean condition, String message)
 at JetBrains.Util.Assertion.Assert(Boolean condition, String message)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.AutoDetectIndentingStage`2.CheckIndentAndCreateNewHolder(ITreeNode current)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.AutoDetectIndentingStage`2.IndentNode(ITreeNode prevNode, ITreeNode current, Boolean reallyIndent)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.DoProcessNextSolidNode(FormattingRangeContext context, Boolean fromFirstMacroOnLine)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.ProcessNextSolidNode(FormattingRangeContext context)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.IterateOnce(ITreeNode untilNode, IteratorState untilState)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.Iterate(ITreeNode untilNode, IteratorState untilState)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.SequentialNodeIterator`2.IterateWithProgress(ITreeNode untilNode, IteratorState untilState, String name, IProgressIndicator progress)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.DoIndent(ITreeNode onlyChange, IProgressIndicator progressIndicator, String taskName)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.IndentingStage`2.DoIndent(Boolean allowNoLinebreaks)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.CodeFormatterBase`1.DoAutoDetectFormat[TContext](ITreeNode firstElement, ITreeNode lastElement, CodeFormatProfile profile, FormatterInfoProviderBase`2 provider, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.CSharp.Impl.CodeStyle.Formatter.CSharpCodeFormatter.AutoDetectFormat(ITreeNode firstElement, ITreeNode lastElement, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.Impl.CodeStyle.FormatterImplHelper.AutoDetectFormat(IFile file, TreeTextRange range, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Psi.CodeStyle.CodeFormatterHelper.AutoDetectFormat(PsiLanguageType languageType, ISolution solution, DocumentRange docRange, CodeFormatProfile profile, AdditionalFormatterParameters parameters)
 at JetBrains.ReSharper.Intentions.Formatting.DocumentRangeBoundCodeFormatter.AutoDetectFormat(Lifetime lifetime, IProgressIndicator progress, IContextBoundSettingsStore settingsStore)
 at JetBrains.ReSharper.Intentions.Formatting.AutoDetectFormatViewModel.<>c__DisplayClass3_0.<AutoDetectFormat>b__1(IProgressIndicator progress)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Indent mismatch”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = UiTaskExecutorWorker
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.231709-eap02d”
Data.SubProducts.#0 = “JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.232819-eap02d”
Data.SubProducts.#1 = “JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.232820-eap02d”
Data.SccRevisionEnv = “
Platform\Core\Shell,
Platform\VisualStudio:
    git::refs/heads/183-autodetect-formatter-settings

Data.VsVersion = 15.8.28010.2041
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.RunStartTaskCallTaskAction(IProperty`1 isDone, ProgressIndicator progressIndicator, TaskThreadAffinity taskThreadAffinity, Action`1 FTask, JetDispatcher dispatcherPrimary)
 at JetBrains.UI.SrcView.Progress.UITaskExecutorRun.<>c__DisplayClass11_0.<RunStartTask>b__0()
 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)
 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()
 at JetBrains.Threading.JetDispatcher.<>c__DisplayClass22_1.<CreateDispatcherThread>b__1()
 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-335548: Refactoring Array (not array[]) foreach -> for generates bad code

$
0
0
Reporter Ian Jirka (ianjirka) Ian Jirka (ianjirka)
Created Nov 15, 2012 2:52:14 AM
Updated Oct 9, 2018 3:51:28 PM
Resolved Oct 9, 2018 3:51:28 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions 7.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Array enumValues = Enum.GetValues(typeof (Foo));
foreach( Foo fooValue in enumValues)
{
doWork( fooValue );
}

changes to:

Array enumValues = Enum.GetValues(typeof (Foo));
for (int i = 0; I < enumValues.Count; I++ )
{
doWork(enumValues[I])
}

where .Count and [I] are inaccessable. It should be:

Array enumValues = Enum.GetValues(typeof (Foo));
for (int i = 0; I < enumValues.Length; I++ )
{
doWork((Foo)((IList)enumValues)[I])
}

RSRP-335630: Add quick fix for cref tag in interface's xml doc

$
0
0
Reporter Guest 256 (guest256) Guest 256 (guest256)
Created Nov 15, 2012 7:45:26 PM
Updated Oct 9, 2018 3:52:56 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 7.0.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
For class hierarchy quick fix for “cref” works and R# detects pointing to member of base class.
It's expected to work for interfaces too.

    // Sample 1, works fine
class BaseClass
{
public string Name { get; set; }
}

class DerivedClass : BaseClass
{
/// <seealso cref="Name"/> // context action suggests 'BaseClass.Name'
public string Nick { get; set; }
}


// Sample 2, doesn't work
interface IBaseInterface
{
string Name { get; }
}

interface IDerivedInterface : IBaseInterface
{
/// <seealso cref="Name"/> // context action isn't available, R# just says that symbol cannot be resolved
string Nick { get; }
}

RSRP-336009: Replace with Single Assignment drops variable Type on Fix

$
0
0
Reporter erik berg (erikberg) erik berg (erikberg)
Created Nov 22, 2012 11:34:31 AM
Updated Oct 9, 2018 3:59:02 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 7.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Reshaper correctly identifies Replace with Single Assignment. However the auto fix drops the existing variable in vb.net.

Example:

Dim b As Boolean = False

If (objectName.stringProperty.ToLower.Contains("D")) Then
b = True
End If

Output:

Dim b = objectName.stringProperty.ToLower.Contains("D")) ' no as Boolean

RSRP-336223: Quickfix for adding [UsedImplicitly] annotation

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Nov 30, 2012 4:15:53 PM
Updated Oct 9, 2018 4:02:04 PM
Resolved Oct 9, 2018 4:02:04 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions 7.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Please add quickfix for 'paramater is never used' and 'method/variable is never user' error to add [UsedImplicitly] annotation.

RSRP-336477: Method with optional parameter is hidden by overload: options for removing the redundant method is missing

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Dec 11, 2012 3:30:49 PM
Updated Oct 9, 2018 4:09:49 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 7.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
This code provides a warning:
        public bool SetValues(ResetUpdate newValues)
{
return SetValues(newValues, string.Empty, -1);
}

public RequestResponse SetValues(ResetUpdate newValues, string idField = "", long id = -1)
{
var response = new RequestResponse();
return response;
}
However, the options do not included removing the redundant method - I would expect it to do that since it offers it for most other redundancies?

RSRP-336600: vb.net qf for "member shadows overridable member" lack option to insert that override, only have options to insert overload and shadow

$
0
0
Reporter Anton Lobov (Anton.Lobov) Anton Lobov (Anton.Lobov)
Created Dec 14, 2012 3:39:05 PM
Updated Oct 9, 2018 4:13:45 PM
Resolved Oct 9, 2018 4:13:45 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Duplicate
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
For C#, if method with the same signature is defined without override keyword, QF suggests either to use "new" or to override.

For VB.Net, if method with the same signature is defined without Overrides keyword, QF suggests only Overloads and Shadows, but not Overrides. Not so good, because user needs to do it manually.
Viewing all 106942 articles
Browse latest View live


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