roslyn: "Name can be simplified" fixer is not helpful
Current behavior of the Fix All for “names can be simplified” is not useful at all, it’s faster to find and replace.
Steps to Reproduce:
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
var debug1 = typeof(System.Diagnostics.Debug); <-- Simplify "name" across Document
System.Diagnostics.DiagnosticListener debug2;
System.Diagnostics.DebuggableAttribute debug3;
System.Diagnostics.DebuggerHiddenAttribute debug4;
var debug5 = typeof(System.Diagnostics.Debugger);
System.Diagnostics.DebuggerNonUserCodeAttribute debug6;
System.Diagnostics.DebuggerVisualizerAttribute debug7;
System.Diagnostics.DelimitedListTraceListener debug8;
}
}
Expected Behavior:
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
var debug1 = typeof(Debug);
DiagnosticListener debug2;
DebuggableAttribute debug3;
DebuggerHiddenAttribute debug4;
var debug5 = typeof(Debugger);
DebuggerNonUserCodeAttribute debug6;
DebuggerVisualizerAttribute debug7;
DelimitedListTraceListener debug8;
}
}
Actual Behavior:
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
var debug1 = typeof(Debug);
System.Diagnostics.DiagnosticListener debug2;
System.Diagnostics.DebuggableAttribute debug3;
System.Diagnostics.DebuggerHiddenAttribute debug4;
var debug5 = typeof(System.Diagnostics.Debugger);
System.Diagnostics.DebuggerNonUserCodeAttribute debug6;
System.Diagnostics.DebuggerVisualizerAttribute debug7;
System.Diagnostics.DelimitedListTraceListener debug8;
}
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (15 by maintainers)
@CyrusNajmabadi what changes? Didn’t you just ask for #26823 to be merged?