Spotbugs helper utils.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static boolean |
isPluginEnabled(org.gradle.api.Project project)@param project gradle project |
|
static java.io.File |
mergeExcludes(java.io.File src, java.util.Collection<java.io.File> exclude, java.util.Collection<java.io.File> roots, java.lang.Integer rank = null)Spotbugs task is a org.gradle.api.tasks.SourceTask, but does not properly support exclusions. |
|
static void |
replaceExcludeFilter(com.github.spotbugs.SpotBugsTask task, QualityExtension extension, org.slf4j.Logger logger)Replace exclusion file with extended one when exclusions are required. |
|
static void |
validateRankSetting(int rank)Validate declared rank value correctness. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
project - gradle projectSpotbugs task is a org.gradle.api.tasks.SourceTask, but does not properly support exclusions. To overcome this limitation, source exclusions could be added to spotbugs exclusions filter xml file.
Also, rank-based filtering is only possible through exclusions file.
src - original excludes file (default of user defined)exclude - files to exclude (may be empty)roots - source directories (to resolve class files)rank - custom rank value (optional)Replace exclusion file with extended one when exclusions are required.
task - spotbugs taskextension - extension instancelogger - project logger for error messagesValidate declared rank value correctness.
rank - rank value