Esc

broken_doc_link

Finds a link in a doc comment ([name]) that names no declaration.

Category style, warn by default.

Example
#import "Basic";

Point :: struct {
    x: int;
    y: int;
}

// Scales a [Point] and prints it with [prnt].
scale :: (p: Point) {
    print("%\n", p.x * 2);
}

main :: () {
    scale(.{ 1, 2 });
}
Diagnostic
warning[broken_doc_link]: `[prnt]` doesn't resolve to a declaration
  --> example.jai:8:40
   |
 8 | // Scales a [Point] and prints it with [prnt].
   |                                        ^^^^^^ not found from the documented declaration's scope
   |
help: did you mean `print`?
   |
 8 ~ // Scales a [Point] and prints it with [print].
   |
   = note: `broken_doc_link` is `warn` by default
Fixed
#import "Basic";

Point :: struct {
    x: int;
    y: int;
}

// Scales a [Point] and prints it with [print].
scale :: (p: Point) {
    print("%\n", p.x * 2);
}

main :: () {
    scale(.{ 1, 2 });
}

Only comments directly above a declaration (or trailing a field or parameter) are read, and links resolve like the language server's.