Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -13,9 +13,9 @@ namespace Server.Commands
{
private static CategoryEntry m_RootItems, m_RootMobiles;
private static Type typeofItem = typeof(Item);
private static Type typeofMobile = typeof(Mobile);
private static Type typeofConstructible = typeof(ConstructibleAttribute);
private static readonly Type typeofItem = typeof(Item);
private static readonly Type typeofMobile = typeof(Mobile);
private static readonly Type typeofConstructible = typeof(ConstructibleAttribute);
public static CategoryEntry Items
{
@ -275,9 +275,9 @@ namespace Server.Commands
Object = ActivatorUtil.CreateInstance(type);
}
public Type Type{ get; }
public Type Type { get; }
public object Object{ get; }
public object Object { get; }
}
public class CategoryEntry
@ -286,8 +286,8 @@ namespace Server.Commands
{
Parent = parent;
Title = title;
SubCategories = subCats ?? new CategoryEntry[0];
Matches = new Type[0];
SubCategories = subCats ?? Array.Empty<CategoryEntry>();
Matches = Array.Empty<Type>();
Matched = new List<CategoryTypeEntry>();
}
@ -342,15 +342,15 @@ namespace Server.Commands
Matched = new List<CategoryTypeEntry>();
}
public string Title{ get; }
public string Title { get; }
public Type[] Matches{ get; }
public Type[] Matches { get; }
public CategoryEntry Parent{ get; }
public CategoryEntry Parent { get; }
public CategoryEntry[] SubCategories{ get; }
public CategoryEntry[] SubCategories { get; }
public List<CategoryTypeEntry> Matched{ get; }
public List<CategoryTypeEntry> Matched { get; }
public bool IsMatch(Type type)
{
@ -380,9 +380,9 @@ namespace Server.Commands
Text = input.Substring(index);
}
public int Indentation{ get; }
public int Indentation { get; }
public string Text{ get; }
public string Text { get; }
public static CategoryLine[] Load(string path)
{