Skip parsers in query check that are not installed

This commit is contained in:
Stephan Seitz 2021-03-07 19:31:09 +01:00 committed by Kiyan
parent 4b0ba7781f
commit 28bc7a0703

View file

@ -29,6 +29,7 @@ local function do_check()
local last_error local last_error
for _, lang in pairs(parsers) do for _, lang in pairs(parsers) do
if parsers.has_parser(lang) then
for _, query_type in pairs(query_types) do for _, query_type in pairs(query_types) do
print('Checking '..lang..' '..query_type) print('Checking '..lang..' '..query_type)
local ok, query = pcall(queries.get_query,lang, query_type) local ok, query = pcall(queries.get_query,lang, query_type)
@ -48,6 +49,9 @@ local function do_check()
end end
end end
end end
else
print("No parser for "..lang.." installed! Skipping...")
end
end end
if last_error then if last_error then
print() print()