From a882ecbc808694e8e0a50376e2fd1051c16ca399 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 17 Apr 2017 14:30:19 +0300 Subject: [PATCH] Checker dartanalyzer: "--machine" has been renamed in 1.23.0. --- plugin/syntastic.vim | 2 +- syntax_checkers/dart/dartanalyzer.vim | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index a6cb8ab1..db09b4af 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-38' +let g:_SYNTASTIC_VERSION = '3.8.0-39' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/dart/dartanalyzer.vim b/syntax_checkers/dart/dartanalyzer.vim index 63b8267b..7afc5e55 100644 --- a/syntax_checkers/dart/dartanalyzer.vim +++ b/syntax_checkers/dart/dartanalyzer.vim @@ -30,7 +30,10 @@ function! SyntaxCheckers_dart_dartanalyzer_GetHighlightRegex(error) endfunction function! SyntaxCheckers_dart_dartanalyzer_GetLocList() dict - let makeprg = self.makeprgBuild({ 'args_after': '--machine' }) + if !exists('s:format_machine') + let s:format_machine = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 23]) ? '--format=machine' : '--machine' + endif + let makeprg = self.makeprgBuild({ 'args_after': s:format_machine }) " Machine readable format looks like: " SEVERITY|TYPE|ERROR_CODE|FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE