actually working custom lint passes

This commit is contained in:
Chris Forbes
2011-04-05 21:56:31 +12:00
parent 55c609ee16
commit 24a205d992
5 changed files with 273 additions and 229 deletions

View File

@@ -29,7 +29,8 @@ namespace RALint
}
static int Main(string[] args)
{
{
Console.WriteLine("This is teh sucks");
try
{
// bind some nonfatal error handling into FieldLoader, so we don't just *explode*.
@@ -42,7 +43,18 @@ namespace RALint
foreach (var actorInfo in Rules.Info)
foreach (var traitInfo in actorInfo.Value.Traits.WithInterface<ITraitInfo>())
CheckTrait(actorInfo.Value, traitInfo);
CheckTrait(actorInfo.Value, traitInfo);
foreach (var customPassType in Game.modData.ObjectCreator
.GetTypesImplementing<ILintPass>())
{
var customPass = (ILintPass)Game.modData.ObjectCreator
.CreateBasic(customPassType);
Console.WriteLine("CustomPass: {0}".F(customPassType.ToString()));
customPass.Run(EmitError);
}
if (errors > 0)
{