Commit f9d7e606 authored by Drew's avatar Drew

Merge pull request #55 from AnarchyTools/tool_warnings

Ignore tool keys when warning from atllbuild
parents 35943a08 92258ead
Pipeline #1118 passed with stage
......@@ -224,7 +224,6 @@ final class ATllbuild : Tool {
static var allOptions : [Options] {
return [
Tool,
Name,
Dependencies,
OutputType,
......@@ -248,8 +247,12 @@ final class ATllbuild : Tool {
func run(task: Task) {
//warn if we don't understand an option
var knownOptions = Options.allOptions.map({$0.rawValue})
for option in Task.Option.allOptions.map({$0.rawValue}) {
knownOptions.append(option)
}
for key in task.allKeys {
if !Options.allOptions.map({$0.rawValue}).contains(key) {
if !knownOptions.contains(key) {
print("Warning: unknown option \(key) for task \(task.qualifiedName)")
}
}
......
......@@ -27,7 +27,6 @@
:sources ["src/**.swift"]
:name "overlay"
:output-type "static-library"
:germany "awesome"
:compile-options []
}
}
......
......@@ -89,6 +89,14 @@ if ! grep "poland" /tmp/warnings.txt; then
exit 1
fi
cd $DIR/tests/fixtures/overlay
$ATBUILD --use-overlay got-overlay > /tmp/warnings.txt
if grep "Warning: " /tmp/warnings.txt; then
echo "Got a warning when building the overlay fixture"
exit 1
fi
echo "****************HELP TEST*********************"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment