From 8a1099bb59696185a77422ae12e3e384b0eeb81b Mon Sep 17 00:00:00 2001 From: Ben Falconer Date: Fri, 11 May 2018 10:45:41 +0100 Subject: Run sass-lint from the target's directory --- ale_linters/scss/sasslint.vim | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ale_linters/scss') 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 +" + +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', \}) -- cgit v1.2.3