mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-02-11 02:39:34 +00:00
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:
@@ -188,9 +188,11 @@ def load_grammars(tmp_dir, source, all_scopes)
|
|||||||
scope = grammar['scopeName']
|
scope = grammar['scopeName']
|
||||||
|
|
||||||
if all_scopes.key?(scope)
|
if all_scopes.key?(scope)
|
||||||
$stderr.puts "WARN: Duplicated scope #{scope}\n" +
|
unless all_scopes[scope] == p.url
|
||||||
" Current package: #{p.url}\n" +
|
$stderr.puts "WARN: Duplicated scope #{scope}\n" +
|
||||||
" Previous package: #{all_scopes[scope]}"
|
" Current package: #{p.url}\n" +
|
||||||
|
" Previous package: #{all_scopes[scope]}"
|
||||||
|
end
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
all_scopes[scope] = p.url
|
all_scopes[scope] = p.url
|
||||||
|
|||||||
Reference in New Issue
Block a user