]> git.madduck.net Git - etc/vim.git/blob - autoload/ale/fixers/protolint.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / autoload / ale / fixers / protolint.vim
1 " Author: Yohei Yoshimuta <yoheimuta@gmail.com>
2 " Description: Integration of protolint with ALE.
3
4 call ale#Set('proto_protolint_executable', 'protolint')
5 call ale#Set('proto_protolint_config', '')
6
7 function! ale#fixers#protolint#GetExecutable(buffer) abort
8     let l:executable = ale#Var(a:buffer, 'proto_protolint_executable')
9
10     return ale#Escape(l:executable)
11 endfunction
12
13 function! ale#fixers#protolint#Fix(buffer) abort
14     let l:executable = ale#fixers#protolint#GetExecutable(a:buffer)
15     let l:config = ale#Var(a:buffer, 'proto_protolint_config')
16
17     return {
18     \   'command': l:executable
19     \       . (!empty(l:config) ? ' -config_path=' . ale#Escape(l:config) : '')
20     \       . ' -fix'
21     \       . ' %t',
22     \   'read_temporary_file': 1,
23     \}
24 endfunction
25
26