pylint.vim 798 B

12345678910111213141516171819202122
  1. " Vim compiler file
  2. " Compiler: Pylint for Python
  3. " Maintainer: Daniel Moch <daniel@danielmoch.com>
  4. " Last Change: 2024 Nov 07 by The Vim Project (added params variable)
  5. " 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
  6. if exists("current_compiler") | finish | endif
  7. let current_compiler = "pylint"
  8. let s:cpo_save = &cpo
  9. set cpo&vim
  10. " CompilerSet makeprg=ruff
  11. let &l:makeprg = 'pylint ' .
  12. \ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' .
  13. \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0'))
  14. exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
  15. CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%#
  16. let &cpo = s:cpo_save
  17. unlet s:cpo_save