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

[FEAT] stdin support #414

Closed
xudyang1 opened this issue Sep 19, 2024 · 2 comments
Closed

[FEAT] stdin support #414

xudyang1 opened this issue Sep 19, 2024 · 2 comments
Labels
enhancement New feature or request fixed in next Fixed in the "next" branch for the next release

Comments

@xudyang1
Copy link

markdownlint-cli supports read from stdin, and markdownlint itself supports --stdin option to parse stdin input. Is it possible to make markdownlint-cli2 support stdin?

@DavidAnson
Copy link
Owner

I'll look into whether it is straightforward to do this by supporting - as with cat and tar. but if it is not, I will leave things as they are and recommend those other tools for this scenario.

FYI, I've asked before, and have not heard a particularly compelling scenario for why standard input was necessary versus creating and using a temporary file.

@DavidAnson DavidAnson added the enhancement New feature or request label Sep 19, 2024
@xudyang1
Copy link
Author

I'll look into whether it is straightforward to do this by supporting - as with cat and tar. but if it is not, I will leave things as they are and recommend those other tools for this scenario.

FYI, I've asked before, and have not heard a particularly compelling scenario for why standard input was necessary versus creating and using a temporary file.

I would not say standard input is necessary for linting, but it does help editors like neovim to update diagnostics after changing the active buffer (without saving it to disk). Currently, nvim-lint uses markdownlint and markdownlint-cli2 without stdin support, and because of that, users have to save the buffer to see diagnostics update. I am also trying to customize my configuration to make markdownlint in nvim-lint work from standard input, in that case, I would like to stick with markdownlint if it works well.

Anyway, thank you for developing an amazing linting/formatting tool for markdown!

@DavidAnson DavidAnson added the fixed in next Fixed in the "next" branch for the next release label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next Fixed in the "next" branch for the next release
Projects
None yet
Development

No branches or pull requests

2 participants