gjslint.vim 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. "============================================================================
  2. "File: gjslint.vim
  3. "Description: Javascript syntax checker - using gjslint
  4. "Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
  5. "License: This program is free software. It comes without any warranty,
  6. " to the extent permitted by applicable law. You can redistribute
  7. " it and/or modify it under the terms of the Do What The Fuck You
  8. " Want To Public License, Version 2, as published by Sam Hocevar.
  9. " See http://sam.zoy.org/wtfpl/COPYING for more details.
  10. "============================================================================
  11. if exists('g:loaded_syntastic_javascript_gjslint_checker')
  12. finish
  13. endif
  14. let g:loaded_syntastic_javascript_gjslint_checker = 1
  15. let s:save_cpo = &cpo
  16. set cpo&vim
  17. function! SyntaxCheckers_javascript_gjslint_GetLocList() dict
  18. call syntastic#log#deprecationWarn('javascript_gjslint_conf', 'javascript_gjslint_args')
  19. let makeprg = self.makeprgBuild({
  20. \ 'args': '--nodebug_indentation',
  21. \ 'args_after': '--check_html --nosummary --unix_mode --nobeep' })
  22. let errorformat =
  23. \ "%f:%l:(New Error -%\\?\%n) %m," .
  24. \ "%f:%l:(-%\\?%n) %m," .
  25. \ "%-G1 files checked," .
  26. \ " no errors found.," .
  27. \ "%-G%.%#"
  28. return SyntasticMake({
  29. \ 'makeprg': makeprg,
  30. \ 'errorformat': errorformat })
  31. endfunction
  32. call g:SyntasticRegistry.CreateAndRegisterChecker({
  33. \ 'filetype': 'javascript',
  34. \ 'name': 'gjslint'})
  35. let &cpo = s:save_cpo
  36. unlet s:save_cpo
  37. " vim: set sw=4 sts=4 et fdm=marker: