Spotbugs helper utils.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.io.File |
excludesFile(com.github.spotbugs.snom.SpotBugsTask task, QualityExtension extension, java.io.File configured)Spotbugs task properties may be configured only once. |
|
static boolean |
isPluginEnabled(org.gradle.api.Project project)@param project gradle project |
|
static void |
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.snom.SpotBugsTask task, QualityExtension extension, org.slf4j.Logger logger)Extend exclusions filter file with 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(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), 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() |
Spotbugs task properties may be configured only once. At that time it is too early to compute exact file, but we can assume that if excludes configured then temp file would be required. So preparing temp file ahead of time. Later, it would be filled with actual exclusions (if anything matches).
task - target tasktaskName - spotbugs task nameextension - extensionconfigured - configured exclusions file (most likely default one)
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.
exclusions - file to be extended (already tmp file)exclude - files to exclude (may be empty)roots - source directories (to resolve class files)rank - custom rank value (optional)Extend exclusions filter file with when exclusions are required. Note: it is assumed that tmp file was already created (because it is impossible to configure different file on this stage).
Apt sources are also counted (to be able to ignore apt sources).
task - spotbugs taskextension - extension instancelogger - project logger for error messagesValidate declared rank value correctness.
rank - rank value