mirror of
https://github.com/dense-analysis/ale.git
synced 2026-09-21 03:03:13 +08:00
Fix markdownlint fixer and add markdownlint-cli2 (#5165)
* fix(tests): fix ale_c_build_dir_names being unset in tests (#5109) - Use ale#Set() to set the ale_c_build_dir_names variable. - Ensure SetUpLinterTest() is called before any Save commands in tests. - Add c.vim to runtime before non-linter tests are executed. - Remove workarounds in c.vim. * feat: Load Prettier from cjs also * fix: wrong command for markdownlint * feat: explicit support for markdownlint-cli2 - Add markdownlint-cli2 linter and fixer, separate from markdownilnt-cli - Rename markdownlint to markdownlint-cli - Keep markdownlint as alias for markdownlint-cli --------- Co-authored-by: w0rp <devw0rp@gmail.com> Co-authored-by: Horacio Sanson <horacio.sanson@dena.jp>
This commit is contained in:
co-authored by
w0rp
Horacio Sanson
parent
1c6e71732f
commit
eff718bee9
@@ -0,0 +1,28 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('markdown', 'markdownlint-cli2')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The default command should use a temporary file):
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('markdownlint-cli2') . ' --fix %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let g:ale_markdownlint_cli2_executable = 'custom_markdownlint_cli2'
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('custom_markdownlint_cli2') . ' --fix %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute(Custom options should not remove the required --fix option):
|
||||
let g:ale_markdownlint_cli2_executable = 'markdownlint-cli2'
|
||||
let g:ale_markdownlint_cli2_options = '--no-globs'
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('markdownlint-cli2') . ' --fix --no-globs %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
@@ -4,14 +4,25 @@ Before:
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute:
|
||||
Execute(The default command should use a temporary file):
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('markdownlint') . ' --fix',
|
||||
\ 'command': ale#Escape('markdownlint') . ' --fix %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute:
|
||||
Execute(The executable should be configurable):
|
||||
let g:ale_markdownlint_executable = 'custom_markdownlint'
|
||||
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('custom_markdownlint') . ' --fix',
|
||||
\ 'command': ale#Escape('custom_markdownlint') . ' --fix %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute(Custom options should not remove the required --fix option):
|
||||
let g:ale_markdownlint_executable = 'markdownlint'
|
||||
let g:ale_markdownlint_options = '--quiet'
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': ale#Escape('markdownlint') . ' --fix --quiet %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Reference in New Issue
Block a user