def apply()

in server/src/main/scala/com/twitter/server/lint/MemcacheFailFastRule.scala [9:30]


  def apply(stackReg: StackRegistry): Rule = {
    Rule(
      Category.Configuration,
      "Memcache client has FailFast enabled",
      """FailFast is only appropriate when a replica set is present. Memcached
        |is usually sharded. Consider disabling FailFast or using the
        |c.t.f.Memcached.client which has recommended settings built in.""".stripMargin
    ) {
      stackReg.registrants
        .filter(_.protocolLibrary == "memcached")
        .groupBy(_.name)
        .filter {
          case (_, entries) =>
            entries.head.params[FailFastFactory.FailFast].enabled == true
        }
        .map {
          case (label, _) =>
            Issue(s"$label memcache client should disable FailFast")
        }
        .toSeq
    }
  }