make all loclist items errors by default
If a syntax checker returns items with blank 'type' keys, then make them errors. This simplifies things since we were previously making the assumption that empty types are errors anyway. It also fixes a bug in EchoCurrentError() function that was due to not checking for a blank ty pe.
This commit is contained in:
parent
fb0259a4ef
commit
755eddaa06
@ -163,7 +163,10 @@ function! s:CacheErrors()
|
|||||||
"functions legally for filetypes like "gentoo-metadata"
|
"functions legally for filetypes like "gentoo-metadata"
|
||||||
let ft = substitute(&ft, '-', '_', 'g')
|
let ft = substitute(&ft, '-', '_', 'g')
|
||||||
if s:Checkable(ft)
|
if s:Checkable(ft)
|
||||||
call extend(s:LocList(), SyntaxCheckers_{ft}_GetLocList())
|
let errors = SyntaxCheckers_{ft}_GetLocList()
|
||||||
|
"make errors have type "E" by default
|
||||||
|
call SyntasticAddToErrors(errors, {'type': 'E'})
|
||||||
|
call extend(s:LocList(), errors)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@ -211,7 +214,7 @@ function! s:ErrorsForType(type)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Errors()
|
function! s:Errors()
|
||||||
return extend(s:ErrorsForType("E"), s:ErrorsForType(''))
|
return extend(s:ErrorsForType("E"))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Warnings()
|
function! s:Warnings()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user