85 lines
3.2 KiB
XML
85 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<FindBugsFilter>
|
|
|
|
<Match>
|
|
<Or>
|
|
<!-- Our Packet hierarchy intentionally uses clone() without calling super.clone(). -->
|
|
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
|
|
<!-- Serialization -->
|
|
<Bug pattern="SE_BAD_FIELD"/>
|
|
<Bug pattern="SE_BAD_FIELD_STORE"/>
|
|
<!-- We expose arrays in multiple places on purpose. -->
|
|
<Bug pattern="EI_EXPOSE_REP"/>
|
|
<Bug pattern="EI_EXPOSE_REP2"/>
|
|
<!-- We throw from constructors on illegal arguments, i.e. programming errors. -->
|
|
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
|
|
<!-- We don't expect to run on 32-bit platforms. -->
|
|
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE"/>
|
|
</Or>
|
|
</Match>
|
|
|
|
<!-- Kotlin-specific -->
|
|
<Match>
|
|
<Or>
|
|
<!-- False positives with lateinit -->
|
|
<Bug pattern="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
|
|
<!-- False positives with lateinit -->
|
|
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
|
|
<!-- False positives with lateinit -->
|
|
<Bug pattern="NP_NULL_PARAM_DEREF"/>
|
|
<!-- False positives with lateinit -->
|
|
<Bug pattern="NP_NONNULL_RETURN_VIOLATION"/>
|
|
<!-- False positives with method references -->
|
|
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/>
|
|
<!-- False positives with kotlin's "when" -->
|
|
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
|
|
<Bug pattern="SF_SWITCH_FALLTHROUGH"/>
|
|
<!-- False positives with lazy vals -->
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH"/>
|
|
<!-- False positives with lazy vals -->
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
|
|
<!-- False positives with lazy vals -->
|
|
<Bug pattern="BC_IMPOSSIBLE_INSTANCEOF"/>
|
|
<!-- False positives with Kotlin inlines -->
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
|
|
<!-- False positives for the synthetic bridge methods Kotlin generates on anonymous
|
|
subclasses of generic collections (e.g. an anonymous LRUCache overriding removeEldestEntry). -->
|
|
<Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS"/>
|
|
|
|
<!-- False positives for an unknown reason -->
|
|
<Bug pattern="BC_BAD_CAST_TO_ABSTRACT_COLLECTION"/>
|
|
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
|
|
<Bug pattern="UR_UNINIT_READ"/>
|
|
<Bug pattern="UC_USELESS_OBJECT"/>
|
|
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
|
|
<Bug pattern="MS_EXPOSE_REP"/>
|
|
</Or>
|
|
<Source name="~.*\.kt" />
|
|
</Match>
|
|
|
|
<!-- Tests -->
|
|
<Match>
|
|
<Or>
|
|
<!-- Tests have a valid reason to ignore return values (expecting exceptions, etc). -->
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
|
|
<!-- Same for exceptions. -->
|
|
<Bug pattern="DE_MIGHT_IGNORE"/>
|
|
<!-- In tests it is convenient to use Random() randomly. -->
|
|
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
|
|
<!-- Looks like a false positive. -->
|
|
<Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS"/>
|
|
<!-- Confused by kotest beforeSpec patterns. -->
|
|
<Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
|
|
<!-- False positives for an unknown reason. -->
|
|
<Bug pattern="SA_LOCAL_SELF_ASSIGNMENT"/>
|
|
</Or>
|
|
<Or>
|
|
<Source name="~.*\.*Test.kt" />
|
|
<Source name="~.*\.*Test.java" />
|
|
<Class name="~.*\.module_tests\..*" />
|
|
</Or>
|
|
</Match>
|
|
|
|
|
|
</FindBugsFilter>
|