summaryrefslogtreecommitdiff
path: root/ale_linters/scss/sasslint.vim
diff options
context:
space:
mode:
authorBen Falconer <ben@falconers.me.uk>2018-05-11 10:45:41 +0100
committerBen Falconer <ben@falconers.me.uk>2018-05-15 14:36:31 +0100
commit8a1099bb59696185a77422ae12e3e384b0eeb81b (patch)
treeb99b72dc018fe91e6e5caf62bb6ecf2547994805 /ale_linters/scss/sasslint.vim
parent38c66d33fe8022803497c49239b06112ccbd0a83 (diff)
downloadale-8a1099bb59696185a77422ae12e3e384b0eeb81b.zip
Run sass-lint from the target's directory
Diffstat (limited to 'ale_linters/scss/sasslint.vim')
-rw-r--r--ale_linters/scss/sasslint.vim14
1 files changed, 12 insertions, 2 deletions
diff --git a/ale_linters/scss/sasslint.vim b/ale_linters/scss/sasslint.vim
index bd016465..f6075001 100644
--- a/ale_linters/scss/sasslint.vim
+++ b/ale_linters/scss/sasslint.vim
@@ -1,8 +1,18 @@
-" Author: KabbAmine - https://github.com/KabbAmine
+" Author: KabbAmine - https://github.com/KabbAmine, Ben Falconer
+" <ben@falconers.me.uk>
+
+function! ale_linters#scss#sasslint#GetCommand(buffer) abort
+ return ale#path#BufferCdString(a:buffer)
+ \ . ale#Escape('sass-lint')
+ \ . ' -v'
+ \ . ' -q'
+ \ . ' -f compact'
+ \ . ' %t'
+endfunction
call ale#linter#Define('scss', {
\ 'name': 'sasslint',
\ 'executable': 'sass-lint',
-\ 'command': 'sass-lint -v -q -f compact %t',
+\ 'command_callback': 'ale_linters#scss#sasslint#GetCommand',
\ 'callback': 'ale#handlers#css#HandleCSSLintFormat',
\})