diff --git a/ale_linters/rego/opacheck.vim b/ale_linters/rego/opacheck.vim index 77d8c93a..479091d3 100644 --- a/ale_linters/rego/opacheck.vim +++ b/ale_linters/rego/opacheck.vim @@ -11,7 +11,7 @@ function! ale_linters#rego#opacheck#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'rego_opacheck_options') return ale#Escape(ale_linters#rego#opacheck#GetExecutable(a:buffer)) - \ . ' check %s --format json ' + \ . ' check %s:h --format json ' \ . (!empty(l:options) ? ' ' . l:options : '') endfunction diff --git a/test/linter/test_rego_opacheck.vader b/test/linter/test_rego_opacheck.vader index 3b672282..d0fa3117 100644 --- a/test/linter/test_rego_opacheck.vader +++ b/test/linter/test_rego_opacheck.vader @@ -8,9 +8,9 @@ After: Execute(The default command should be correct): AssertLinter 'opa', - \ ale#Escape('opa') . ' check %s --format json ' + \ ale#Escape('opa') . ' check %s:h --format json ' Execute(The default command should be overridden): let b:ale_rego_opacheck_executable = '/bin/other/opa' AssertLinter '/bin/other/opa', - \ ale#Escape('/bin/other/opa') . ' check %s --format json ' + \ ale#Escape('/bin/other/opa') . ' check %s:h --format json '