Package

scalafix

lint

Permalink

package lint

Visibility
  1. Public
  2. All

Type Members

  1. final case class LintCategory(id: String, explanation: String, severity: LintSeverity) extends Product with Serializable

    Permalink

    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.

  2. trait LintDiagnostic extends AnyRef

    Permalink

    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.

  3. final case class LintID(rule: String, categoryID: String) extends Product with Serializable

    Permalink

    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.

  4. trait LintMessage extends AnyRef

    Permalink

    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.

  5. sealed abstract class LintSeverity extends AnyRef

    Permalink

Value Members

  1. object LintCategory extends Serializable

    Permalink
  2. object LintDiagnostic

    Permalink
  3. object LintID extends Serializable

    Permalink
  4. object LintMessage

    Permalink
  5. object LintSeverity

    Permalink

Ungrouped