1- if exists (' g:loaded_syntastic_util_autoload' ) || ! exists (" g:loaded_syntastic_plugin" )
1+ if exists (' g:loaded_syntastic_util_autoload' ) || ! exists (' g:loaded_syntastic_plugin' )
22 finish
33endif
44let g: loaded_syntastic_util_autoload = 1
@@ -21,7 +21,7 @@ endfunction " }}}2
2121
2222" Get directory separator
2323function ! syntastic#util#Slash () abort " {{{2
24- return (! exists (" +shellslash" ) || &shellslash ) ? ' /' : ' \'
24+ return (! exists (' +shellslash' ) || &shellslash ) ? ' /' : ' \'
2525endfunction " }}}2
2626
2727function ! syntastic#util#CygwinPath (path ) abort " {{{2
@@ -53,19 +53,19 @@ function! syntastic#util#tmpdir() abort " {{{2
5353
5454 if (has (' unix' ) || has (' mac' )) && executable (' mktemp' )
5555 " TODO: option "-t" to mktemp(1) is not portable
56- let tmp = $TMPDIR != ' ' ? $TMPDIR : $TMP != ' ' ? $TMP : ' /tmp'
56+ let tmp = $TMPDIR !=# ' ' ? $TMPDIR : $TMP !=# ' ' ? $TMP : ' /tmp'
5757 let out = split (syntastic#util#system (' mktemp -q -d ' . tmp . ' /vim-syntastic-' . getpid () . ' -XXXXXXXX' ), " \n " )
5858 if v: shell_error == 0 && len (out) == 1
5959 let tempdir = out[0 ]
6060 endif
6161 endif
6262
63- if tempdir == ' '
63+ if tempdir == # ' '
6464 if has (' win32' ) || has (' win64' )
6565 let tempdir = $TEMP . syntastic#util#Slash () . ' vim-syntastic-' . getpid ()
6666 elseif has (' win32unix' )
6767 let tempdir = syntastic#util#CygwinPath (' /tmp/vim-syntastic-' . getpid ())
68- elseif $TMPDIR != ' '
68+ elseif $TMPDIR !=# ' '
6969 let tempdir = $TMPDIR . ' /vim-syntastic-' . getpid ()
7070 else
7171 let tempdir = ' /tmp/vim-syntastic-' . getpid ()
@@ -97,7 +97,7 @@ function! syntastic#util#rmrf(what) abort " {{{2
9797 \ has (' win16' ) || has (' win95' ) || has (' dos16' ) || has (' dos32' ) ? ' deltree /Y' : ' '
9898 endif
9999
100- if s: rmrf != ' '
100+ if s: rmrf !=# ' '
101101 silent ! call syntastic#util#system (s: rmrf . ' ' . syntastic#util#shescape (a: what ))
102102 else
103103 call s: _rmrf (a: what )
@@ -120,7 +120,7 @@ endfunction " }}}2
120120function ! syntastic#util#parseShebang () abort " {{{2
121121 for lnum in range (1 , 5 )
122122 let line = getline (lnum)
123- if line = ~ ' ^#!'
123+ if line = ~# ' ^#!'
124124 let line = substitute (line , ' \v^#!\s*(\S+/env(\s+-\S+)*\s+)?' , ' ' , ' ' )
125125 let exe = matchstr (line , ' \m^\S*\ze' )
126126 let args = split (matchstr (line , ' \m^\S*\zs.*' ))
@@ -190,7 +190,7 @@ function! syntastic#util#wideMsg(msg) abort " {{{2
190190
191191 " This is here because it is possible for some error messages to
192192 " begin with \n which will cause a "press enter" prompt.
193- let msg = substitute (a: msg , " \n " , " " , " g " )
193+ let msg = substitute (a: msg , " \n " , ' ' , ' g ' )
194194
195195 " convert tabs to spaces so that the tabs count towards the window
196196 " width as the proper amount of characters
@@ -232,15 +232,15 @@ function! syntastic#util#findInParent(what, where) abort " {{{2
232232 let here = fnamemodify (a: where , ' :p' )
233233
234234 let root = syntastic#util#Slash ()
235- if syntastic#util#isRunningWindows () && here[1 ] == ' :'
235+ if syntastic#util#isRunningWindows () && here[1 ] == # ' :'
236236 " The drive letter is an ever-green source of fun. That's because
237237 " we don't care about running syntastic on Amiga these days. ;)
238238 let root = fnamemodify (root, ' :p' )
239239 let root = here[0 ] . root[1 :]
240240 endif
241241
242242 let old = ' '
243- while here != ' '
243+ while here !=# ' '
244244 let p = split (globpath (here, a: what , 1 ), ' \n' )
245245
246246 if ! empty (p )
@@ -284,7 +284,7 @@ endfunction " }}}2
284284
285285" Escape arguments
286286function ! syntastic#util#argsescape (opt ) abort " {{{2
287- if type (a: opt ) == type (' ' ) && a: opt != ' '
287+ if type (a: opt ) == type (' ' ) && a: opt !=# ' '
288288 return [a: opt ]
289289 elseif type (a: opt ) == type ([])
290290 return map (copy (a: opt ), ' syntastic#util#shescape(v:val)' )
@@ -345,14 +345,14 @@ function! s:_translateFilter(filters) abort " {{{2
345345 endfor
346346
347347 if conditions == []
348- let conditions = [" 1 " ]
348+ let conditions = [' 1 ' ]
349349 endif
350350 return len (conditions) == 1 ? conditions[0 ] : join (map (conditions, ' "(" . v:val . ")"' ), ' && ' )
351351endfunction " }}}2
352352
353353function ! s: _translateElement (key , term ) abort " {{{2
354354 let fkey = a: key
355- if fkey[0 ] == ' !'
355+ if fkey[0 ] == # ' !'
356356 let fkey = fkey[1 :]
357357 let not = 1
358358 else
@@ -377,13 +377,13 @@ function! s:_translateElement(key, term) abort " {{{2
377377 let op = not ? ' =~# ' : ' !~# '
378378 let ret = ' bufname(str2nr(v:val["bufnr"]))'
379379 let mod = fkey[4 :]
380- if mod != ' '
380+ if mod !=# ' '
381381 let ret = ' fnamemodify(' . ret . ' , ' . string (mod ) . ' )'
382382 endif
383383 let ret .= op . string (a: term )
384384 else
385385 call syntastic#log#warn (' quiet_messages: ignoring invalid key ' . strtrans (string (fkey)))
386- let ret = " 1 "
386+ let ret = ' 1 '
387387 endif
388388 return ret
389389endfunction " }}}2
0 commit comments