@@ -30,29 +30,7 @@ public class UseConsistentCasing : ConfigurableRule
30
30
[ ConfigurableRuleProperty ( defaultValue : true ) ]
31
31
public bool CheckKeyword { get ; set ; }
32
32
33
- /*
34
- * Hypothetically, we could support UPPERCASE but that is awful, and ...
35
- * Anything else would require this analyzer to **make up** the correct capitalization.
36
- private enum Casing { uppercase, lowercase }
37
- private Casing casing;
38
- /// <summary>By default, switch to lowercase (or uppercase (defaults to lowercase)</summary>
39
- /// <remarks>Any other "consistent" case would just </remarks>
40
- [ConfigurableRuleProperty(defaultValue: "lowercase")]
41
- public string Case
42
- {
43
- get
44
- {
45
- return casing.ToString();
46
- }
47
- set
48
- {
49
- if (String.IsNullOrWhiteSpace(value) || !Enum.TryParse<Casing>(value, true, out casing))
50
- {
51
- casing = Casing.lowercase;
52
- }
53
- }
54
- }
55
- */
33
+ private TokenFlags operators = TokenFlags . BinaryOperator | TokenFlags . UnaryOperator ;
56
34
57
35
/// <summary>
58
36
/// AnalyzeScript: Analyze the script to verify consistency of keyword and operator case
@@ -63,7 +41,6 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
63
41
{
64
42
throw new ArgumentNullException ( Strings . NullAstErrorMessage ) ;
65
43
}
66
- TokenFlags operators = TokenFlags . BinaryOperator | TokenFlags . UnaryOperator ;
67
44
68
45
// Iterates all keywords and check the case
69
46
for ( int i = 0 ; i < Helper . Instance . Tokens . Length ; i ++ )
@@ -115,7 +92,6 @@ private DiagnosticRecord GetDiagnosticRecord(Token token, string fileName, strin
115
92
suggestedCorrections : extents ) ;
116
93
}
117
94
118
-
119
95
/// <summary>
120
96
/// GetName: Retrieves the name of this rule.
121
97
/// </summary>
0 commit comments