Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed May 24, 2012
1 parent c1169a9 commit 093483e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
Expand Up @@ -153,8 +153,8 @@ public RuleResult CheckMethod (MethodDefinition method)
// ... to System.Console ...
MethodReference mr = ins.Operand as MethodReference;

if (mr == null)
continue;
if (mr == null)
continue;

if (!mr.DeclaringType.IsNamed ("System", "Console"))
continue;
Expand Down
Expand Up @@ -111,8 +111,7 @@ private static int FindTokenStart (string memberName, string token, int start)
private static bool IsUri (string memberName)
{
int index = 0;
while ((index = FindTokenStart(memberName, "ur", index)) != -1)
{
while ((index = FindTokenStart(memberName, "ur", index)) != -1){
if (memberName.Length <= index + 2)
break;
if (url_enders.Contains(Char.ToLower(memberName[index + 2], CultureInfo.InvariantCulture)))
Expand Down
Expand Up @@ -86,8 +86,7 @@ public RuleResult CheckType (TypeDefinition type)

int depth = 0;
TypeDefinition temp = type;
while (temp.BaseType != null)
{
while (temp.BaseType != null) {
temp = temp.BaseType.Resolve();
if (temp == null)
break;
Expand Down
Expand Up @@ -96,8 +96,7 @@ public class AvoidDeepNamespaceHierarchyRule : Rule, IAssemblyRule {
[DefaultValue (DefaultMaxDepth)]
[Description ("The depth at which namespaces may be nested without triggering a defect.")]
public int MaxDepth {
get
{
get {
return max_depth;
}
set {
Expand Down Expand Up @@ -153,12 +152,9 @@ public RuleResult CheckAssembly (AssemblyDefinition assembly)
return Runner.CurrentRuleResult;
}

public override string Solution
{
get
{
return string.Format("Try to keep the depth below {0}, with an additional one for specialization (e.g. Design, Interop, Permissions).",
MaxDepth);
public override string Solution {
get {
return string.Format("Try to keep the depth below {0}, with an additional one for specialization (e.g. Design, Interop, Permissions).", MaxDepth);
}
}
}
Expand Down

0 comments on commit 093483e

Please sign in to comment.