summaryrefslogtreecommitdiffstats
path: root/runtime/compiler
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-06-14 17:41:28 +0100
committerBram Moolenaar <Bram@vim.org>2022-06-14 17:41:28 +0100
commit8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788 (patch)
tree301e0579e7d69a81f19f30c99eb1fbc278ee936f /runtime/compiler
parent217ea51ee4c4cb6cf690eb0da70cc4c81291aa2e (diff)
Update runtime files
Diffstat (limited to 'runtime/compiler')
-rw-r--r--runtime/compiler/perl.vim18
-rw-r--r--runtime/compiler/perlcritic.vim27
-rw-r--r--runtime/compiler/podchecker.vim28
3 files changed, 66 insertions, 7 deletions
diff --git a/runtime/compiler/perl.vim b/runtime/compiler/perl.vim
index a857caed8f..21e384fb85 100644
--- a/runtime/compiler/perl.vim
+++ b/runtime/compiler/perl.vim
@@ -1,7 +1,11 @@
-" Vim Compiler File
-" Compiler: Perl syntax checks (perl -Wc)
-" Maintainer: Christian J. Robinson <heptite@gmail.com>
-" Last Change: 2019 Jul 22
+" Vim compiler file
+" Compiler: Perl syntax checks (perl -Wc)
+" Maintainer: vim-perl <vim-perl@googlegroups.com>
+" Author: Christian J. Robinson <heptite@gmail.com>
+" Homepage: https://github.com/vim-perl/vim-perl
+" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
+" License: Vim License (see :help license)
+" Last Change: 2021 Nov 2
if exists("current_compiler")
finish
@@ -15,10 +19,10 @@ endif
let s:savecpo = &cpo
set cpo&vim
-if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
- let s:warnopt = 'w'
-else
+if get(g:, 'perl_compiler_force_warnings', 1)
let s:warnopt = 'W'
+else
+ let s:warnopt = 'w'
endif
if getline(1) =~# '-[^ ]*T'
diff --git a/runtime/compiler/perlcritic.vim b/runtime/compiler/perlcritic.vim
new file mode 100644
index 0000000000..cf0678eeb2
--- /dev/null
+++ b/runtime/compiler/perlcritic.vim
@@ -0,0 +1,27 @@
+" Vim compiler file
+" Compiler: perlcritic
+" Maintainer: vim-perl <vim-perl@googlegroups.com>
+" Author: Doug Kearns <dougkearns@gmail.com>
+" Homepage: https://github.com/vim-perl/vim-perl
+" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
+" License: Vim License (see :help license)
+" Last Change: 2021 Oct 20
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "perlcritic"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet makeprg=perlcritic\ --nocolor\ --quiet\ --verbose\ \"\\%f:\\%l:\\%c:\\%s:\\%m\\n\"
+CompilerSet errorformat=%f:%l:%c:%n:%m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/podchecker.vim b/runtime/compiler/podchecker.vim
new file mode 100644
index 0000000000..2cd4e13660
--- /dev/null
+++ b/runtime/compiler/podchecker.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: podchecker
+" Maintainer: vim-perl <vim-perl@googlegroups.com>
+" Author: Doug Kearns <dougkearns@gmail.com>
+" Homepage: https://github.com/vim-perl/vim-perl
+" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
+" License: Vim License (see :help license)
+" Last Change: 2021 Oct 20
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "podchecker"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet makeprg=podchecker\ -w
+CompilerSet errorformat=\*\*\*\ %tRROR:\ %m\ at\ line\ %l\ in\ file\ %f,
+ \\*\*\*\ %tARNING:\ %m\ at\ line\ %l\ in\ file\ %f,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save