All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fix.Examplescalafixrule_v1.scala Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version
package fix

import scalafix._
import scala.meta._

final case class Examplescalafixrule_v1(index: SemanticdbIndex)
    extends SemanticRule(index, "ExampleScalafixRule_v1") {

  override def fix(ctx: RuleCtx): Patch = {
    if (ctx.input.text.contains("// Hello world!")) Patch.empty
    else ctx.addRight(ctx.tree, "// Hello world!\n")
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy