diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-04-22 18:13:09 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-04-22 18:37:04 +0200 |
| commit | 8704b0f3882971a09a9c0e0bc1c95926bc304aea (patch) | |
| tree | 7e61661fe1bc5f78f91b2f5001f0dca3e13a679d | |
| parent | chore: add funding informations (diff) | |
| download | nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar.gz nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar.bz2 nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar.lz nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar.xz nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.tar.zst nvim-treesitter-8704b0f3882971a09a9c0e0bc1c95926bc304aea.zip | |
Allow failures for defined parsers
| -rw-r--r-- | .github/workflows/check-query-files-and-compilation.yml | 4 | ||||
| -rwxr-xr-x | scripts/check-queries.lua | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/.github/workflows/check-query-files-and-compilation.yml b/.github/workflows/check-query-files-and-compilation.yml index c771ae877..b9ad5b086 100644 --- a/.github/workflows/check-query-files-and-compilation.yml +++ b/.github/workflows/check-query-files-and-compilation.yml @@ -39,6 +39,8 @@ jobs: - name: Check query files (Unix) if: matrix.os != 'windows-latest' + env: + ALLOWED_INSTALLATION_FAILURES: haskell run: nvim --headless -c "luafile ./scripts/check-queries.lua" -c "q" - name: Compile parsers Windows @@ -53,6 +55,8 @@ jobs: - name: Check query files (Windows) if: matrix.os == 'windows-latest' + env: + ALLOWED_INSTALLATION_FAILURES: haskell run: C:\\tools\\neovim\\Neovim\\bin\\nvim.exe --headless -c "luafile ./scripts/check-queries.lua" -c "q" - uses: actions/upload-artifact@v2 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 |
