package-wide suppression: ```@package:Suppress("un...
# language-proposals
h
package-wide suppression:
Copy code
@package:Suppress("unused")
useful in spring, for example
g
Are you sure that it doesn’t work already on level of
package-info.java
?
Or you want to have have something like
package-info.kt
?
h
yeah
there are, of course, workarounds, but i'd like to have some kotlin syntax for it. convenience
g
Nah, Suppress is not applicable to backage
e
Why it would be useful in spring? What are you suppressing?
h
unused
thinks like restcontrollers are flagged unused
g
But is not spring has @RestController annotation?
If so, you can just add it to list of annotations that suppress unused warning
e
Strange. Do you use Spring plugin? It understands all the Spring stuff out-of-the-box.
h
I was, but I was also using the 2019.3 EAP for the mongo features at the time, so perhaps that was messing with it. I get errors and warnings from time to time that aren't true. It's not a big deal, since I can easily suppress them, but it gave me this idea.