From 8704b0f3882971a09a9c0e0bc1c95926bc304aea Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Thu, 22 Apr 2021 18:13:09 +0200 Subject: Allow failures for defined parsers --- scripts/check-queries.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/check-queries.lua b/scripts/check-queries.lua index e89c92ca4..623ad6bfd 100755 --- a/scripts/check-queries.lua +++ b/scripts/check-queries.lua @@ -58,11 +58,15 @@ end local ok, err = pcall(do_check) +local allowed_to_fail = vim.split(vim.env.ALLOWED_INSTALLATION_FAILURES or '', ",", true) for k, v in pairs(require 'nvim-treesitter.parsers'.get_parser_configs()) do if not require 'nvim-treesitter.parsers'.has_parser(k) then -- On CI all parsers that can be installed from C files should be installed - if vim.env.CI and not v.install_info.requires_generate_from_grammar then + if vim.env.CI + and not v.install_info.requires_generate_from_grammar + and not vim.tbl_contains(allowed_to_fail, k) then + print('Error: parser for '..k..' is not installed') vim.cmd('cq') else -- cgit v1.2.3-70-g09d2