summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Yang <harttle@harttle.com>2019-03-26 23:39:45 +0800
committerharttle <yangjvn@126.com>2019-04-11 16:24:59 +0800
commitd4841cedf22290a9746d220cd6682fac52262523 (patch)
treefa90efa035894c1aaf9dc9695e19688d7b545192
parentc820089c4434b621e8b30fbe73bbf9d01ee44f6f (diff)
downloadale-d4841cedf22290a9746d220cd6682fac52262523.zip
style: fecs related doc and vim scripts
-rw-r--r--ale_linters/css/fecs.vim3
-rw-r--r--ale_linters/html/fecs.vim3
-rw-r--r--autoload/ale/fixers/fecs.vim7
-rw-r--r--autoload/ale/handlers/fecs.vim4
-rw-r--r--doc/ale-css.txt8
-rw-r--r--doc/ale-supported-languages-and-tools.txt1
6 files changed, 9 insertions, 17 deletions
diff --git a/ale_linters/css/fecs.vim b/ale_linters/css/fecs.vim
index 4b54d55a..511847c6 100644
--- a/ale_linters/css/fecs.vim
+++ b/ale_linters/css/fecs.vim
@@ -1,9 +1,6 @@
" Author: harttle <yangjvn@126.com>
" Description: fecs for CSS files
-call ale#Set('css_fecs_executable', 'fecs')
-call ale#Set('css_fecs_use_global', get(g:, 'ale_use_global_executables', 0))
-
call ale#linter#Define('css', {
\ 'name': 'fecs',
\ 'executable': function('ale#handlers#fecs#GetExecutable'),
diff --git a/ale_linters/html/fecs.vim b/ale_linters/html/fecs.vim
index 5a49a6d8..15e00e12 100644
--- a/ale_linters/html/fecs.vim
+++ b/ale_linters/html/fecs.vim
@@ -1,9 +1,6 @@
" Author: harttle <yangjvn@126.com>
" Description: fecs for HTMl files
-call ale#Set('html_fecs_executable', 'fecs')
-call ale#Set('html_fecs_use_global', get(g:, 'ale_use_global_executables', 0))
-
call ale#linter#Define('html', {
\ 'name': 'fecs',
\ 'executable': function('ale#handlers#fecs#GetExecutable'),
diff --git a/autoload/ale/fixers/fecs.vim b/autoload/ale/fixers/fecs.vim
index c783588c..d692bc97 100644
--- a/autoload/ale/fixers/fecs.vim
+++ b/autoload/ale/fixers/fecs.vim
@@ -1,9 +1,6 @@
" Author: harttle <yangjvn@126.com>
" Description: Apply fecs format to a file.
-call ale#Set('html_fecs_executable', 'fecs')
-call ale#Set('html_fecs_use_global', get(g:, 'ale_use_global_executables', 0))
-
function! ale#fixers#fecs#Fix(buffer) abort
let l:executable = ale#handlers#fecs#GetExecutable(a:buffer)
@@ -11,10 +8,10 @@ function! ale#fixers#fecs#Fix(buffer) abort
return 0
endif
- let l:config_options = ' format --replace=true'
+ let l:config_options = ' format --replace=true %t'
return {
- \ 'command': ale#Escape(l:executable) . l:config_options . ' %t',
+ \ 'command': ale#Escape(l:executable) . l:config_options,
\ 'read_temporary_file': 1,
\}
endfunction
diff --git a/autoload/ale/handlers/fecs.vim b/autoload/ale/handlers/fecs.vim
index ad94c61d..5362edb9 100644
--- a/autoload/ale/handlers/fecs.vim
+++ b/autoload/ale/handlers/fecs.vim
@@ -38,9 +38,9 @@ function! ale#handlers#fecs#Handle(buffer, lines) abort
let l:obj.text = l:code_match[1]
endif
- if l:match[1] ==# 'WARN'
+ if l:match[1] is# 'WARN'
let l:obj.type = 'W'
- elseif l:match[1] ==# 'ERROR'
+ elseif l:match[1] is# 'ERROR'
let l:obj.type = 'E'
endif
diff --git a/doc/ale-css.txt b/doc/ale-css.txt
index a1e0ac5c..ff74b263 100644
--- a/doc/ale-css.txt
+++ b/doc/ale-css.txt
@@ -3,11 +3,11 @@ ALE CSS Integration *ale-css-options*
===============================================================================
-fecs *ale-css-fecs*
+fecs *ale-css-fecs*
-`fecs` options for CSS is the same as the options for JavaScript,
-and both of them reads `./.fecsrc` as the default configuration file.
-See: |ale-javascript-fecs|.
+`fecs` options for CSS is the same as the options for JavaScript, and both of
+them reads `./.fecsrc` as the default configuration file. See:
+|ale-javascript-fecs|.
===============================================================================
diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt
index 59115b81..b870505f 100644
--- a/doc/ale-supported-languages-and-tools.txt
+++ b/doc/ale-supported-languages-and-tools.txt
@@ -89,6 +89,7 @@ Notes:
* `crystal`!!
* CSS
* `csslint`
+ * `fecs`
* `prettier`
* `stylelint`
* Cucumber