Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: run opacheck on entire dir for more context #4531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ale_linters/rego/opacheck.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/linter/test_rego_opacheck.vader
Original file line number Diff line number Diff line change
Expand Up @@ -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 '