New checker po/dennis for gettext PO files.

This commit is contained in:
LCD 47 2017-04-24 18:37:43 +03:00
parent a2333da98c
commit 584fe056b4
3 changed files with 64 additions and 3 deletions

View File

@ -2245,10 +2245,28 @@ SYNTAX CHECKERS FOR GETTEXT PO *syntastic-checkers-po*
The following checkers are available for gettext .po files (filetype "po"): The following checkers are available for gettext .po files (filetype "po"):
1. msgfmt...................|syntastic-po-msgfmt| 1. Dennis...................|syntastic-po-dennis|
2. msgfmt...................|syntastic-po-msgfmt|
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
1. msgfmt *syntastic-po-msgfmt* 1. Dennis *syntastic-po-dennis*
Name: dennis
Maintainer: LCD 47 <lcd047@gmail.com>
"Dennis" is a set of utilities for working with gettext Portable Object
(http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
translation files. See the program's manual for details:
http://dennis.readthedocs.io/en/latest/linting.html
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
2. msgfmt *syntastic-po-msgfmt*
Name: msgfmt Name: msgfmt
Maintainer: Ryo Okubo <syucream1031@gmail.com> Maintainer: Ryo Okubo <syucream1031@gmail.com>

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.8.0-43' let g:_SYNTASTIC_VERSION = '3.8.0-44'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -0,0 +1,43 @@
"============================================================================
"File: dennis.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_po_dennis_checker')
finish
endif
let g:loaded_syntastic_po_dennis_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_po_dennis_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe_after': 'lint',
\ 'post_args_after': '--reporter line' })
let errorformat = '%f:%l:%c:%t%n:%m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'po',
\ 'name': 'dennis',
\ 'exec': 'dennis-cmd' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: