mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
bicep: Lint files on disk instead of buffer (#4311)
I discovered that references to other Bicep files (modules) will be broken if running on a temporary file in a different location. I've found no way of providing an alternate path when invoking the command.
This commit is contained in:
@@ -26,7 +26,7 @@ function! ale_linters#bicep#bicep#Command(buffer) abort
|
|||||||
\ . l:nullfile
|
\ . l:nullfile
|
||||||
\ . ' '
|
\ . ' '
|
||||||
\ . l:options
|
\ . l:options
|
||||||
\ . ' %t'
|
\ . ' %s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#bicep#bicep#Handle(buffer, lines) abort
|
function! ale_linters#bicep#bicep#Handle(buffer, lines) abort
|
||||||
@@ -60,4 +60,5 @@ call ale#linter#Define('bicep', {
|
|||||||
\ 'command': function('ale_linters#bicep#bicep#Command'),
|
\ 'command': function('ale_linters#bicep#bicep#Command'),
|
||||||
\ 'callback': 'ale_linters#bicep#bicep#Handle',
|
\ 'callback': 'ale_linters#bicep#bicep#Handle',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ formatting.
|
|||||||
* BibTeX
|
* BibTeX
|
||||||
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
||||||
* Bicep
|
* Bicep
|
||||||
* [bicep](https://github.com/Azure/bicep)
|
* [bicep](https://github.com/Azure/bicep) :floppy_disk:
|
||||||
* BitBake
|
* BitBake
|
||||||
* [oelint-adv](https://github.com/priv-kweihmann/oelint-adv)
|
* [oelint-adv](https://github.com/priv-kweihmann/oelint-adv)
|
||||||
* Bourne Shell
|
* Bourne Shell
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ After:
|
|||||||
|
|
||||||
Execute(The default command should be correct):
|
Execute(The default command should be correct):
|
||||||
if has('win32')
|
if has('win32')
|
||||||
AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile NUL %t'
|
AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile NUL %s'
|
||||||
else
|
else
|
||||||
AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile /dev/null %t'
|
AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile /dev/null %s'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Execute(The executable should be configurable):
|
Execute(The executable should be configurable):
|
||||||
let g:ale_bicep_bicep_executable = 'foobar'
|
let g:ale_bicep_bicep_executable = 'foobar'
|
||||||
|
|
||||||
if has('win32')
|
if has('win32')
|
||||||
AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile NUL %t'
|
AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile NUL %s'
|
||||||
else
|
else
|
||||||
AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile /dev/null %t'
|
AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile /dev/null %s'
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user