From 7e7e3723dc32a6e716377e5f57d996a12fdb210c Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 19 Aug 2015 18:37:24 +0200 Subject: [PATCH] Add "check-scripts" to make.ps1 --- make.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/make.ps1 b/make.ps1 index a7fc6e1d4e..e1267e583e 100644 --- a/make.ps1 +++ b/make.ps1 @@ -35,6 +35,7 @@ if ($args.Length -eq 0) echo " 'dependencies' commands to restore removed files." echo " test Tests the default mods for errors." echo " check Checks .cs files for StyleCop violations." + echo " check-scripts Checks .lua files for syntax errors." echo " docs Generates the trait and Lua API documentation." echo "" $command = (Read-Host "Enter command").Split(' ', 2) @@ -177,6 +178,18 @@ elseif ($command -eq "check") UtilityNotFound } } +elseif ($command -eq "check-scripts") +{ + foreach ($script in ls "mods/*/maps/*/*.lua") + { + luac -p $script + } + foreach ($script in ls "lua/*.lua") + { + luac -p $script + } + echo "Check successfull!" +} elseif ($command -eq "docs") { if (Test-Path OpenRA.Utility.exe)