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

fix.DiscardCatsEffectIO.scala Maven / Gradle / Ivy

The newest version!
package fix

import scalafix.Patch
import scalafix.v1.Configuration
import scalafix.v1.Rule
import scalafix.v1.SemanticDocument
import scalafix.v1.SemanticRule
import metaconfig.Configured

class DiscardCatsEffectIO(config: DiscardSingleConfig) extends SemanticRule("DiscardCatsEffectIO") {

  def this() = this(DiscardSingleConfig.default)

  override def withConfiguration(config: Configuration): Configured[Rule] =
    config.conf.getOrElse("DiscardCatsEffectIO")(this.config).map(newConfig => new DiscardCatsEffectIO(newConfig))

  override def fix(implicit doc: SemanticDocument): Patch =
    DiscardValue.typeRef(config.toDiscardValueConfig(List("cats/effect/IO#")))

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy