From 6fb14d624b6081459360fdbba743f82cf84c8f92 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Thu, 16 Feb 2017 08:19:32 +0200 Subject: [PATCH] Checker nvcc: allow for leading spaces in warnings. --- plugin/syntastic.vim | 2 +- syntax_checkers/cuda/nvcc.vim | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 5ba774a0..074b0568 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.8.0-23' +let g:_SYNTASTIC_VERSION = '3.8.0-24' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/cuda/nvcc.vim b/syntax_checkers/cuda/nvcc.vim index bbd8e6dc..9601e73a 100644 --- a/syntax_checkers/cuda/nvcc.vim +++ b/syntax_checkers/cuda/nvcc.vim @@ -69,8 +69,9 @@ function! SyntaxCheckers_cuda_nvcc_GetLocList() dict \ 'defaults': {'type': 'E'} }) for e in loclist - if e['text'] =~? '\m^warning:' - let e['text'] = substitute(e['text'], '\m\c^warning:\s*', '', '') + let pat = matchstr(e['text'], '\m\c^\s*warning:\s*\zs.*') + if pat !=# '' + let e['text'] = pat let e['type'] = 'W' endif endfor