I just coded up an option so you can say -Xreporter MyReporter. Maybe they'll take it, so your Reporter would be easier to set up. I wonder if then a macro could just inspect enclosing contexts looking for an annotation to suppress?
That makes this work for the limited use case:
class MyReporter(ss: Settings) extends ConsoleReporter(ss) {
var deprecationCount = 0
override def warning(pos: Position, msg: String): Unit = {
if (msg contains "is deprecated") deprecationCount += 1
super.warning(pos, msg)
}
override def hasWarnings: Boolean = count(WARNING) - deprecationCount > 0
}
Maybe it has to override reset or something, too.
My other idea was a macro to generate the "deprecated module" trick around deprecated call sites. That would be true hackery, of course. And doesn't address this use case of wanting to see the deprecation warnings but not count toward the fatal warnings budget.