Ensure lint warnings are configurable via nowarn #18653
Labels
area:reporting
Error reporting including formatting, implicit suggestions, etc
exp:intermediate
itype:enhancement
Compiler version
3.3.x
Minimized code
Output
False positive under
-Wunused:imports
must be suppressed as shown.Expectation
The false positive on the renamed import can be silenced by local
@nowarn
, but requires using a brittle string.Even if the message is unusually stable (
"unused import"
), discovering and copy/pasting strings is an unhealthy workflow.Parity with Scala 2 would require categories for lints
cat=lint-unused-import
of some granularity, or possibly dotty message idsid=W100
. "Awesome warnings!"In addition, top-level imports can't be annotated, so Scala 2 uses
origin=quotes.reflect.This
.If warnings are easy to silence, then they are easy to enable.
There is a discussion about the need for further parity in
-Wconf
at #17635This problem came up on discord via Alexandru Nedelcu Today at 11:47 AM
The text was updated successfully, but these errors were encountered: