Skip to content
This repository was archived by the owner on Aug 12, 2023. It is now read-only.

Fix markdownlint_cli2 built-in #1257

Closed
wants to merge 1 commit into from
Closed

Fix markdownlint_cli2 built-in #1257

wants to merge 1 commit into from

Conversation

dngray
Copy link

@dngray dngray commented Nov 26, 2022

Fixes: #1256

It seems to work for me.

@jose-elias-alvarez
Copy link
Owner

So the issue here is that markdownlint-cli2 is meant to lint globs, not single files (see the documentation). The user either needs to specify a globs property in their config file or add an argument in their null-ls config that specifies a glob to be linted, e.g. args = { "**/*.md" }. Can we update the documentation accordingly?

@dngray
Copy link
Author

dngray commented Nov 30, 2022

Sure, I didn't have a lot of experience with this.

Would you like me to open an issue upstream?

@jose-elias-alvarez
Copy link
Owner

I think it's working as expected, so I just mean in terms of updating our documentation here. If you look at the built-in's source, you'll see that we have a field where we can inject Markdown that will then be output into this file. We can then tell users about the specific configuration requirements for this source.

@dngray
Copy link
Author

dngray commented Apr 24, 2023

So are you saying:

local null_ls = require('null-ls')
null_ls.setup {
  sources = {
    null_ls.builtins.diagnostics.markdownlint_cli2.with {
      args = { "**/*.md" },
    },
  },
}

Is actually correct?

@jose-elias-alvarez
Copy link
Owner

You could do that, or you could use globs a config file (which I imagine would be the preferred approach on non-solo projects). You can see this document for info on adding to the documentation.

@dngray dngray closed this by deleting the head repository Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

markdownlint_cli2 not working with builtin
2 participants