add doc and test

This commit is contained in:
cyy
2019-09-23 10:43:31 +08:00
parent 983c7e8805
commit 9d1a71a5cb
8 changed files with 65 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ let s:default_registry = {
\ 'fish_indent': {
\ 'function': 'ale#fixers#fish_indent#Fix',
\ 'suggested_filetypes': ['fish'],
\ 'description': 'Fix fish shell scripts with fish_indent.',
\ 'description': 'Format fish scripts using fish_indent.',
\ },
\ 'gofmt': {
\ 'function': 'ale#fixers#gofmt#Fix',

View File

@@ -1,12 +1,12 @@
" Author: Chen YuanYuan <cyyever@outlook.com>
" Description: Integration of fish_indent with ALE.
call ale#Set('fish_indent_executable', 'fish_indent')
call ale#Set('fish_indent_options', '')
call ale#Set('fish_fishindent_executable', 'fish_indent')
call ale#Set('fish_fishindent_options', '')
function! ale#fixers#fish_indent#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'fish_indent_executable')
let l:options = ale#Var(a:buffer, 'fish_indent_options')
let l:executable = ale#Var(a:buffer, 'fish_fishindent_executable')
let l:options = ale#Var(a:buffer, 'fish_fishindent_options')
let l:filename = ale#Escape(bufname(a:buffer))
return {