Files
ale/test/fixers/test_markdownlint_cli2_fixer_callback.vader
eff718bee9 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>
2026-08-21 11:22:09 +09:00

29 lines
843 B
Plaintext

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,
\}