Only cache the imports when the syntax checker is first loaded. Also,
there was a bug in the logic that was causing the imports to be set to
"" on the second run.
Make the imports var script local since we are not allowing users to
change it.
init g:syntastic_check_on_open with the rest of the options - this means
we only check exists("...") once rather than every time the autocmd is
run. Plus it reads better IMO.
The jslint guys have changed their error format again. Update the syntax
checker to handle it.
Currently jslint outputs a "use strict" error if a function doesnt have
'use strict' at the top. This is not good for our purposes, so just
filter this out for now.
move some code out of AutoToggleLocList and into UpdateErrors so that
AutoToggleLocList is only responsible for displaying/hiding the location
list window
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 reverts commit e90aa61ca6.
The idea here was to only close the location list window if it could be
verified that it contained only syntastic data. This was done by
comparing the current location list with b:syntastic_loclist to see if
they are the same.
The problem is that, after we recheck errors, b:syntastic_loclist is
empty (if the user has fixed everything) so it doesnt match
getloclist(0) so we cant close it automatically.
Revert this for now and worry about the issue later - if a user
complains or if a new plugin that uses location lists comes up.
Conflicts:
plugin/syntastic.vim
This allows us to lazy init b:syntastic_loclist so we dont have to worry
about doing `if exists("b:syntastic_loclist")` anywhere.
Im a bit worried about doing things like
s:LocList()[0]['lnum']
since im not sure that that syntax is supported for older versions of
vim.