linter icon indicating copy to clipboard operation
linter copied to clipboard

Static Analysis Compiler Plugin for Scala

Results 22 linter issues
Sort by recently updated
recently updated
newest added

Is there a version that works with Scala 2.13 ?

travis-ci no longer support oraclejdk7 https://github.com/travis-ci/travis-ci/issues/7884#issuecomment-308451879

Linting the following code: ``` package pkg sealed trait Base case object Sub extends pkg.Base ``` would incorrectly yield: ``` [warn] /tmp/linter/src/main/scala/Test.scala:3: [UnextendedSealedTrait] This sealed trait is never extended [warn]...

Use of the parboiled2 library which uses scala macros causes a MergeNestedIfs warnings at every rule declaration ``` Parser.scala:6: warning: [MergeNestedIfs] These two nested ifs can be merged into one....

Consider ``` @tailrec private def f(x: Widget, token: Option[String] = None): Boolean = { if (foo) true else Option(x.getNextToken) match { case None => false case Some(tok) => f(x, Some(tok))...

``` sealed trait HttpStatusCode { val intValue: Int } object HttpStatusCode { private type T = HttpStatusCode case object BadRequest extends T { val intValue = 400 } case object...

With version 0.1.17, I get a false positive with the following code: ``` def test1(s: StringBuilder): Boolean = { if (s != null) { val trimmed = s.toString.trim trimmed.nonEmpty }...

Can't write this code using foreach since it is using tailrec. Can't think of another way to write this without using null. ``` @tailrec final def tick(name: String, time: FiniteDuration):...

For example, the below cause the error "Inferred type Map[String,Any]. (This might not be what you've intended)". Since the method is defined as returning Map[String, Any] I would think this...