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 { ...@@ -224,7 +224,6 @@ final class ATllbuild : Tool {
static var allOptions : [Options] { static var allOptions : [Options] {
return [ return [
Tool,
Name, Name,
Dependencies, Dependencies,
OutputType, OutputType,
...@@ -248,8 +247,12 @@ final class ATllbuild : Tool { ...@@ -248,8 +247,12 @@ final class ATllbuild : Tool {
func run(task: Task) { func run(task: Task) {
//warn if we don't understand an option //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 { 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)") print("Warning: unknown option \(key) for task \(task.qualifiedName)")
} }
} }
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
:sources ["src/**.swift"] :sources ["src/**.swift"]
:name "overlay" :name "overlay"
:output-type "static-library" :output-type "static-library"
:germany "awesome"
:compile-options [] :compile-options []
} }
} }
......
...@@ -89,6 +89,14 @@ if ! grep "poland" /tmp/warnings.txt; then ...@@ -89,6 +89,14 @@ if ! grep "poland" /tmp/warnings.txt; then
exit 1 exit 1
fi 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*********************" 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