Reports usages of JComponent.setToolTipText(String).

Passing raw strings may cause accidental HTML injections because IntelliJ Platform interprets HTML markup when renders the tooltip text. com.intellij.ide.HelpTooltipKt.setToolTipText(HtmlChunk) should be used instead of JComponent.setToolTipText(String). Use HtmlChunk.text() to safely escape text, especially in cases when text can contain user input or project content (for example, file names). Or use HtmlChunk.raw() if the tooltip supposes to contain HTML.

Example:


// Bad — raw string may contain HTML injection:
component.setToolTipText(text)

// Good — text is escaped:
component.setToolTipText(HtmlChunk.text(text))