mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-10 03:31:34 +08:00
add option to lint diff buffers (#3185)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* add option to lint diff buffers * fix misaligned doc tag * update docs
This commit is contained in:
@@ -32,6 +32,7 @@ After:
|
||||
let b:funky_command_created = 0
|
||||
endif
|
||||
|
||||
unlet! g:ale_lint_diff
|
||||
unlet! b:funky_command_created
|
||||
unlet! b:fake_mode
|
||||
|
||||
@@ -79,6 +80,12 @@ Execute(DoNothing should return 1 for diff buffers):
|
||||
|
||||
AssertEqual 1, ale#ShouldDoNothing(bufnr(''))
|
||||
|
||||
Execute(DoNothing should return 0 for diff buffers when ale_lint_diff is set):
|
||||
let &diff = 1
|
||||
let g:ale_lint_diff = 1
|
||||
|
||||
AssertEqual 0, ale#ShouldDoNothing(bufnr(''))
|
||||
|
||||
Execute(The DoNothing check should work if the ALE globals aren't defined):
|
||||
unlet! g:ale_filetype_blacklist
|
||||
unlet! g:ale_maximum_file_size
|
||||
|
||||
Reference in New Issue
Block a user