Skip to content

Commit

Permalink
Changed spotbugs report level to medium (getodk#2431)
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 authored and grzesiek2010 committed Jul 30, 2018
1 parent f4422a8 commit ae79611
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 2 deletions.
115 changes: 114 additions & 1 deletion config/findbugs-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,129 @@
<Class name="~.*ViewBinding\$.*" />
</Match>

<!-- Internationalization -->
<Match>
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>

<!-- Bad practice -->
<Match>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
<Bug pattern="DE_MIGHT_IGNORE" />
</Match>
<Match>
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
</Match>
<Match>
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
</Match>
<Match>
<Bug pattern="OS_OPEN_STREAM" />
</Match>
<Match>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
</Match>
<Match>
<Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
</Match>

<!-- Correctness -->
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH" />
</Match>
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
</Match>
<Match>
<Bug pattern="NP_NULL_PARAM_DEREF" />
</Match>
<Match>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
</Match>
<Match>
<Bug pattern="RV_RETURN_VALUE_IGNORED" />
</Match>

<!-- Experimental -->
<Match>
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
</Match>
<Match>
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
</Match>

<!-- Malicious code vulnerability -->
<Match>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Bug pattern="MS_CANNOT_BE_FINAL" />
</Match>
<Match>
<Bug pattern="MS_PKGPROTECT" />
</Match>

<!-- Multithreaded correctness -->
<Match>
<Bug pattern="IS2_INCONSISTENT_SYNC" />
</Match>

<!-- Performance Warnings -->
<Match>
<Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION" />
</Match>
<Match>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
</Match>
<Match>
<Bug pattern="URF_UNREAD_FIELD" />
</Match>
<Match>
<Bug pattern="UUF_UNUSED_FIELD" />
</Match>
<Match>
<Bug pattern="WMI_WRONG_MAP_ITERATOR" />
</Match>


<!-- Dodgy code Warnings -->
<Match>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
</Match>
<Match>
<Bug pattern="INT_BAD_REM_BY_1" />
</Match>
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
<Match>
<Bug pattern="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED" />
</Match>
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
</Match>
<Match>
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
</Match>
<Match>
<Bug pattern="UC_USELESS_OBJECT" />
</Match>
<Match>
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
</Match>
<Match>
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>
<Match>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE" />
</Match>
<Match>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
</Match>
<Match>
<Bug pattern="REC_CATCH_EXCEPTION" />
</Match>

</FindBugsFilter>
2 changes: 1 addition & 1 deletion config/quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ android.applicationVariants.all { variant ->
effort = 'max' // Search better

// Reporting only high priority problems {Possible reportLevels: 'high', 'medium', 'low'}
reportLevel = 'high'
reportLevel = 'medium'

excludeFilter = new File("$configDir/findbugs-filter.xml")
classes = fileTree("build/intermediates/classes/${variant.flavorName}/${variant.buildType.name}/")
Expand Down

0 comments on commit ae79611

Please sign in to comment.