-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Unintuitive handling of .markdownlintignore files #1
Comments
And my "✅" updated example is even wrong – the second pattern should be |
This is explained here: igorshubovych/markdownlint-cli#108 (comment) As you note, everything you want to do is possible with the current implementation. It's just slightly different than usual. I haven't come up with a way around this yet, though I'll keep thinking about it. Would using a different file name for the ignore file have helped avoid the expectations you had that were wrong? |
Yes, for example, if it was an But even better would be to support the ignore format, ideally with hierarchy as well (#2). I don't know how ripgrep or fd do that but for example, fd can find $ time fd -g '**/*.md' .
fd -g '**/*.md' . 0.02s user 0.02s system 270% cpu 0.014 total |
The ignore configuration can't (currently) be in one of the config files like you suggest because those files are only found and parsed as part of the command-line globbing (and it's too late to start ignoring then). Regarding your timings, the current implementation of The obvious choice to implement this behavior consistent with I want to do the ignoring as an integral part of the globbing operation which is why |
That makes sense, thanks for the explanation.
cli2 is fast and I love that but achieves it by explicit globbing. My point was that
I'd probably vote for that but it's a bit ugly and "proper" ignore support would be better, which leads me to:
I also don't know if there's a Node.js module that would process ignore files and be fast at the same time 😀. For example, We once needed to find I think (I realize that plain Node.js implementation would be better but Rust binaries are cross-platform and usually unbelievably fast.) |
Quick comments since I don't have a lot of time right now: CLI2 uses the I had an idea this morning that I feel optimistic about. I will remove support for I have a philosophical objection to using precompiled binaries from a Node application. It hurts platform-independence and is much harder to audit from a security perspective. That is a fine idea, but not something I am really open to. |
Since I believe ignore files would be the best UX, I tried to do another search for packages that would be able to do it. My conclusion:
So nothing directly usable, I think. I was also thinking about making fd/ripgrep opt-in, like |
Thanks for the investigation!
CORRECTION: I was going to try So I think I'll explore the |
It took me a while to realize that
.markdownlintignore
is not treated as an ignore file but rather in a custom way.For example, this doesn't work ❌:
This works ✅:
It's described in the README but I still think it would be much better if the standard "ignore" format was used.
The text was updated successfully, but these errors were encountered: