blob: cf9de6d361c91b7bf71273af98f108cea5c76246 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
" Author: w0rp <devw0rp@gmail.com>
" Description: flake8 for python files
let g:ale_python_flake8_executable =
\ get(g:, 'ale_python_flake8_executable', 'flake8')
let g:ale_python_flake8_args =
\ get(g:, 'ale_python_flake8_args', '')
function! ale_linters#python#flake8#GetExecutable(buffer) abort
return g:ale_python_flake8_executable
endfunction
function! ale_linters#python#flake8#GetCommand(buffer) abort
return ale_linters#python#flake8#GetExecutable(a:buffer)
\ . ' ' . g:ale_python_flake8_args . '--stdin-display-name %s -'
endfunction
call ale#linter#Define('python', {
\ 'name': 'flake8',
\ 'executable_callback': 'ale_linters#python#flake8#GetExecutable',
\ 'command_callback': 'ale_linters#python#flake8#GetCommand',
\ 'callback': 'ale#handlers#HandlePEP8Format',
\})
|