missing_doc
Finds an exported procedure, struct or enum with no doc comment.
Category restriction, allow by default.
Off by default; the example is shown with the rule enabled.
#import "Basic";
parse :: (text: string) -> int {
return text.count;
}
main :: () {
print("%\n", parse("abc"));
}warning[missing_doc]: the exported procedure `parse` has no doc comment
--> example.jai:3:1
|
3 | parse :: (text: string) -> int {
| ^^^^^
|
= help: describe it in a `//` comment on the lines above#import "Basic";
// Counts the bytes in `text`.
parse :: (text: string) -> int {
return text.count;
}
main :: () {
print("%\n", parse("abc"));
}A procedure, struct, enum or union declared at the top level of a file while the scope is exported (the default, until a #scope_file or #scope_module) needs a doc: the comment directly above it.