mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
Before:
|
|
call ale#assert#SetUpLinterTest('jinja', 'j2lint')
|
|
|
|
After:
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(The pycodestyle command callback should allow options):
|
|
let g:ale_jinja_j2lint_options = '--exclude=test*.j2'
|
|
|
|
AssertLinter 'j2lint',
|
|
\ ale#Escape('j2lint') . ' --exclude=test*.j2 %t'
|
|
|
|
Execute(The j2lint executable should be configurable):
|
|
let g:ale_jinja_j2lint_executable = '~/.local/bin/j2lint'
|
|
|
|
AssertLinter '~/.local/bin/j2lint',
|
|
\ ale#Escape('~/.local/bin/j2lint'). ' %t'
|
|
|
|
Execute(Setting executable to 'pipenv' appends 'run j2lint'):
|
|
let g:ale_jinja_j2lint_executable = 'path/to/pipenv'
|
|
|
|
AssertLinter 'path/to/pipenv',
|
|
\ ale#Escape('path/to/pipenv') . ' run j2lint %t'
|
|
|
|
Execute(Pipenv is detected when jinja_j2lint_auto_pipenv is set):
|
|
let g:ale_jinja_j2lint_auto_pipenv = 1
|
|
call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
|
|
|
|
AssertLinter 'pipenv',
|
|
\ ale#Escape('pipenv') . ' run j2lint %t'
|
|
|
|
Execute(Setting executable to 'poetry' appends 'run j2lint'):
|
|
let g:ale_jinja_j2lint_executable = 'path/to/poetry'
|
|
|
|
AssertLinter 'path/to/poetry',
|
|
\ ale#Escape('path/to/poetry') . ' run j2lint %t'
|
|
|
|
Execute(Poetry is detected when jinja_j2lint_auto_poetry is set):
|
|
let g:ale_jinja_j2lint_auto_poetry = 1
|
|
call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
|
|
|
|
AssertLinter 'poetry',
|
|
\ ale#Escape('poetry') . ' run j2lint %t'
|
|
|
|
Execute(Setting executable to 'uv' appends 'run j2lint'):
|
|
let g:ale_jinja_j2lint_executable = 'path/to/uv'
|
|
|
|
AssertLinter 'path/to/uv',
|
|
\ ale#Escape('path/to/uv') . ' run j2lint %t'
|
|
|
|
Execute(uv is detected when jinja_j2lint_auto_uv is set):
|
|
let g:ale_jinja_j2lint_auto_uv = 1
|
|
call ale#test#SetFilename('../test-files/python/uv/whatever.py')
|
|
|
|
AssertLinter 'uv',
|
|
\ ale#Escape('uv') . ' run j2lint %t'
|