Disable markdown link warnings
已回答
I'm parsing a file where names are unfortunately in square brackets. So I have a lot of comments like:
/**
* parse a frobozz line, looks something like:
* F15[MARS]="Stuff irrelevant to the question"
*/This causes the warning “Cannot resolve symbol 'MARS'”. Is there any way to specify this is not a hyperlink?
While I'm at it, is there a comprehensive list of @suppress arguments?
请先登录再写评论。
Hello Jim
As this is KDoc/Markdown link syntaxyou have two options to make it plain text:
Backticks put it in a code span; the backslash escape before
[tells the Markdown processor not to treat it as a link, while rendering just[MARS]in the doc output.If you’d rather silence the diagnostic instead of changing the text, use Kotlin’s
@Suppressannotation with the specific inspection id, for example:There isn’t a single comprehensive, version-stable list of all possible
@Suppressargument strings because they’re the internal names of compiler inspections and can change over time. The supported KDoc tag@suppress(lowercase) is different: it has no arguments and simply hides the documented element from generated documentation.In practice, the recommended ways to discover usable
@Suppressids are:Alt+Enteron the warning and choose one of the “Suppress …” intentions; the IDE will insert the correct string.-Xrender-internal-diagnostic-namesonce to see the underlying diagnostic names, then use those names as@Suppressarguments.