With the SuppressWarnings check I'm able to specify what warning can not be suppressed. So in order not to allow unchecked
suppressions:
<module name="SuppressWarnings">
<property name="format" value="^unchecked$"/>
</module>
I try to do the opposite - I want to forbid all suppressions except unchecked
. I tried:
<module name="SuppressWarnings">
<property name="format" value="[^(unchecked)]"/>
</module>
But it doesn't work (it neither detects unchecked
nor any other suppressions).