[GH-ISSUE #144] New rule suggestion: detect link that point to nothing #121

Closed
opened 2026-03-03 01:23:54 +03:00 by kerem · 5 comments
Owner

Originally created by @TravisEz13 on GitHub (Sep 14, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/144

Example:

[link][bad-link]

[good-link]: https://google.com

Currently this does not produce an error.

Originally created by @TravisEz13 on GitHub (Sep 14, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/144 Example: ```markdown [link][bad-link] [good-link]: https://google.com ``` Currently this does not produce an error.
kerem 2026-03-03 01:23:54 +03:00
Author
Owner

@stuartpb commented on GitHub (May 21, 2019):

This should be broken into a couple of separate rules:

  • Links that reference non-existent names (complaining about [bad-link]), which is unambiguously bad
  • Named links with no existing references (complaining about [good-link]), which can be harmless
<!-- gh-comment-id:494569881 --> @stuartpb commented on GitHub (May 21, 2019): This should be broken into a couple of separate rules: - Links that reference non-existent names (complaining about `[bad-link]`), which is unambiguously bad - Named links with no existing references (complaining about `[good-link]`), which can be harmless
Author
Owner

@TravisEz13 commented on GitHub (May 21, 2019):

@stuartpb yes, by intent was not to suggest the second rule, but I would love if it did.

<!-- gh-comment-id:494600022 --> @TravisEz13 commented on GitHub (May 21, 2019): @stuartpb yes, by intent was not to suggest the second rule, but I would love if it did.
Author
Owner

@mpalumbo7 commented on GitHub (Jul 2, 2019):

I would like to see this rule added, too!

<!-- gh-comment-id:507474848 --> @mpalumbo7 commented on GitHub (Jul 2, 2019): I would like to see this rule added, too!
Author
Owner

@lorenzleutgeb commented on GitHub (Aug 10, 2020):

@DavidAnson I am thinking of implementing this (as two rules, like @stuartpb suggested). Could you please give indicate whether you would be willing to merge such rules (given that the implementation is solid and matches the requirements laid out in CONTRIBUTING.md)? I am asking in order to avoid useless work.

<!-- gh-comment-id:671411424 --> @lorenzleutgeb commented on GitHub (Aug 10, 2020): @DavidAnson I am thinking of implementing this (as two rules, like @stuartpb suggested). Could you please give indicate whether you would be willing to merge such rules (given that the implementation is solid and matches the requirements laid out in `CONTRIBUTING.md`)? I am asking in order to avoid useless work.
Author
Owner

@DavidAnson commented on GitHub (Aug 10, 2020):

@lorenzleutgeb This seems reasonable to do as two different rules. You might also see if this behavior makes sense to fold into one of them: https://github.com/DavidAnson/markdownlint/issues/213. (I checked the other link-related issues and they do not seem relevant.) If you'd like early and regular feedback, I'm happy to look over draft PR's as you make progress. Thanks!

<!-- gh-comment-id:671445079 --> @DavidAnson commented on GitHub (Aug 10, 2020): @lorenzleutgeb This seems reasonable to do as two different rules. You might also see if this behavior makes sense to fold into one of them: <https://github.com/DavidAnson/markdownlint/issues/213>. (I checked the other link-related issues and they do not seem relevant.) If you'd like early and regular feedback, I'm happy to look over draft PR's as you make progress. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#121
No description provided.