Report custom map rule errors in the lint output.

This commit is contained in:
Paul Chote
2018-06-12 18:31:52 +00:00
committed by abcdefg30
parent 15e78332a3
commit 4d664d4f74
3 changed files with 10 additions and 3 deletions

View File

@@ -87,6 +87,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
{
Console.WriteLine("Testing map: {0}".F(testMap.Title));
// Lint tests can't be trusted if the map rules are bogus
// so report that problem then skip the tests
if (testMap.InvalidCustomRules)
{
EmitError(testMap.InvalidCustomRulesException.ToString());
continue;
}
// Run all rule checks on the map if it defines custom rules.
if (testMap.RuleDefinitions != null || testMap.VoiceDefinitions != null || testMap.WeaponDefinitions != null)
CheckRules(modData, testMap.Rules, testMap);