A Lint Issue defines how a problem is identified, described, and categorized in the IDE and analysis reports. It is typically defined in a companion object within your Detector class using Issue.create().
Key parameters for Issue.create():
id: A unique string used for @SuppressLint warnings.briefDescription: A short title shown in IDE preference dialogs and analysis results.explanation: A detailed description of the issue, supporting Markdown (e.g., monospace, italic, bold).category: The Category of the issue (e.g., Category.CORRECTNESS).priority: An integer representing the importance.severity: The Severity level (e.g., Severity.WARNING).implementation: An Implementation object specifying the detector class and its Scope (e.g., Scope.JAVA_FILE_SCOPE).
@JvmField
val ISSUE: Issue =
Issue.create(
id = "SampleId",
briefDescription = "Lint Mentions",
explanation = "This check highlights string literals in code which mentions the word `lint`.",
category = Category.CORRECTNESS,
priority = 6,
severity = Severity.WARNING,
implementation = Implementation(SampleCodeDetector::class.java, Scope.JAVA_FILE_SCOPE),
)