From b4c5e743ac66bd288017d769e06751cf9cda9a18 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 9 Nov 2024 08:43:43 +0800 Subject: vim-patch:6d9a145: runtime(compiler): add mypy and ruff compiler; update pylint linter mypy and ruff come from https://github.com/Konfekt/vim-compilers/tree/master/compiler and the former was added by @pbnj-dragon closes: vim/vim#16007 https://github.com/vim/vim/commit/6d9a145d719857fe461d045adf3b61ec4b4bb53f Co-authored-by: Konfekt --- runtime/compiler/pylint.vim | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'runtime/compiler/pylint.vim') diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim index 14e9696dbb..59408b4750 100644 --- a/runtime/compiler/pylint.vim +++ b/runtime/compiler/pylint.vim @@ -1,13 +1,21 @@ " Vim compiler file -" Compiler: Pylint for Python -" Maintainer: Daniel Moch -" Last Change: 2016 May 20 -" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) - -if exists("current_compiler") - finish -endif +" Compiler: Pylint for Python +" Maintainer: Daniel Moch +" Last Change: 2024 Nov 07 by The Vim Project (added params variable) + +if exists("current_compiler") | finish | endif let current_compiler = "pylint" -CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=ruff +let &l:makeprg = 'pylint ' . + \ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' . + \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", + \ (executable('getconf') ? '--jobs='..systemlist('getconf _NPROCESSORS_ONLN')[0] : ''))) +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit From eaf5ae6cc69a97e58365b409554783be9dd21385 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 13 Nov 2024 16:00:35 +0800 Subject: vim-patch:210c49b: runtime(compiler): update pylint linter (#31191) closes: vim/vim#16039 https://github.com/vim/vim/commit/210c49bbe8b2edf15fd4fbbc089ec128e4c9c0c9 Co-authored-by: Konfekt --- runtime/compiler/pylint.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/compiler/pylint.vim') diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim index 59408b4750..4c9c23e125 100644 --- a/runtime/compiler/pylint.vim +++ b/runtime/compiler/pylint.vim @@ -12,8 +12,7 @@ set cpo&vim " CompilerSet makeprg=ruff let &l:makeprg = 'pylint ' . \ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' . - \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", - \ (executable('getconf') ? '--jobs='..systemlist('getconf _NPROCESSORS_ONLN')[0] : ''))) + \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0')) exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# -- cgit