package v0
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- v0
- ScalafixSyntax
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
implicit
class
XtensionOptionPatch extends AnyRef
- Definition Classes
- ScalafixSyntax
-
implicit
class
XtensionSeqPatch extends AnyRef
- Definition Classes
- ScalafixSyntax
-
type
CustomMessage[T] = config.CustomMessage[T]
- Definition Classes
- ScalafixSyntax
- final case class Database(documents: Seq[Document]) extends Product with Serializable
- final case class Denotation(flags: Long, name: String, signature: String, names: List[ResolvedName], tpe: scala.meta.internal.semanticdb.Signature) extends HasFlags with Product with Serializable
- final case class Document(input: Input, language: String, names: List[ResolvedName], messages: List[Message], symbols: List[ResolvedSymbol], synthetics: List[Synthetic]) extends Product with Serializable
- trait Flags extends AnyRef
- trait HasFlags extends AnyRef
-
type
LintCategory = lint.LintCategory
- Definition Classes
- ScalafixSyntax
-
type
LintMessage = lint.LintMessage
- Definition Classes
- ScalafixSyntax
- final case class Message(position: Position, severity: Severity, text: String) extends Product with Serializable
-
type
Patch = patch.Patch
- Definition Classes
- ScalafixSyntax
- final case class ResolvedName(position: Position, symbol: Symbol, isDefinition: Boolean) extends Product with Serializable
- final case class ResolvedSymbol(symbol: Symbol, denotation: Denotation) extends Product with Serializable
-
abstract
class
Rule extends AnyRef
A Scalafix Rule.
A Scalafix Rule.
To provide automatic fixes for this rule, override the
fix
method. Example:object ReverseNames extends Rule("ReverseNames") { override def fix(ctx: RuleCtx) = ctx.tree.collect { case name @ Name(value) => ctx.replaceTree(name, value.reverse) }.asPatch }
To report violations of this rule (without automatic fix), override the
check
method. Example:// example syntactic linter object NoNulls extends Rule("NoNulls") { val error = LintCategory.error("Nulls are not allowed.") override def check(ctx: RuleCtx): List[LintMessage] = ctx.tree.collect { case nil @ q"null" => error.at(nil.pos) } }
- trait RuleCtx extends PatchOps
-
type
RuleName = rule.RuleName
- Definition Classes
- ScalafixSyntax
- abstract class SemanticRule extends Rule
-
trait
SemanticdbIndex extends SemanticContext
An index for looking up data in a scala.meta.Database.
- sealed trait Severity extends Product
- sealed trait Signature extends AnyRef
- sealed trait Symbol extends Product
-
final
class
SymbolMatcher extends AnyRef
Utility to match against a particular symbol.
Utility to match against a particular symbol.
Can be used both in pattern matching and regular condition testing.
val myMethod = SymbolMatcher(Symbol("_root_.myMethod")) myMethod.matches(Tree) Tree match { case myMethod(_) => // act on tree } myMethod.matches(Tree)
- final case class Synthetic(position: Position, text: String, names: List[ResolvedName]) extends Product with Serializable
Value Members
-
val
CustomMessage: config.CustomMessage.type
- Definition Classes
- ScalafixSyntax
-
val
LintCategory: lint.LintCategory.type
- Definition Classes
- ScalafixSyntax
-
val
Patch: patch.Patch.type
- Definition Classes
- ScalafixSyntax
-
val
RuleName: rule.RuleName.type
- Definition Classes
- ScalafixSyntax
- object Flags extends Flags
- object ResolvedName extends Serializable
- object Rule
- object RuleCtx
- object SemanticdbIndex
- object Severity
- object Signature
- object Symbol
- object SymbolMatcher