Don't warn if a package contains multiple copies of a grammar

This is pretty common (e.g., if the package contains the grammar in both
XML and JSON).
This commit is contained in:
Adam Roben
2015-05-19 09:25:34 -04:00
parent 9bdf890fd8
commit 57429f3194

View File

@@ -188,9 +188,11 @@ def load_grammars(tmp_dir, source, all_scopes)
scope = grammar['scopeName']
if all_scopes.key?(scope)
$stderr.puts "WARN: Duplicated scope #{scope}\n" +
" Current package: #{p.url}\n" +
" Previous package: #{all_scopes[scope]}"
unless all_scopes[scope] == p.url
$stderr.puts "WARN: Duplicated scope #{scope}\n" +
" Current package: #{p.url}\n" +
" Previous package: #{all_scopes[scope]}"
end
next
end
all_scopes[scope] = p.url