<commit_before>package com.sksamuel.scapegoat.inspections.collections

import com.sksamuel.scapegoat._

/** @author <NAME> */
class PredefSeqIsMutable
    extends Inspection(
      text = "Predef.Seq is mutable",
      defaultLevel = Levels.Info,
      description = "Checks for use of mutable Seq.",
      explanation = "Predef.Seq aliases scala.collection.mutable.Seq. Did you intend to use an immutable Seq?"
    ) {

  override def isEnabled = !isScala213

  def inspector(context: InspectionContext): Inspector = new Inspector(context) {
    override def postTyperTraverser = new context.Traverser {
      import context.global._

      override def inspect(tree: Tree): Unit = {
        if (!isScala213) {
          tree match {
            case DefDef(_, _, _, _, _, _) if tree.symbol.isAccessor =>
            case TypeTree() if tree.tpe.erasure.toString() == "Seq[Any]" =>
              context.warn(tree.pos, self)
            case _ => continue(tree)
          }
        }
      }
    }
  }
}<commit_msg>[minor] removing redundant 213 check<commit_after>package com.sksamuel.scapegoat.inspections.collections

import com.sksamuel.scapegoat._

/** @author <NAME> */
class PredefSeqIsMutable
    extends Inspection(
      text = "Predef.Seq is mutable",
      defaultLevel = Levels.Info,
      description = "Checks for use of mutable Seq.",
      explanation = "Predef.Seq aliases scala.collection.mutable.Seq. Did you intend to use an immutable Seq?"
    ) {

  override def isEnabled = !isScala213

  def inspector(context: InspectionContext): Inspector = new Inspector(context) {
    override def postTyperTraverser = new context.Traverser {
      import context.global._

      override def inspect(tree: Tree): Unit = {
        tree match {
          case DefDef(_, _, _, _, _, _) if tree.symbol.isAccessor =>
          case TypeTree() if tree.tpe.erasure.toString() == "Seq[Any]" =>
            context.warn(tree.pos, self)
          case _ => continue(tree)
        }
      }
    }
  }
}
{'fraction_non_alphanumeric': 0.10828343313373254, 'fraction_numerical': 0.005988023952095809, 'mean_word_length': 2.652094717668488, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5531859', 'n_tokens_mistral': 626, 'n_tokens_neox': 597, 'n_words': 150}