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

RSRP-471622: Warnings in command line version that do now show up in the ide

$
0
0
Reporter Rob van Rosmalen (r.vanrosmalen) Rob van Rosmalen (r.vanrosmalen)
Created Sep 25, 2018 9:52:31 AM
Updated Oct 3, 2018 8:40:05 AM
Subsystem TypeScript
Assignee Nikita Popov (poksh)
Priority Major
State Submitted
Type Bug
Fix version 2018.3
Affected versions 2018.2
Fixed In Version ReSharper Undefined
VsVersion All Versions

We are using 2018.2.3 in VS2017 and the same version of inspectcode on our build server. We use a shared .DotSettings file in the solution so we expect to have the same results.

There are two problems with inspect command line version (maybe they are the same):

  • Exception no rule for Array, lib.d.ts exists (created separate issue for this already)
  • Warnings that show up for typescript

Warnings (all typescript) are like these:

  • Symbol 'keyCode' cannot be properly resolved, probably it is located in inaccessible module
  • Could not find symbol 'HTMLElement' in external module
  • Symbol 'push' cannot be properly resolved, probably it is located in inaccessible module
  • Symbol 'toString' cannot be properly resolved, probably it is located in inaccessible module

We have a zero warning policy but this is now hard to enforce since the builds always shows warnings like these while in VS they don't show up.

What can we do about this or is there a solution?

Regards, Rob


RSRP-471623: Failed to start 10+ unit tests

$
0
0
Reporter Svatopluk Ledl (svatal) Svatopluk Ledl (svatal)
Created Sep 25, 2018 11:58:06 AM
Updated Oct 3, 2018 10:48:52 AM
Subsystem Unit Testing
Assignee Eugene Strizhok (Eugene.Strizhok)
Priority Show-stopper
State Submitted
Type Bug
Fix version 2018.3
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions

Visual Studio 15.8.4, 15.8.5
R#: 2018.2.3

multitargeting (net471;netcoreapp2.1) test project, running core test.
Runner can list all tests, but if I run 10 or more tests at once, R# throws an following exception and all tests are inconclusive.
R# log attached!

Transition failed: Transition from state <v1.Execution> on event <remote::1.TestExecution.StatsChange>.
  Cause: System.FormatException: /Date(1537456737000+0000)/ is not a valid value for DateTimeOffset. ---> System.FormatException: String was not recognized as a valid DateTime.
     at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles, TimeSpan& offset)
     at System.DateTimeOffset.Parse(String input, IFormatProvider formatProvider, DateTimeStyles styles)
     at System.ComponentModel.DateTimeOffsetConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
     --- End of inner exception stack trace ---
     at System.ComponentModel.DateTimeOffsetConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
     at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.v1.Properties.GetNullable[T](Property[] properties, String propertyKey)
     at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.ProcessCompleted(TestResult[] results)
     at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.OnRunStatsChanged(ExecutionStatsChangePayload payload)
     at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentActionHolder`1.Execute(Object argument)
     at Appccelerate.StateMachine.Machine.Transitions.Transition`2.PerformActions(ITransitionContext`2 context)
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestProtocol.<.ctor>b__22_9(Object sender, TransitionExceptionEventArgs`2 args)
     at Appccelerate.StateMachine.Machine.StateMachine`2.RaiseEvent[T](EventHandler`1 eventHandler, T arguments, ITransitionContext`2 context, Boolean raiseEventOnException)
     at Appccelerate.StateMachine.Machine.StateMachine`2.OnExceptionThrown(ITransitionContext`2 context, Exception exception)
     at Appccelerate.StateMachine.Machine.Contexts.TransitionContext`2.OnExceptionThrown(Exception exception)
     at Appccelerate.StateMachine.Machine.Transitions.Transition`2.HandleException(Exception exception, ITransitionContext`2 context)
     at Appccelerate.StateMachine.Machine.Transitions.Transition`2.PerformActions(ITransitionContext`2 context)
     at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(ITransitionContext`2 context)
     at Appccelerate.StateMachine.Machine.States.State`2.Fire(ITransitionContext`2 context)
     at Appccelerate.StateMachine.Machine.StateMachine`2.Fire(TEvent eventId, Object eventArgument)
     at Appccelerate.StateMachine.ActiveStateMachine`2.ProcessEventQueue(CancellationToken cancellationToken)
     at Appccelerate.StateMachine.ActiveStateMachine`2.<Start>b__32_0()
     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.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)
     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(Object obj)

RSRP-198713: Extract parameter on method call should extract matching Func or Action

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Nov 25, 2010 4:47:39 PM
Updated Oct 3, 2018 11:38:10 AM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
A nice feature would be the ability to use Extract Parameter on a method call to create a Func<> or Action<> parameter. For example, if I had the following code:

void DoStuff(Foo foo)
{
Bar something = foo.GetBar("jim");
// ...
}

and I highlighted "foo.GetBar" and used Extract Parameter, I'd have this code:

void DooStuff(Foo foo, Func<string, Bar> getBar) {
Bar something = getBar("jim");
// ...
}

RSRP-178573: QF makes constraints inconsistent

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 15, 2010 5:15:47 PM
Updated Oct 3, 2018 11:51:09 AM
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
partial class A<T> where T : class { }

partial class A<T>
{
T x = new T(); // Apply QF
}

Actual result:

partial class A<T> where T : class, new() // error CS0265: Partial declarations of 'A<T>' have inconsistent constraints for type parameter 'T'
{ }

partial class A<T> where T : new()
{
T x = new T();
}

Expected result:

partial class A<T> where T : class, new()  // OK
{ }

partial class A<T>
{
T x = new T();
}

RSRP-178589: Incorrect cast suggested, replacing semi-valid code

$
0
0
Reporter Yuri Astrakhan (yurik) Yuri Astrakhan (yurik)
Created Apr 15, 2010 11:28:24 PM
Updated Oct 3, 2018 11:53:43 AM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
struct Blah
{
public static explicit operator int(Blah value)
{
return 0;
}
}

class Test
{
public static void Main()
{
object o = new Blah();
int x = (Blah) o;
}
}

VS 2010 RTM, R# 1659

In this example, R# suggests to use casting to convert Blah into an int, but IIRC, Blah will be boxed, hence it must first be unboxed into the original type, and later an explicit cast is called. If i am not correct and it can be unboxed directly, int x = (int) (Blah) o; should show double cast as redundant.

RSRP-178651: Do not place caret at the end of the file after 'Move declaration to namespace' ref

$
0
0
Reporter Kirill Falk (kfalk) Kirill Falk (kfalk)
Created Apr 16, 2010 6:20:12 PM
Updated Oct 3, 2018 11:56:54 AM
Resolved Oct 3, 2018 11:56:54 AM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Obsolete
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Add attached file to the project. Invoke 'Move declaration to namespace'
Please note that some lines has comments

RSRP-178668: Mass inline

$
0
0
Reporter Joe White (joewhite) Joe White (joewhite)
Created Apr 16, 2010 7:36:23 PM
Updated Oct 3, 2018 11:59:58 AM
Subsystem Refactorings
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 like a way to quickly inline large numbers of methods at once – preferably only methods that are only called from one place.

My thought is a new refactoring, "Inline Methods", that is invoked on a class (or maybe even an entire file or directory – hey, I can dream). This would give me a list of methods, and I could check the ones I want to inline.

Additionally, it would be nice if there was a first page with radio buttons, asking whether I want to see only methods with one call site, or all methods. That would make it easy to restrict my search to methods that are only used once. The "only methods with one call site" would probably mean a long delay before the check list appears, but it would be very worthwhile.

This is related to RSRP-178654, though that issue is specifically for inlining a single method.

RSRP-55569: Refac::MoveStaticMethod: References to Nested Types of the Target Type Are Not Rebound

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Jan 8, 2008 11:35:33 PM
Updated Oct 3, 2018 12:09:29 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Moving method M from class CS to class CT.

M uses some fields from the enum CT::E, like CT.E.F1.

After moving M, such references are not rebound, and are marked as a redundancy. Should be shortened to E.F1 automatically.

RSRP-178686: Move Method doesn't update callers if there are collisions

$
0
0
Reporter Joe White (joewhite) Joe White (joewhite)
Created Apr 16, 2010 10:41:42 PM
Updated Oct 3, 2018 12:12:28 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Using ReSharper 5 release:

Given the following code:
public class A {
public static void Foo() { ... }
public static void Main() {
Foo();
}
}
public class B {
public static void Foo() { ... }
}

If I try to use the Move refactoring to move method A.Foo onto class B, ReSharper warns me that there's a conflict, as expected. However, if I tell it to continue anyway, it moves the method, but doesn't update the call sites: A.Main() is left as-is, still calling A.Foo(), even though A.Foo() no longer exists.

Why this would ever matter: (Aka, "It warned you it was going to break your code, right?") When I ran into this, B.Foo() was a simple delegating method that just called A.Foo(). I thought, "Yes, I know there's a conflict; I'll just finish this move and then delete the delegating method, and everything will be fine." This seemed like the simplest way to refactor away from the delegating method – then all call sites would just point to the real method in its new home. However, this refactoring was more difficult than I expected, because ReSharper didn't do all the work I expected it to. Even after I resolved the conflict (by deleting the delegating method), I was left with non-compilable code. It just warned me that there would be a conflict after it was done; it didn't warn me that it wasn't going to finish doing its job.

RSRP-187784: 'Move static member' resolves conflict incorrectly

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Aug 6, 2010 3:07:43 PM
Updated Oct 3, 2018 12:13:57 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
class C
{
static void Main()
{
byte a = Foo<byte>(1);
}


public static T Foo<T>(T x)
{
return y;
}
}

class D
{
public static void Foo<T>(int x) { }
}

Move D.Foo to C. Result:

class C
{
static void Main()
{
byte a = Foo(1); // error CS0266: Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)
}


public static T Foo<T>(T x)
{
return y;
}

public static void Foo<T>(int x) { }
}

Expected:

class C
{
static void Main()
{
byte a = Foo((byte)1); // OK
}


public static T Foo<T>(T x)
{
return y;
}

public static void Foo<T>(int x) { }
}

RSRP-471731: Incorrect formatting of long 'if' conditions

$
0
0
Reporter Roman Vasin (roman.vasin) Roman Vasin (roman.vasin)
Created Oct 3, 2018 11:57:06 AM
Updated Oct 3, 2018 12:15:41 PM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Critical
State Submitted
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Before reformat:

if (MethodWithLongLongLongLongLongLongLongLongName1(x => MethodWithLongLongLongLongLongLongLongLongName2(x)))
{
}

After reformat:

if (MethodWithLongLongLongLongLongLongLongLongName1(x => MethodWithLongLongLongLongLongLongLongLongName2(x))
)
{

}

Expected:

if (MethodWithLongLongLongLongLongLongLongLongName1(
    x => MethodWithLongLongLongLongLongLongLongLongName2(x)))
{

}

This happens when the line is longer than a maximum of 2 characters.

RSRP-471733: Incorrect applying file layout to properties with disabled 'MemberCanBeMadeStatic' inspections

$
0
0
Reporter Roman Vasin (roman.vasin) Roman Vasin (roman.vasin)
Created Oct 3, 2018 12:17:07 PM
Updated Oct 3, 2018 12:17:07 PM
Subsystem Code Style - Cleanup
Assignee Razmik Seysyan (razmik)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Code example:

namespace Namespace
{
    public class Class
    {
        // ReSharper disable MemberCanBeMadeStatic.Local
        private int Property1 => AppDomain.CurrentDomain.Id;
        private int Property2 => AppDomain.CurrentDomain.Id;
        // ReSharper restore MemberCanBeMadeStatic.Local

        public Class()
        {
            int x = this.Property1;
        }
    }
}

File layout:

The settings is that properties must be declared before constructors.
After 'Cleanup code':

namespace Namespace
{
    public class Class
    {
        public Class()
        {
            var x = Property1;
        }

        // ReSharper disable MemberCanBeMadeStatic.Local
        private int Property1 => AppDomain.CurrentDomain.Id;

        private int Property2 => AppDomain.CurrentDomain.Id;
        // ReSharper restore MemberCanBeMadeStatic.Local
    }
}

This happens only when 'MemberCanBeMadeStatic' inspection for the properties is disabled with comments.

RSRP-199165: Refac::MoveStaticMember: Fails to Remove "this" Modifier

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Nov 30, 2010 8:28:06 PM
Updated Oct 3, 2018 12:22:11 PM
Resolved Oct 3, 2018 12:22:11 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Duplicate
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Should turn extension methods into plain if target class does not support extensions.

RSRP-196680: Move Static Method: When Moving Extension Methods, Does not Check if They Could Live in the Target Class

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Oct 30, 2010 8:22:14 PM
Updated Oct 3, 2018 12:23:13 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Open
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Should report a conflict when attempting to move an ext method into a non-static class, a nested class, a project that has no [ExtensionAttribute] referenced, etc.

If the user insists, should probably turn them (and usages) into "plain static".

RSRP-465754: Move to type unable to move extension method to another type

$
0
0
Reporter Alexander Ulitin (alexander.ulitin) Alexander Ulitin (alexander.ulitin)
Created Aug 4, 2017 5:22:07 PM
Updated Oct 3, 2018 12:25:28 PM
Subsystem Refactorings
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
steps to reproduce:
1. try to move method M to Abc2
2.

3.
result
public static class Abc2
{
public static void M(this object a)
{
}
}

public static class Abc3
{
public static void M2()
{
Abc2.M(__, new object());
}
}



code sample:
  public static class Abc2
{

}

public static class Abc3
{
public static void M2()
{
M(new object());
}

public static void M(this object a)
{
}
}

RSRP-200254: Refac::MoveStaticMethod: Silently Generates Red Code when Moving Methods into Project We Cannot Reference

$
0
0
Reporter Serge Baltic (baltic) Serge Baltic (baltic)
Created Dec 13, 2010 8:42:32 PM
Updated Oct 3, 2018 12:30:59 PM
Resolved Oct 3, 2018 12:30:58 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
If project A references project B, and a static method is moved from B to A, the refactoring succeeds siltently, but all of the usages are red, because the new method is now not visible from the usage, and this cannot be fixed by adding a reference because it'd mean circular dependencies between projects.

Conflict must be reported.

RSRP-471734: Ability to disable naming of arguments in indexers

$
0
0
Reporter Roman Vasin (roman.vasin) Roman Vasin (roman.vasin)
Created Oct 3, 2018 12:49:38 PM
Updated Oct 3, 2018 12:49:38 PM
Subsystem Code Style
Assignee Razmik Seysyan (razmik)
Priority Normal
State Submitted
Type Improvement
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

I have the following settings for arguments:

Code before cleaning up:

Method(1);

var dictionary = new Dictionary<int, int>();
var x = dictionary[1];

After cleaning up:

Method(x: 1); // Ok.

var dictionary = new Dictionary<int, int>();
var x = dictionary[key: 1]; // But here I don't want to name the argument. I expect dictionary[1].

So the problem is that I didn't find any option to disable naming of arguments in indexers.

RSRP-471732: Using a custom type in TestFixtureData doesn't work

$
0
0
Reporter Roger Kratz (rogerkratz) Roger Kratz (rogerkratz)
Created Oct 3, 2018 12:15:00 PM
Updated Oct 3, 2018 1:21:52 PM
Subsystem Unit Testing
Assignee Eugene Strizhok (Eugene.Strizhok)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Test runner (both latest Rider and latest VS) won't run this two times as expected/nunit console does....

[TestFixtureSource(typeof(MyFixtureData), "FixtureParms")]
public class TestFixture
{
	public TestFixture(TestFixtureDataParameters foo)
	{
	}

	[Test]
	public void JustATest()
	{
	}
}

public class MyFixtureData
{
	public static IEnumerable FixtureParms
	{
		get
		{
			yield return new TestFixtureData(new TestFixtureDataParameters(1));
			yield return new TestFixtureData(new TestFixtureDataParameters(2));
		}
	}  
}

public class TestFixtureDataParameters
{
	public TestFixtureDataParameters(object foo)
	{
		Foo = foo;
	}
	
	public object Foo { get; }
}

RSRP-471735: return ref _memory.Span[0]; produces error in editor ("Span has no setter")

$
0
0
Reporter Maria Pleskunina (Maria.Pleskunina) Maria Pleskunina (Maria.Pleskunina)
Created Oct 3, 2018 1:23:52 PM
Updated Oct 3, 2018 1:23:52 PM
Subsystem Code Analysis - C#
Assignee Alexander Shvedov (shvedov)
Priority Critical
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
private readonly Memory<T> _memory; 
public ref T this[ int offset ] => ref _memory.Span[offset]; <-- red squglies here 
}```

RSRP-470617: System memory.Span has no setter error

$
0
0
Reporter Anonymous (anon-ajcK8DA7) Anonymous (anon-ajcK8DA7)
Created Jul 16, 2018 7:03:55 PM
Updated Oct 3, 2018 1:23:52 PM
Subsystem Code Analysis - C#
Assignee Alexander Shvedov (shvedov)
Priority Show-stopper
State In Progress
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Net Core 2.1, c# 7.3

using System;
using System.Runtime.InteropServices;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var helloWorld = "Hello World";
            var memory = MemoryMarshal.AsMemory(helloWorld.AsMemory());
            ref var firstСhar = ref memory.Span[0];
            firstСhar = 'D';
            Console.WriteLine(helloWorld);
        }
    }
}

https://www.screencast.com/t/uw5QPXes

JetBrains Rider 2018.2 EAP
Build #RD-182.3624.343, built on July 13, 2018
Rider EAP User
Expiration date: August 12, 2018
JRE: 1.8.0_152-release-1226-b7 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Viewing all 106942 articles
Browse latest View live


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