HairyFotr / linter

Static Analysis Compiler Plugin for Scala
Apache License 2.0
268 stars 34 forks source link

[false-positive] `This sealed trait is never extended` #6

Closed jrudolph closed 11 years ago

jrudolph commented 11 years ago

First of all, thanks for maintaining linter! I've ran it over the current spray code base (jrudolph/spray@bc7bbb72bf113ca16fc01ca07b981950c4b4dd00) to see what it catches. I think I've found several issues and I'm putting them into here one by one.

[warn] /home/johannes/git/telfish/spray/spray/spray-io/src/main/scala/akka/io/Tcp.scala:91: This sealed trait is never extended.
[warn]   sealed trait Message

but it definitely is

  sealed trait Message

  /// COMMANDS

  /**
   * This is the common trait for all commands understood by TCP actors.
   */
  trait Command extends Message with SelectionHandler.HasFailureMessage {
    def failureMessage = CommandFailed(this)
  }

Not sure what the exact condition is.

HairyFotr commented 11 years ago

Also confirmed... will look into it.

HairyFotr commented 11 years ago

There are a few more false positives, but they rarely show up... only if you use a sealed trait only as a type placeholder.