From bc7c4ea6cde0aa86fa59c258127e0c8625220f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 14 Mar 2014 10:53:03 +0100 Subject: [PATCH] don't check map.yaml with empty Rules: section --- OpenRA.Lint/YamlChecker.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenRA.Lint/YamlChecker.cs b/OpenRA.Lint/YamlChecker.cs index 2acded35bd..679f7fbe8c 100644 --- a/OpenRA.Lint/YamlChecker.cs +++ b/OpenRA.Lint/YamlChecker.cs @@ -63,6 +63,14 @@ namespace OpenRA.Lint foreach (var testMap in maps) { + if (testMap.Rules.Count < 1) + { + if (verbose) + Console.WriteLine("No custom rules detected. Omitting Map: {0}".F(testMap.Title)); + + continue; + } + if (verbose) Console.WriteLine("Map: {0}".F(testMap.Title)); Rules.LoadRules(Game.modData.Manifest, testMap);