Hello guys,
- Versions used SonarQube: 7.5, Scanner: sonar-scanner-3.2.0.1227-linux, language analyzer: Scala
- Issue: In Scala the sortWithfunction it is valid to use identical expressions on both sides of a binary operator, however, the bug scala:S1764 is shown.
Minimal code sample to reproduce:
object SonarTest extends App {
val personList =
List(Person("Santi", 23), Person("Robert", 25), Person("Oscar", 26), Person("Nat", 19), Person("Seba", 15))
val sortedPersonList = personList.sortWith(_.age < _.age)
}
case class Person(name: String, age: Int)
Thanks!