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

RSRP-384610: "Initialize property from ctor param" is missing

$
0
0
Reporter T (thymin) T (thymin)
Created Aug 29, 2013 9:01:38 PM
Updated Oct 10, 2018 4:14:38 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Code:

public class ActionQuicklinksBar : IQuicklinksBar
{
public string ID { get; private set; }
public string DisplayOrder { get; private set; }
public string ControllerName { get; private set; }
public string ActionName { get; private set; }
public string AreaName { get; private set; }
public Type ControllerType { get; private set; }
public Func<bool> ShouldRender { get; private set; }

public ActionQuicklinksBar(string id, string displayOrder, string controllerName, string actionName, string areaName, Type controllerType)
{
ID = id;
DisplayOrder = displayOrder;
ControllerName = controllerName;
ActionName = actionName;
AreaName = areaName;
ControllerType = controllerType;
}
}

Now place the caret inside of "ShouldRender" (the property). The Resharper menu should now offer "Initialize property from ctor param" like it did in R#7. This menu item is missing. It appears the functionality is inaccessible.

Update: the menu item appears once the solution analysis is completed for the current file. This is undesirable because might take a while. It destroys the productivity gains stemming from this feature.

I wish the menu item was always available.

RSRP-385005: Lambda not simplified when used with extension method

$
0
0
Reporter Dmitri Nesteruk (dnesteruk) Dmitri Nesteruk (dnesteruk)
Created Sep 2, 2013 2:07:23 PM
Updated Oct 10, 2018 4:16:28 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharper typically offers to turn Foo(x => x.Bar()) to Foo(Bar) but it seems like for extension methods it does not. Here is an example:

public static bool ContainsWildcardCharacter(this string s)
{
return s.Any(c => c.IsWildcardCharacter());
}

public static bool IsWildcardCharacter(this char c)
{
return c == '*' || c == '?';
}

RSRP-386616: "Use object initializer" not available with using

$
0
0
Reporter T (thymin) T (thymin)
Created Sep 12, 2013 4:38:35 PM
Updated Oct 10, 2018 4:21:06 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Code:

using (var cmd = new SqlCommand(cmdText, conn))
{
cmd.Transaction = tran; //#1
}

The statement #1 can be transformed to use an object initializer:

using (var cmd = new SqlCommand(cmdText, conn) { Transaction = tran })

The refactoring, however, is not available when putting the caret on line #2. I request as a feature that it be made available.

RSRP-471802: Lock or assert lock when changing FormatterInfoProviderBase lists (like myFormattingRules)

$
0
0
Reporter Dmitry Osinovsky (Dmitry.Osinovsky) Dmitry Osinovsky (Dmitry.Osinovsky)
Created Oct 10, 2018 4:47:35 PM
Updated Oct 10, 2018 4:48:27 PM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Show-stopper
State Submitted
Type Bug
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

RSRP-388093: Replace with ?? suggestion

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Oct 3, 2013 10:33:14 AM
Updated Oct 10, 2018 4:51:48 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 8.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Here is a strange feature: For this code, R# suggests replacing it with ??:
if (_abdaMeldungstyp == null) { 
_abdaMeldungstyp = BusinessContext.Instance.FindOne<IAbdaMeldungstyp>(...);
}
return _abdaMeldungstyp;
But the resulting ?? contains an assigment in one branch - not really good code.

Suggestion: R# should have different hint levels for ?? replacements that are side-effect free (e.g. a == null ? b : a —-> a ?? b - a good suggestion) and ?? replacements that require side effects - I'dlike to switch these off.

RSRP-389736: Resharper breaks code when adding xml-doc comment to enum

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Oct 25, 2013 3:31:56 PM
Updated Oct 10, 2018 4:58:50 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 8.0.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Steps to reproduce on R# with default settings:
1. Create C# project and enable XML documentation in "Build"
2. Create new code file to project and add following code to it:
public enum Enum1 
{
Value1, Value2
}
3. Notice that added code is underlined with message "Missing XML comment for publicly visible type or member"
4. Select "Value2" and apply "Add xml-doc comments" refactoring
5. See the result:
public enum Enum1 
{
Value1, /// <summary>
Value1, ///
Value1, /// </summary>
Value1, Value2
}

RSRP-391763: C# improper code generated from if reduce nesting

$
0
0
Reporter kevin supinger (kevin_supinger) kevin supinger (kevin_supinger)
Created Nov 8, 2013 1:33:41 AM
Updated Oct 10, 2018 5:04:58 PM
Resolved Oct 10, 2018 5:04:58 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
original code
var select = _directCalcList.FirstOrDefault(x => x.Equals(item));
if (select != null)
{
if (select.IsSpecialSelection)
select.IsSpecialSelection = false;
else
select.IsSpecialSelection = true;
}
generated code
var select = _directCalcList.FirstOrDefault(x => x.Equals(item));
if (@select == null) return;
@select.IsSpecialSelection = !@select.IsSpecialSelection;

only happens when the var is named select. This is a Silverlight 5 project at Microsoft. Resharper 8.0/VS2013

RSRP-392616: Incorrect fix proposal for class implementing IEnumerable

$
0
0
Reporter Anders Gustafsson (cureos) Anders Gustafsson (cureos)
Created Nov 13, 2013 12:19:58 PM
Updated Oct 10, 2018 5:14:13 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 8.0
Fixed In Version ReSharper Undefined
VsVersion VS10 (2010)
I have a class Foo that implements IEnumerable<int> and where the underlying collection consists of an int array.

Upon implementing the generic GetEnumerator method for the class, I "naïvely" return the enumerator of the int array, but then the following error is displayed:


I then take a look at what fix(es) R# proposes in this case:


But, if I apply this proposed solution, I get the following error (tested in LinqPad):


A more correct fix proposal in this case would instead be to cast the int array to IEnumerable<int> before invoking its GetEnumerator method:


The same issue applies to the generic case where the class implements IEnumerable<T>.

RSRP-471784: Testrunner behaves fishy combining TestFixtureSource and Values

$
0
0
Reporter Roger Kratz (rogerkratz) Roger Kratz (rogerkratz)
Created Oct 8, 2018 5:05:44 PM
Updated Oct 10, 2018 5:45:26 PM
Subsystem Unit Testing
Assignee Eugene Strizhok (Eugene.Strizhok)
Priority Normal
State Fixed In Branch
Type Bug
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Same problem as in Rider, reported here
https://youtrack.jetbrains.com/issue/RIDER-20422

RSRP-400758: Comparing floating point numbers: Constant "TOLERANCE" should be "Tolerance" if naming styles is "UpperCamelCase"

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Dec 19, 2013 1:51:37 PM
Updated Oct 10, 2018 5:53:34 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 8.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
We have
        if (varA == varB)
{

}

varA and varB are float.

ReSharper suggests "Comparing differences with Epsilon" and generates:
        if (Math.Abs(varA - varB) < TOLERANCE)
{

}


As you see constant TOLERANCE is in UpperCase, even if naming styles for constants is UpperCamelCase.

RSRP-469298: Component descriptor JetBrains.ReSharper.Psi.Modules.PsiModules [Singleton, Disposed] is disposed and cannot be accessed

$
0
0
Reporter Alexander Petrovsky (apetrov2) Alexander Petrovsky (apetrov2)
Created Apr 17, 2018 6:35:25 PM
Updated Oct 10, 2018 5:53:58 PM
Resolved Oct 10, 2018 5:53:58 PM
Subsystem Live Templates
Assignee Slava Tutushkin (slava.tutushkin)
Priority Critical
State Fixed
Type Bug
Fix version 2018.3
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Message = “Component descriptor JetBrains.ReSharper.Psi.Modules.PsiModules [Singleton, Disposed] is disposed and cannot be accessed”
ExceptionPath = Root.Exceptions.#0.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.Platform.ComponentModel
StackTraceString = “
at JetBrains.Application.Components.SingletonDescriptor.GetValue() in C:\Build Agent\work\364305ea1b444484\Platform\Core\Shell\ComponentModel\Src\Components\Descriptors\SingletonDescriptor.cs:line 41
at JetBrains.Application.Components.ComponentContainerEx.GetComponent[TInterface](IComponentContainer container) in C:\Build Agent\work\364305ea1b444484\Platform\Core\Shell\ComponentModel\Src\Components\ComponentContainerEx.cs:line 49
at JetBrains.ReSharper.Psi.PsiSourceFileExtensions.GetPsiSourceFiles(IDocument document, ISolution solution) in C:\Build Agent\work\4d54332a870bf3eb\Psi.Features\Core\Psi\_Core\Src\PsiSourceFileExtensions.cs:line 199
at JetBrains.ReSharper.Psi.PsiSourceFileExtensions.GetPsiSourceFile(IDocument document, ISolution solution) in C:\Build Agent\work\4d54332a870bf3eb\Psi.Features\Core\Psi\_Core\Src\PsiSourceFileExtensions.cs:line 162
at JetBrains.ReSharper.Psi.Extensions.GetContext(ITextControl textControl, ISolution solution) in C:\Build Agent\work\4d54332a870bf3eb\Psi.Features\Core\Psi\_Core\Src\CompilationContextCookie.cs:line 357
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionUi.<>c__DisplayClass29_0.<UpdateLookup>b__5() in C:\Build Agent\work\4d54332a870bf3eb\Psi.Features\Core\Services\_Core\Src\LiveTemplates\Hotspots\HotspotSessionUI.cs:line 294
at JetBrains.DataFlow.Lifetime.Terminate() in C:\Build Agent\work\364305ea1b444484\Platform\Core\Shell\RdCore\Src\Lifetime\Lifetime.cs:line 401

RSRP-401157: Provide a QF for "Redundant comparison with null" warning

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Jan 4, 2014 5:07:48 AM
Updated Oct 10, 2018 5:56:52 PM
Resolved Oct 10, 2018 5:56:52 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Feature
Fix version No Fix versions
Affected versions 8.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharper display a correct warning in the following code, but provides no QuickFix to fix it (i.e. remove the comparison):

using System;

class C
{
static string Foo(object x)
{
if (x != null && x is Guid) // Redundant comparison with 'null'
{
return ((Guid)x).ToString();
}

return "";
}
}

RSRP-401809: Feature Request - Add using statement for attribute classes

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jan 22, 2014 2:21:52 PM
Updated Oct 10, 2018 6:03:28 PM
Resolved Oct 10, 2018 6:03:28 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I just wanted to make a feature request having found a shortcoming in ReSharper. I frequently make use of attributes via Postsharp, but I often forget to manually add the using namespace up at the top of the file for aspects that I want to make use of. Today, I really couldn't figure out why Visual Studio was having issues associating the attribute when I realized I had forgotten to add the namespace. Typically for other assemblies, ReSharper very helpfully provides that mechanism to add a reference to the assembly and add the using statement for it, but after testing it out, I found that ReSharper didn't have such a helpful mechanism for referencing the namespace of the attributes.

RSRP-402010: Remove redundant code quick fix is absent

$
0
0
Reporter Olga Lukianova (olka) Olga Lukianova (olka)
Created Jan 25, 2014 12:03:15 AM
Updated Oct 10, 2018 6:05:23 PM
Resolved Oct 10, 2018 6:05:23 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions 8.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
public class C
{
public void Foo(object c)
{
if (c {caret}== null || !(c is C)) return;
}
}

RSRP-471455: ProjectedBuffer out of underlying buffer range.

$
0
0
Reporter ReSharper anonymous (resharper) ReSharper anonymous (resharper)
Created Jul 23, 2018 12:29:16 AM
Updated Oct 10, 2018 6:15:22 PM
Subsystem Quick Fixes
Assignee Ivan Serduk (IvanSerduk)
Priority Critical
State Fixed In Branch
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _898519f9 — JetBrains ReSharper Ultimate 2018.2 EAP 3 Build 182.0.20180711.65739-eap03

JetBrains dotTrace 182 Build 182.0.20180711.73821-eap03
JetBrains ReSharper 182 Build 182.0.20180711.70917-eap03

SubProducts.0 = JetBrains dotTrace 182 Build 182.0.20180711.73821-eap03
SubProducts.1 = JetBrains ReSharper 182 Build 182.0.20180711.70917-eap03

ProjectedBuffer out of underlying buffer range.

— EXCEPTION #1/2 [AssertionException]
Message = “ProjectedBuffer out of underlying buffer range.”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Util.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Platform.Core
StackTraceString = “
 at JetBrains.Text.ProjectedBuffer.Create(IBuffer underlyingBuffer, TextRange range)
 at JetBrains.Text.ProjectedBuffer.Create(IBuffer underlyingBuffer, TextRange range)
 at JetBrains.ReSharper.Psi.Parsing.ProjectedLexer..ctor(CachingLexer lexer, TextRange range)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.ClosedChameleonElement.TryParseUsingTokenBuffer(Func`2 parseFunc)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.ClosedChameleonElement.Parse(Func`2 parseFunc)
 at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.OpenChameleon()
 at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.get_FirstChild()
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.ChameleonBlock.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.CompositeElement.FindNodeAt(TreeTextRange treeRange)
 at JetBrains.ReSharper.Psi.Files.PsiFiles.AppendInjectedFiles(IFile originalFile, Type toLanguage, TreeTextRange range, IReadOnlyCollection`1 providersToBuild, LocalList`1& results)
 at JetBrains.ReSharper.Psi.Files.PsiFiles.AppendInjectFiles(IPsiSourceFile sourceFile, Type injectedLanguageType, DocumentRange range, LocalList`1& files)
 at JetBrains.ReSharper.Psi.Files.PsiFiles.GetPsiFiles(IPsiSourceFile sourceFile, Type languageType, DocumentRange range, PsiLanguageCategories categories)
 at JetBrains.ReSharper.Psi.Files.PsiFiles.GetPsiFiles[TLanguage](IPsiSourceFile sourceFile, DocumentRange range, PsiLanguageCategories categories)
 at JetBrains.ReSharper.Psi.Files.PsiFilesExtensions.GetPsiFile[TLanguageType](IPsiSourceFile sourceFile, DocumentRange range)
 at JetBrains.ReSharper.Feature.Services.ContextActions.ContextActionDataBuilderBase`2.Build(ISolution solution, ITextControl textControl)
 at JetBrains.ReSharper.Feature.Services.ContextActions.ContextActionDataBuilders.BuildCacheData(ISolution solution, ITextControl textControl)
 at JetBrains.ReSharper.Intentions.Bulbs.BulbItems.BuildBulbCache(ITextControl textControl)
 at JetBrains.ReSharper.Intentions.Bulbs.BulbItems.<>c__DisplayClass21_0.<BuildAvailableActionsList>b__1()
 at JetBrains.Application.Threading.InterruptableReadActivityThe.Work()
 at JetBrains.Application.Threading.InterruptableReadActivity.DoWork()
 at JetBrains.Application.Threading.InterruptableReadActivity.WorkerThreadProc()
 at JetBrains.Util.Logging.Logger.Catch(Action action)


— Outer —

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


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

Data.VsVersion = 15.7.27703.2042
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass2_0.<RunSafe>b__0()
 at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
 at System.Threading.Tasks.Task.InnerInvoke()
 at System.Threading.Tasks.Task.Execute()
 at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
 at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.JetPool(S) #1(Action )
 at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<Start>b__19_0()
 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.ThreadHelper.ThreadStart()

RSRP-406561: Mass quickfix for error "default values are missing"

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Feb 27, 2014 4:28:35 PM
Updated Oct 10, 2018 6:30:36 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
This code has multiple errors because default values are missing.

But the Alt-Enter correction puts the fix in a place that only fixes one error:

The correct analysis & behavior would be to put it at the top of the method, next to user default init.

I’m attaching the problem code as well for better readability.

RSRP-34695: Context action: Implement interface

$
0
0
Reporter Andrew Serebryansky (marcus23) Andrew Serebryansky (marcus23)
Created Jan 22, 2007 1:42:20 PM
Updated Oct 10, 2018 6:34:08 PM
Resolved Oct 10, 2018 6:34:08 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Improvement
Fix version Backlog
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
From the interface itself, create specific type in the same file, and implement interface on it.

RSRP-408007: Edit create derived type template

$
0
0
Reporter Kristjan Laane (Kristjan.Laane) Kristjan Laane (Kristjan.Laane)
Created Mar 6, 2014 1:27:04 PM
Updated Oct 10, 2018 6:35:17 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
After hitting "Create derived type" a class is produced that inherits from the selected interface or superclass, with a default template visible in the screenshot.

Similarly to the templates that are used elsewhere in Resharper, I would like to edit the template that is generated. For instance, I would like to make it something like:
public class Deployment : $BASECLASS$, IDeployment

It would make sense to make that a template too, for consistency and flexibility.

Unfortunately no answers here:

Template Types
http://www.jetbrains.com/resharper/webhelp/Templates__Template_Basics__Template_Types.html
Changed accessiblity of clases created... :: JetBrains Developer Community
http://devnet.jetbrains.com/thread/437799
c# - Resharper edit template for Create derived type - Stack Overflow
http://stackoverflow.com/questions/22114159/resharper-edit-template-for-create-derived-type

RSRP-196359: "Refactor - Move method" changes "string" to "String"

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Oct 27, 2010 6:22:04 PM
Updated Oct 10, 2018 6:38:54 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Open
Type Bug
Fix version Backlog
Affected versions 2018.2, 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
Here's a simple way to reproduce:

1) Create a simple class and add the following method:

        public static string CreateMoveBug()
{
if (string.IsNullOrEmpty("Test"))
{
return null;
}

int.Parse("33");

decimal.Parse("2.2");

return string.Empty;
}
2) Add an inner class to the class created above and name it whatever.

3) Do a refactor Move Method and move the above method into the inner class, the result is the following:

            public static string CreateMoveBug()
{
if (String.IsNullOrEmpty("Test"))
{
return null;
}

Int32.Parse("33");

Decimal.Parse("2.2");

return String.Empty;
}
I would expect it not to change any of the code of the method but it replaces all the C# aliases with their respective class.

RSRP-409327: An opportunity to configure quickfix "string.Compare(a, b) to System.String.CompareOrdinal(a, b)"

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Mar 13, 2014 12:44:54 PM
Updated Oct 10, 2018 6:39:14 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Our style guidelines enforce using type aliases where available (e.g. string
over System.String).

If I have
... (string.Compare(a, b) == 0) ...
RS kindly suggests replacing with the Ordinal Comparer. If I do so, I get
... (System.String.CompareOrdinal(a, b) == 0) ...

I would prefer
... (string.CompareOrdinal(a, b) == 0) ...
Can I configure RS for my preference?
Viewing all 106942 articles
Browse latest View live


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