mirror of
https://github.com/amix/vimrc
synced 2025-07-09 18:55:01 +08:00
Use sources_non_forked folder for pathogen path, with sources_non_forked_fallback folder as fallback.
This commit is contained in:
@ -1,43 +0,0 @@
|
||||
" Author: Carl Smedstad <carl.smedstad at protonmail dot com>
|
||||
" Description: cmake-lint for cmake files
|
||||
|
||||
let g:ale_cmake_cmake_lint_executable =
|
||||
\ get(g:, 'ale_cmake_cmake_lint_executable', 'cmake-lint')
|
||||
|
||||
let g:ale_cmake_cmake_lint_options =
|
||||
\ get(g:, 'ale_cmake_cmake_lint_options', '')
|
||||
|
||||
function! ale_linters#cmake#cmake_lint#Executable(buffer) abort
|
||||
return ale#Var(a:buffer, 'cmake_cmake_lint_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#cmake#cmake_lint#Command(buffer) abort
|
||||
let l:executable = ale_linters#cmake#cmake_lint#Executable(a:buffer)
|
||||
let l:options = ale#Var(a:buffer, 'cmake_cmake_lint_options')
|
||||
|
||||
return ale#Escape(l:executable) . ' ' . l:options . ' %t'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#cmake#cmake_lint#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^[^:]+:(\d+),?(\d+)?:\s\[([A-Z]\d+)\]\s(.+)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': l:match[2] + 0,
|
||||
\ 'type': 'W',
|
||||
\ 'code': l:match[3],
|
||||
\ 'text': l:match[4],
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('cmake', {
|
||||
\ 'name': 'cmake_lint',
|
||||
\ 'executable': function('ale_linters#cmake#cmake_lint#Executable'),
|
||||
\ 'command': function('ale_linters#cmake#cmake_lint#Command'),
|
||||
\ 'callback': 'ale_linters#cmake#cmake_lint#Handle',
|
||||
\})
|
@ -1,24 +0,0 @@
|
||||
" Author: Kenneth Benzie <k.benzie83@gmail.com>
|
||||
" Description: cmakelint for cmake files
|
||||
|
||||
let g:ale_cmake_cmakelint_executable =
|
||||
\ get(g:, 'ale_cmake_cmakelint_executable', 'cmakelint')
|
||||
|
||||
let g:ale_cmake_cmakelint_options =
|
||||
\ get(g:, 'ale_cmake_cmakelint_options', '')
|
||||
|
||||
function! ale_linters#cmake#cmakelint#Executable(buffer) abort
|
||||
return ale#Var(a:buffer, 'cmake_cmakelint_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#cmake#cmakelint#Command(buffer) abort
|
||||
return ale_linters#cmake#cmakelint#Executable(a:buffer)
|
||||
\ . ' ' . ale#Var(a:buffer, 'cmake_cmakelint_options') . ' %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('cmake', {
|
||||
\ 'name': 'cmakelint',
|
||||
\ 'executable': function('ale_linters#cmake#cmakelint#Executable'),
|
||||
\ 'command': function('ale_linters#cmake#cmakelint#Command'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
Reference in New Issue
Block a user