Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2014-11-28 13:41:16 +0300
committerMike Krüger <mkrueger@xamarin.com>2014-11-28 13:41:16 +0300
commitf337f4a0516ad2bdc5ea8796a8799462b7fd7ac5 (patch)
tree066240275759289e4b31bae0ce2b5812d8b3d82b /ICSharpCode.NRefactory.CSharp.Refactoring
parentbc1c856ecfeb3a1e21f2e9744546d113d6056a4e (diff)
Took a less intrusive approach for disableing high memory usage rules.
Diffstat (limited to 'ICSharpCode.NRefactory.CSharp.Refactoring')
-rw-r--r--ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertIfStatementToSwitchStatementAction.cs6
-rw-r--r--ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs9
-rw-r--r--ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/CodeQuality/FunctionNeverReturnsIssue.cs11
-rw-r--r--ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/Opportunities/ConvertIfStatementToSwitchStatementIssue.cs9
-rw-r--r--ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs11
5 files changed, 25 insertions, 21 deletions
diff --git a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertIfStatementToSwitchStatementAction.cs b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertIfStatementToSwitchStatementAction.cs
index eebc384a..10c4d8d6 100644
--- a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertIfStatementToSwitchStatementAction.cs
+++ b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertIfStatementToSwitchStatementAction.cs
@@ -32,9 +32,9 @@ using ICSharpCode.NRefactory.PatternMatching;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
-// [ContextAction (
-// "Convert 'if' to 'switch'",
-// Description = "Convert 'if' statement to 'switch' statement")]
+ [ContextAction (
+ "Convert 'if' to 'switch'",
+ Description = "Convert 'if' statement to 'switch' statement")]
public class ConvertIfStatementToSwitchStatementAction : SpecializedCodeAction<IfElseStatement>
{
protected override CodeAction GetAction (RefactoringContext context, IfElseStatement node)
diff --git a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs
index 3474b299..9d921b9d 100644
--- a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs
+++ b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs
@@ -32,10 +32,11 @@ using ICSharpCode.NRefactory.Refactoring;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
-// [IssueDescription("Code is unreachable",
-// Description = "Code is unreachable.",
-// Category = IssueCategories.RedundanciesInCode,
-// Severity = Severity.Warning)]
+ [IssueDescription("Code is unreachable",
+ Description = "Code is unreachable.",
+ Category = IssueCategories.RedundanciesInCode,
+ IsEnabledByDefault = false,
+ Severity = Severity.Warning)]
public class UnreachableCodeIssue : GatherVisitorCodeIssueProvider
{
protected override IGatherVisitor CreateVisitor(BaseRefactoringContext context)
diff --git a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/CodeQuality/FunctionNeverReturnsIssue.cs b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/CodeQuality/FunctionNeverReturnsIssue.cs
index a3586638..bded542a 100644
--- a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/CodeQuality/FunctionNeverReturnsIssue.cs
+++ b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/CodeQuality/FunctionNeverReturnsIssue.cs
@@ -32,11 +32,12 @@ using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
-// [IssueDescription ("Function never returns",
-// Description = "Function does not reach its end or a 'return' statement by any of possible execution paths.",
-// Category = IssueCategories.CodeQualityIssues,
-// Severity = Severity.Warning,
-// AnalysisDisableKeyword = "FunctionNeverReturns")]
+ [IssueDescription ("Function never returns",
+ Description = "Function does not reach its end or a 'return' statement by any of possible execution paths.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IsEnabledByDefault = false,
+ AnalysisDisableKeyword = "FunctionNeverReturns")]
public class FunctionNeverReturnsIssue : GatherVisitorCodeIssueProvider
{
protected override IGatherVisitor CreateVisitor(BaseRefactoringContext context)
diff --git a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/Opportunities/ConvertIfStatementToSwitchStatementIssue.cs b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/Opportunities/ConvertIfStatementToSwitchStatementIssue.cs
index 1d3dffc3..eebaa383 100644
--- a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/Opportunities/ConvertIfStatementToSwitchStatementIssue.cs
+++ b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/Opportunities/ConvertIfStatementToSwitchStatementIssue.cs
@@ -29,10 +29,11 @@ using System.Linq;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
-// [IssueDescription("'if' statement can be re-written as 'switch' statement",
-// Description="Convert 'if' to 'switch'",
-// Category = IssueCategories.Opportunities,
-// Severity = Severity.Hint)]
+ [IssueDescription("'if' statement can be re-written as 'switch' statement",
+ Description="Convert 'if' to 'switch'",
+ Category = IssueCategories.Opportunities,
+ IsEnabledByDefault = false,
+ Severity = Severity.Hint)]
public class ConvertIfStatementToSwitchStatementIssue : GatherVisitorCodeIssueProvider
{
protected override IGatherVisitor CreateVisitor(BaseRefactoringContext context)
diff --git a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs
index 8cf0dc7a..c039a22c 100644
--- a/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs
+++ b/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs
@@ -30,11 +30,12 @@ using System.Linq;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
-// [IssueDescription("Redundant 'else' keyword",
-// Description = "Redundant 'else' keyword.",
-// Category = IssueCategories.RedundanciesInCode,
-// Severity = Severity.Warning,
-// AnalysisDisableKeyword = "RedundantIfElseBlock")]
+ [IssueDescription("Redundant 'else' keyword",
+ Description = "Redundant 'else' keyword.",
+ Category = IssueCategories.RedundanciesInCode,
+ Severity = Severity.Warning,
+ IsEnabledByDefault = false,
+ AnalysisDisableKeyword = "RedundantIfElseBlock")]
public class RedundantIfElseBlockIssue : GatherVisitorCodeIssueProvider
{
protected override IGatherVisitor CreateVisitor(BaseRefactoringContext context)