Browse Source

Disabled VariableDeclaredInWideScopeIssue.

This may destroy code - see
"DoesNotSuggestMovingIntoBodyAfterMethodCall". This issue requires
some extra logic. I doubt that the issue is useful any longer when
that logic is implemented. Safely moved can only be constant
expressions (which should be handled by the compiler anyway). It needs
to check that it doesn't move non constant code beyond any
method/property usage or field assignments - there are no much use
cases left for that action.
pull/45/merge
Mike Krüger 12 years ago
parent
commit
929dc52f3f
  1. 8
      ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableDeclaredInWideScopeIssue.cs

8
ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableDeclaredInWideScopeIssue.cs

@ -32,10 +32,10 @@ using ICSharpCode.NRefactory.Refactoring;
namespace ICSharpCode.NRefactory.CSharp.Refactoring namespace ICSharpCode.NRefactory.CSharp.Refactoring
{ {
[IssueDescription("The variable can be declared in a nested scope", // [IssueDescription("The variable can be declared in a nested scope",
Description = "Highlights variables that can be declared in a nested scope.", // Description = "Highlights variables that can be declared in a nested scope.",
Category = IssueCategories.Opportunities, // Category = IssueCategories.Opportunities,
Severity = Severity.Suggestion)] // Severity = Severity.Suggestion)]
public class VariableDeclaredInWideScopeIssue : ICodeIssueProvider public class VariableDeclaredInWideScopeIssue : ICodeIssueProvider
{ {
#region ICodeIssueProvider implementation #region ICodeIssueProvider implementation

Loading…
Cancel
Save