From 7d627000cec9f71cb162aeebdc929178e228a704 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Sun, 15 Nov 2015 22:26:44 +0200 Subject: [PATCH] Checkers clang_check and clang_tidy: workaround for a regression in Clang. Set TERM to dumb to avoid the checkers producing colour codes in output. --- plugin/syntastic.vim | 2 +- syntax_checkers/c/clang_check.vim | 3 +++ syntax_checkers/c/clang_tidy.vim | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index c8b63c1e..44589387 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-31' +let g:_SYNTASTIC_VERSION = '3.7.0-32' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/c/clang_check.vim b/syntax_checkers/c/clang_check.vim index 19e67f1a..63d0cdbe 100644 --- a/syntax_checkers/c/clang_check.vim +++ b/syntax_checkers/c/clang_check.vim @@ -43,9 +43,12 @@ function! SyntaxCheckers_c_clang_check_GetLocList() dict \ '%-G%\m%\%%(LLVM ERROR:%\|No compilation database found%\)%\@!%.%#,' . \ '%E%m' + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + return SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat, + \ 'env': env, \ 'defaults': {'bufnr': bufnr('')}, \ 'returns': [0, 1] }) endfunction diff --git a/syntax_checkers/c/clang_tidy.vim b/syntax_checkers/c/clang_tidy.vim index d3876eae..3124b233 100644 --- a/syntax_checkers/c/clang_tidy.vim +++ b/syntax_checkers/c/clang_tidy.vim @@ -43,9 +43,12 @@ function! SyntaxCheckers_c_clang_tidy_GetLocList() dict \ '%-G%\m%\%%(LLVM ERROR:%\|No compilation database found%\)%\@!%.%#,' . \ '%E%m' + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + return SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat, + \ 'env': env, \ 'defaults': {'bufnr': bufnr('')}, \ 'returns': [0, 1] }) endfunction