When i am using IntelliJ to analyze (Analyze->Inspect code) my Java code, which happens to have an unused method, they are flagged. This same behavior does not seem to be happening with Scala.
For instance, IntelliJ finds no issues with
object Main {
def main(args: Array[String]) {
}
private def max(a: Int, b: Int) = { // <---- unused
if (a > b) a else b
}
}

Can i enable this (and other) checks somehow? What am i missing please?
As far as I can tell, the Scala plugin for IDEA doesn’t have an inspection for unused methods (even private ones).
For Java, IDEA has “Unused declaration”:
Unfortunately the only related inspection for Scala is “Unused Symbol.”
The only related issue I could find is SCL-3121. You could add a feature request on the issue tracker for unused method highlighting.