gjslint.vim 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_after': '--nosummary --unix_mode --nodebug_indentation --nobeep' })
  21. let errorformat =
  22. \ "%f:%l:(New Error -%\\?\%n) %m," .
  23. \ "%f:%l:(-%\\?%n) %m," .
  24. \ "%-G1 files checked," .
  25. \ " no errors found.," .
  26. \ "%-G%.%#"
  27. return SyntasticMake({
  28. \ 'makeprg': makeprg,
  29. \ 'errorformat': errorformat })
  30. endfunction
  31. call g:SyntasticRegistry.CreateAndRegisterChecker({
  32. \ 'filetype': 'javascript',
  33. \ 'name': 'gjslint'})
  34. let &cpo = s:save_cpo
  35. unlet s:save_cpo
  36. " vim: set sw=4 sts=4 et fdm=marker: