1
0
mirror of https://github.com/amix/vimrc synced 2025-07-21 03:44:59 +08:00
This commit is contained in:
huangqundl
2017-03-17 23:12:53 +08:00
parent 47b213d974
commit cba39b7326
855 changed files with 59981 additions and 35298 deletions

View File

@ -10,7 +10,7 @@
"
"============================================================================
if exists("g:loaded_syntastic_php_php_checker")
if exists('g:loaded_syntastic_php_php_checker')
finish
endif
let g:loaded_syntastic_php_php_checker = 1
@ -20,7 +20,7 @@ set cpo&vim
function! SyntaxCheckers_php_php_GetHighlightRegex(item)
let term = matchstr(a:item['text'], "\\munexpected '\\zs[^']\\+\\ze'")
return term != '' ? '\V' . escape(term, '\') : ''
return term !=# '' ? '\V' . escape(term, '\') : ''
endfunction
function! SyntaxCheckers_php_php_GetLocList() dict
@ -49,4 +49,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -9,11 +9,8 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
"
" See here for details of phpcs
" - phpcs (see http://pear.php.net/package/PHP_CodeSniffer)
if exists("g:loaded_syntastic_php_phpcs_checker")
if exists('g:loaded_syntastic_php_phpcs_checker')
finish
endif
let g:loaded_syntastic_php_phpcs_checker = 1
@ -22,13 +19,11 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_php_phpcs_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args': '--tab-width=' . &tabstop,
\ 'args_after': '--report=csv' })
let makeprg = self.makeprgBuild({ 'args_after': '--report=csv' })
let errorformat =
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity%.%#,'.
\ '"%f"\,%l\,%v\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]%.%#'
\ '"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
@ -43,4 +38,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -10,7 +10,7 @@
"
"============================================================================
if exists("g:loaded_syntastic_php_phplint_checker")
if exists('g:loaded_syntastic_php_phplint_checker')
finish
endif
let g:loaded_syntastic_php_phplint_checker = 1
@ -20,31 +20,31 @@ set cpo&vim
function! SyntaxCheckers_php_phplint_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\munresolved function \zs\S\+\ze')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\m\(class\|function\|method\) \zs\S\+\ze was declared as')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\maccess forbidden to \(private\|protected\) \(class\|constant\|method\|variable\|\(private\|protected\) property\) \zs\S\+\ze')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\musing deprecated \(class\|constant\|method\|property\|variable\) \zs\S\+\ze')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\munresolved function \zs\S\+\ze')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\munresolved function \zs\S\+\ze')
if term != ''
if term !=# ''
return '\V' . escape(term, '\')
endif
let term = matchstr(a:item['text'], '\munresolved function \zs\S\+\ze')
return term != '' ? '\V' . escape(term, '\') : ''
return term !=# '' ? '\V' . escape(term, '\') : ''
endfunction
function! SyntaxCheckers_php_phplint_GetLocList() dict
@ -88,4 +88,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -9,11 +9,8 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
"
" See here for details of phpmd
" - phpmd (see http://phpmd.org)
if exists("g:loaded_syntastic_php_phpmd_checker")
if exists('g:loaded_syntastic_php_phpmd_checker')
finish
endif
let g:loaded_syntastic_php_phpmd_checker = 1
@ -23,35 +20,35 @@ set cpo&vim
function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m\C^The \S\+ \w\+\(()\)\= \(has\|is not\|utilizes\)')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C^The \S\+ \(\w\+\)\(()\)\= .*', '\1', '')
endif
let term = matchstr(a:item['text'], '\m\C^Avoid \(variables with short\|excessively long variable\) names like \S\+\.')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C^Avoid \(variables with short\|excessively long variable\) names like \(\S\+\)\..*', '\2', '')
endif
let term = matchstr(a:item['text'], '\m\C^Avoid using short method names like \S\+::\S\+()\.')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C^Avoid using short method names like \S\+::\(\S\+\)()\..*', '\1', '')
endif
let term = matchstr(a:item['text'], '\m\C^\S\+ accesses the super-global variable ')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C accesses the super-global variable .*$', '', '')
endif
let term = matchstr(a:item['text'], '\m\C^Constant \S\+ should be defined in uppercase')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C^Constant \(\S\+\) should be defined in uppercase', '\1', '')
endif
let term = matchstr(a:item['text'], "\\m\\C^The '\\S\\+()' method which returns ")
if term != ''
return '\V'.substitute(term, "\\m\\C^The '\\(\\S\\+\\()' method which returns.*", '\1', '')
if term !=# ''
return '\V'.substitute(term, "\\m\\C^The '\\(\\S\\+\\)()' method which returns.*", '\1', '')
endif
let term = matchstr(a:item['text'], '\m\C variable \S\+ should begin with ')
if term != ''
if term !=# ''
return '\V'.substitute(term, '\m\C.* variable \(\S\+\) should begin with .*', '\1', '')
endif
let term = matchstr(a:item['text'], "\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\S\\+'")
if term != ''
if term !=# ''
return '\V'.substitute(term, "\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\(\\S\\+\\)'.*", '\2', '')
endif
return ''
@ -77,4 +74,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker: