hadolint.vim 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "============================================================================
  2. "File: hadolint.vim
  3. "Description: Dockerfile linter written in Haskell
  4. " (http://hadolint.lukasmartinelli.ch/).
  5. "Maintainer: Jesper B. Rosenkilde <jbr at humppa dot dk>
  6. "License: This program is free software. It comes without any warranty,
  7. " to the extent permitted by applicable law. You can redistribute
  8. " it and/or modify it under the terms of the Do What The Fuck You
  9. " Want To Public License, Version 2, as published by Sam Hocevar.
  10. " See http://sam.zoy.org/wtfpl/COPYING for more details.
  11. "
  12. "============================================================================
  13. if exists('g:loaded_syntastic_dockerfile_hadolint_checker')
  14. finish
  15. endif
  16. let g:loaded_syntastic_dockerfile_hadolint_checker = 1
  17. let s:save_cpo = &cpo
  18. set cpo&vim
  19. function! SyntaxCheckers_dockerfile_hadolint_GetLocList() dict
  20. let makeprg = self.makeprgBuild({})
  21. let errorformat = '%W%f:%l %m'
  22. return SyntasticMake({
  23. \ 'makeprg': makeprg,
  24. \ 'errorformat': errorformat,
  25. \ 'subtype': 'Style',
  26. \ 'returns': [0, 1] })
  27. endfunction
  28. call g:SyntasticRegistry.CreateAndRegisterChecker({
  29. \ 'filetype': 'dockerfile',
  30. \ 'name': 'hadolint'})
  31. let &cpo = s:save_cpo
  32. unlet s:save_cpo
  33. " vim: set sw=4 sts=4 et fdm=marker: