Charles
05/21/2020, 3:20 PM@SuppressWarnings
in Kotlin code, because we're trying to track warning suppressing and normalizing would help. The problem with this particular annotation is that there is no associated import to filter on at a file level.gammax
05/21/2020, 3:24 PMjava.lang.SuppressWarning
. I’m not aware of nothing like that already available in DetektCharles
05/22/2020, 12:58 AMBrais Gabin
05/22/2020, 7:41 AMgammax
05/22/2020, 8:47 AMForbiddenAnnotation
. Just a note that this has a lot of overlapping with ForbiddenImports
(that generally suffice to prevent usage of unwanted annotations). The presented case is more like an edge case as @SuppressWarnings
has no imports.Charles
05/22/2020, 3:01 PMRule
gammax
05/22/2020, 3:24 PMForbiddenImports
will allow you to catch it regardless of the usage site of the annotation.Charles
05/22/2020, 3:25 PMgammax
05/22/2020, 3:47 PM