Pattern: Non-English character
Issue: -
Scala allows unicode characters as operators and some editors misbehave when they see non-ascii character. This rule can be helpful in such situations.
"value".match {
case "value" => println("matched")
...
}
is preferred to
"value".match {
case "value" ⇒ println("matched")
...
}
To fix it, replace the (unicode operator)⇒
with =>
.
<check enabled="true" class="org.scalastyle.scalariform.NonASCIICharacterChecker" level="warning"/>