diff --git a/syntax_checkers/go/go.vim b/syntax_checkers/go/go.vim index 4875d1c4..27e12607 100644 --- a/syntax_checkers/go/go.vim +++ b/syntax_checkers/go/go.vim @@ -44,7 +44,7 @@ function! SyntaxCheckers_go_go_GetLocList() dict " Test files, i.e. files with a name ending in `_test.go`, are not " compiled by `go build`, therefore `go test` must be called for those. - if match(expand('%'), '_test.go$') == -1 + if match(expand('%'), '\m_test\.go$') == -1 let makeprg = 'go build ' . syntastic#c#NullOutput() else let makeprg = 'go test -c ' . syntastic#c#NullOutput() diff --git a/syntax_checkers/java/javac.vim b/syntax_checkers/java/javac.vim index 9a579df4..d6492a29 100644 --- a/syntax_checkers/java/javac.vim +++ b/syntax_checkers/java/javac.vim @@ -206,7 +206,7 @@ function! s:GetMavenClasspath() let mvn_classpath = s:RemoveCarriageReturn(line) break endif - if match(line,'Dependencies classpath:') >= 0 + if stridx(line,'Dependencies classpath:') >= 0 let class_path_next = 1 endif endfor @@ -246,13 +246,13 @@ function! s:MavenOutputDirectory() if has_key(mvn_properties, 'project.properties.build.dir') let output_dir = mvn_properties['project.properties.build.dir'] endif - if match(expand( '%:p:h' ), "src.main.java") >= 0 + if stridx(expand( '%:p:h' ), "src.main.java") >= 0 let output_dir .= '/target/classes' if has_key(mvn_properties, 'project.build.outputDirectory') let output_dir = mvn_properties['project.build.outputDirectory'] endif endif - if match(expand( '%:p:h' ), "src.test.java") >= 0 + if stridx(expand( '%:p:h' ), "src.test.java") >= 0 let output_dir .= '/target/test-classes' if has_key(mvn_properties, 'project.build.testOutputDirectory') let output_dir = mvn_properties['project.build.testOutputDirectory'] diff --git a/syntax_checkers/ocaml/camlp4o.vim b/syntax_checkers/ocaml/camlp4o.vim index d437b3b3..e50acb78 100644 --- a/syntax_checkers/ocaml/camlp4o.vim +++ b/syntax_checkers/ocaml/camlp4o.vim @@ -131,10 +131,10 @@ function! s:GetOtherMakeprg() let extension = expand('%:e') let makeprg = "" - if match(extension, 'mly') >= 0 && executable("menhir") + if stridx(extension, 'mly') >= 0 && executable("menhir") " ocamlyacc output can't be redirected, so use menhir let makeprg = "menhir --only-preprocess " . syntastic#util#shexpand('%') . " >" . syntastic#util#DevNull() - elseif match(extension,'mll') >= 0 && executable("ocamllex") + elseif stridx(extension,'mll') >= 0 && executable("ocamllex") let makeprg = "ocamllex -q " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%') else let makeprg = "camlp4o " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%') diff --git a/syntax_checkers/python/pyflakes.vim b/syntax_checkers/python/pyflakes.vim index e2c9680c..b66346f2 100644 --- a/syntax_checkers/python/pyflakes.vim +++ b/syntax_checkers/python/pyflakes.vim @@ -9,17 +9,17 @@ if exists("g:loaded_syntastic_python_pyflakes_checker") finish endif -let g:loaded_syntastic_python_pyflakes_checker=1 +let g:loaded_syntastic_python_pyflakes_checker = 1 function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i) - if match(a:i['text'], 'is assigned to but never used') > -1 - \ || match(a:i['text'], 'imported but unused') > -1 - \ || match(a:i['text'], 'undefined name') > -1 - \ || match(a:i['text'], 'redefinition of') > -1 - \ || match(a:i['text'], 'referenced before assignment') > -1 - \ || match(a:i['text'], 'duplicate argument') > -1 - \ || match(a:i['text'], 'after other statements') > -1 - \ || match(a:i['text'], 'shadowed by loop variable') > -1 + if stridx(a:i['text'], 'is assigned to but never used') >= 0 + \ || stridx(a:i['text'], 'imported but unused') >= 0 + \ || stridx(a:i['text'], 'undefined name') >= 0 + \ || stridx(a:i['text'], 'redefinition of') >= 0 + \ || stridx(a:i['text'], 'referenced before assignment') >= 0 + \ || stridx(a:i['text'], 'duplicate argument') >= 0 + \ || stridx(a:i['text'], 'after other statements') >= 0 + \ || stridx(a:i['text'], 'shadowed by loop variable') >= 0 " fun with Python's %r: try "..." first, then '...' let terms = split(a:i['text'], '"', 1) diff --git a/syntax_checkers/ruby/mri.vim b/syntax_checkers/ruby/mri.vim index d7bd6730..1007b84e 100644 --- a/syntax_checkers/ruby/mri.vim +++ b/syntax_checkers/ruby/mri.vim @@ -20,7 +20,7 @@ if !exists("g:syntastic_ruby_exec") endif function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i) - if match(a:i['text'], 'assigned but unused variable') > -1 + if stridx(a:i['text'], 'assigned but unused variable') >= 0 let term = split(a:i['text'], ' - ')[1] return '\V\<'.term.'\>' endif diff --git a/syntax_checkers/sh/sh.vim b/syntax_checkers/sh/sh.vim index 1ba8fe0e..0b21e31b 100644 --- a/syntax_checkers/sh/sh.vim +++ b/syntax_checkers/sh/sh.vim @@ -20,11 +20,11 @@ function! s:GetShell() let b:shell = '' let shebang = getbufline(bufnr('%'), 1)[0] if len(shebang) > 0 - if match(shebang, 'bash') >= 0 + if stridx(shebang, 'bash') >= 0 let b:shell = 'bash' - elseif match(shebang, 'zsh') >= 0 + elseif stridx(shebang, 'zsh') >= 0 let b:shell = 'zsh' - elseif match(shebang, 'sh') >= 0 + elseif stridx(shebang, 'sh') >= 0 let b:shell = 'sh' endif endif