Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for markdownlint-cli2 #3750

Closed
craigmac opened this issue Jun 1, 2021 · 2 comments · Fixed by #4358
Closed

Add support for markdownlint-cli2 #3750

craigmac opened this issue Jun 1, 2021 · 2 comments · Fixed by #4358
Labels
new tool Support for new linters, fixers, etc.

Comments

@craigmac
Copy link

craigmac commented Jun 1, 2021

Name: markdownlint-cli2
URL: https://github.com/davidanson/markdownlint-cli2

This is the linter CLI behind the VS Code markdownlint plugin, so it's in heavy usage. It supports inheritance of rule configuration files, which original markdownlint-cli does not. It could be as simple as allowing current "markdownlint" linter to specify the executable and allowing user to point to markdownlint-cli2 binary instead, but as of now I can't find a documented way or option to do that.

@craigmac craigmac added the new tool Support for new linters, fixers, etc. label Jun 1, 2021
@goetzc
Copy link
Contributor

goetzc commented Nov 14, 2022

@craigmac, in the meantime you can use a symlink or rename the executable.

@craigmac
Copy link
Author

I've just put in ~/.vim/after/ale_linters/markdown/markdownlintcli2.vim:

call ale#linter#Define('markdown', {
\   'name': 'markdownlintcli2',
\   'executable': 'markdownlint-cli2',
\   'lint_file': 1,
\   'output_stream': 'stderr',
\   'command': '%e %s',
\   'callback': 'ale#handlers#markdownlint#Handle'
\})

Because it does a few things different than the markdownlint linter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new tool Support for new linters, fixers, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants