package lint
- Alphabetic
- Public
- All
Type Members
-
final
case class
LintCategory(id: String, explanation: String, severity: LintSeverity) extends Product with Serializable
A unique identifier for one kind of a linter message.
A unique identifier for one kind of a linter message.
- id
a string ID for this message, typically the name of the assigned variable. If id is empty, then the name of the rewrite reporting this LintCategory is used as id.
- explanation
An optional explanation for this kind of message.
- severity
The default category this message should get reported to. Note that users can configure/override the default category.
-
trait
LintDiagnostic extends AnyRef
A linter messages that has been associated with a rule.
A linter messages that has been associated with a rule.
- Note
The difference between LintDiagnostic and LintMessage is that LintMessage is not associated with a rule while LintDiagnostic interfaces matches closely the ScalafixDiagnostic interface from the scalafix-interfaces Java-only module.
-
final
case class
LintID(rule: String, categoryID: String) extends Product with Serializable
A unique identifier for this category of lint diagnostics
A unique identifier for this category of lint diagnostics
The contract of id is that all diagnostics of the same "category" will have the same id. For example, the DisableSyntax rule has a unique ID for each category such as "noSemicolon" or "noTabs".
- rule
the name of the rule that produced this diagnostic.
- categoryID
the sub-category within this rule, if any. Empty if the rule only reports diagnostics of a single category.
-
trait
LintMessage extends AnyRef
A linter message reporting a code style violation.
A linter message reporting a code style violation.
It's idiomatic to implement a custom class that extends this trait for each unique category of linting messages. For example, if you have an "unused code" linter then you might want to create a
class UnusedCode extends LintMessage
class with the appropriate context.Expensive values such as the message and explanation can be computed on-demand.
- Note
for a LintMessage that is associated with a specific rule use scalafix.lint.LintDiagnostic.
- sealed abstract class LintSeverity extends AnyRef
Value Members
- object LintCategory extends Serializable
- object LintDiagnostic
- object LintID extends Serializable
- object LintMessage
- object LintSeverity