CodeNarc Report: Gradle-1.0-milestone-9

# CodeNarc Report

Report title: | Gradle-1.0-milestone-9
Date: | Mar 23, 2012 5:46:40 PM
Generated with: | CodeNarc v0.17

## Summary by Package

Package | Total Files | Files with Violations | Priority 1 | Priority 2 | Priority 3
--- | --- | --- | --- | --- | ---
All Packages | 258 | 125 | - | 56 | 389
src/org/gradle/api/internal | 1 | - | - | - | -
src/org/gradle/api/internal/artifacts/dsl | 1 | 1 | - | - | 4
src/org/gradle/api/internal/artifacts/dsl/dependencies | 2 | 2 | - | - | 3
src/org/gradle/api/internal/file | 4 | 3 | - | - | 4
src/org/gradle/api/internal/plugins | 1 | - | - | - | -
src/org/gradle/api/internal/project | 3 | 3 | - | - | 18
src/org/gradle/api/internal/tasks/compile | 3 | 1 | - | 1 | 1
src/org/gradle/api/internal/tasks/scala | 1 | 1 | - | 1 | 2
src/org/gradle/api/plugins | 7 | 5 | - | - | 13
src/org/gradle/api/plugins/announce | 3 | - | - | - | -
src/org/gradle/api/plugins/announce/internal | 12 | 6 | - | 7 | 7
src/org/gradle/api/plugins/osgi | 1 | - | - | - | -
src/org/gradle/api/plugins/quality | 19 | 7 | - | - | 25
src/org/gradle/api/plugins/quality/internal | 1 | 1 | - | 4 | 2
src/org/gradle/api/plugins/scala | 2 | 2 | - | 1 | 11
src/org/gradle/api/plugins/sonar | 2 | - | - | - | -
src/org/gradle/api/plugins/sonar/internal | 1 | 1 | - | - | 1
src/org/gradle/api/plugins/sonar/model | 4 | 2 | - | - | 2
src/org/gradle/api/publication | 4 | 2 | - | - | 3
src/org/gradle/api/publication/maven | 6 | - | - | - | -
src/org/gradle/api/publication/maven/internal | 1 | 1 | - | - | 2
src/org/gradle/api/publication/maven/internal/ant | 2 | 2 | - | - | 2
src/org/gradle/api/publication/maven/internal/model | 3 | 1 | - | - | 1
src/org/gradle/api/publication/maven/internal/modelbuilder | 2 | - | - | - | -
src/org/gradle/api/tasks | 2 | - | - | - | -
src/org/gradle/api/tasks/application | 1 | 1 | - | - | 20
src/org/gradle/api/tasks/bundling | 2 | 2 | - | - | 9
src/org/gradle/api/tasks/compile | 7 | 1 | - | - | 2
src/org/gradle/api/tasks/javadoc | 2 | 1 | - | - | 1
src/org/gradle/api/tasks/scala | 3 | 1 | - | 1 | 2
src/org/gradle/api/tasks/testing/testng | 1 | 1 | - | - | 4
src/org/gradle/api/tasks/util | 1 | 1 | - | 2 | 8
src/org/gradle/groovy/scripts | 2 | 2 | - | - | 12
src/org/gradle/initialization | 3 | 2 | - | - | 3
src/org/gradle/integtests/fixtures | 17 | 15 | - | 30 | 52
src/org/gradle/plugins/binaries/model/internal | 1 | 1 | - | - | 1
src/org/gradle/plugins/binaries/tasks | 1 | - | - | - | -
src/org/gradle/plugins/cpp | 3 | - | - | - | -
src/org/gradle/plugins/cpp/cdt | 1 | - | - | - | -
src/org/gradle/plugins/cpp/cdt/model | 4 | 1 | - | 1 | -
src/org/gradle/plugins/cpp/cdt/tasks | 1 | - | - | - | -
src/org/gradle/plugins/cpp/gpp | 3 | 2 | - | - | 8
src/org/gradle/plugins/cpp/msvcpp | 1 | - | - | - | -
src/org/gradle/plugins/ear | 2 | 2 | - | - | 4
src/org/gradle/plugins/ear/descriptor/internal | 4 | 2 | - | 2 | 2
src/org/gradle/plugins/ide/api | 3 | - | - | - | -
src/org/gradle/plugins/ide/eclipse | 7 | 2 | - | - | 11
src/org/gradle/plugins/ide/eclipse/internal | 2 | - | - | - | -
src/org/gradle/plugins/ide/eclipse/model | 27 | 12 | - | - | 28
src/org/gradle/plugins/ide/eclipse/model/internal | 8 | 2 | - | - | 4
src/org/gradle/plugins/ide/idea | 4 | 3 | - | - | 3
src/org/gradle/plugins/ide/idea/internal | 1 | - | - | - | -
src/org/gradle/plugins/ide/idea/model | 17 | 13 | - | - | 49
src/org/gradle/plugins/ide/idea/model/internal | 2 | - | - | - | -
src/org/gradle/plugins/ide/internal | 2 | 2 | - | 1 | 11
src/org/gradle/plugins/ide/internal/configurer | 3 | 1 | - | - | 3
src/org/gradle/plugins/ide/internal/generator | 3 | 2 | - | 2 | 2
src/org/gradle/plugins/signing | 7 | 4 | - | 1 | 28
src/org/gradle/plugins/signing/signatory | 3 | - | - | - | -
src/org/gradle/plugins/signing/signatory/pgp | 4 | 1 | - | - | 1
src/org/gradle/plugins/signing/type | 6 | 1 | - | - | 3
src/org/gradle/plugins/signing/type/pgp | 1 | - | - | - | -
src/org/gradle/profile | 1 | 1 | - | 1 | -
src/org/gradle/testing/internal/util | 1 | - | - | - | -
src/org/gradle/util | 8 | 5 | - | 1 | 17

## Package: src.org.gradle.api.internal.artifacts.dsl

### ➥ DefaultArtifactHandler.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 35 | [SRC]def DefaultArtifactHandler(ConfigurationContainer config..ctFactory) { [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler. The def keyword is unneeded on constructors
UnnecessaryPackageReference | 3 | 40 | [SRC]private PublishArtifact pushArtifact(org.gradle.api.arti..reClosure) { [MSG]The org.gradle.api.artifacts.Configuration class was explicitly imported, so specifying the package name is not necessary
UnnecessaryDefInMethodDeclaration | 3 | 55 | [SRC]public def methodMissing(String name, args) { [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler. The def keyword is unneeded when a method is marked public
UnnecessaryGetter | 3 | 58 | [SRC]if (!getMetaClass().respondsTo(this, name, args.size())) { [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler. getMetaClass() can probably be rewritten as metaClass

## Package: src.org.gradle.api.internal.artifacts.dsl.dependencies

### ➥ DefaultDependencyHandler.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 34 | [SRC]def DefaultDependencyHandler(ConfigurationContainer conf..encyFactory, [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 93 | [SRC]if (!getMetaClass().respondsTo(this, name, args.size())) { [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. getMetaClass() can probably be rewritten as metaClass

### ➥ ModuleDescriptorDelegate.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 29 | [SRC]def ModuleFactoryDelegate(ClientModule clientModule, Dep..cyFactory) { [MSG]Violation in class org.gradle.api.internal.artifacts.dsl.dependencies.ModuleFactoryDelegate. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.internal.file

### ➥ AntFileCollectionBuilder.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryParenthesesForMethodCallWithClosure | 3 | 33 | [SRC]node."${childNodeName ?: 'resources'}"() { [MSG]Violation in class org.gradle.api.internal.file.AntFileCollectionBuilder. Parentheses in the 'null' method call are unnecessary and can be removed.

### ➥ AntFileCollectionMatchingTaskBuilder.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 24 | [SRC]def AntFileCollectionMatchingTaskBuilder(Iterable<Direct..fileTrees) { [MSG]Violation in class org.gradle.api.internal.file.AntFileCollectionMatchingTaskBuilder. The def keyword is unneeded on constructors

### ➥ AntFileTreeBuilder.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 24 | [SRC]def AntFileTreeBuilder(Map<String, File> files) { [MSG]Violation in class org.gradle.api.internal.file.AntFileTreeBuilder. The def keyword is unneeded on constructors
UnnecessaryParenthesesForMethodCallWithClosure | 3 | 29 | [SRC]node."${childNodeName ?: 'resources'}"() { [MSG]Violation in class org.gradle.api.internal.file.AntFileTreeBuilder. Parentheses in the 'null' method call are unnecessary and can be removed.

## Package: src.org.gradle.api.internal.project

### ➥ DefaultAntBuilder.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 32 | [SRC]def DefaultAntBuilder(Project gradleProject) { [MSG]Violation in class org.gradle.api.internal.project.DefaultAntBuilder. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 36 | [SRC]def Object invokeMethod(String methodName, Object args) { [MSG]Violation in class org.gradle.api.internal.project.DefaultAntBuilder. The def keyword is unneeded when a method returns the Object type
UnnecessaryOverridingMethod | 3 | 36 | [SRC]def Object invokeMethod(String methodName, Object args) { [MSG]Violation in class DefaultAntBuilder. The method invokeMethod contains no logic and can be safely deleted
UnnecessaryDefInMethodDeclaration | 3 | 44 | [SRC]private def doSetProperty(String property, newValue) { [MSG]Violation in class org.gradle.api.internal.project.DefaultAntBuilder. The def keyword is unneeded when a method is marked private
UnnecessaryGetter | 3 | 75 | [SRC]antProject.setUserProperty(MagicNames.ANT_FILE, file.get..olutePath()) [MSG]Violation in class org.gradle.api.internal.project.DefaultAntBuilder. getAbsolutePath() can probably be rewritten as absolutePath

### ➥ DefaultIsolatedAntBuilder.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 31 | [SRC]def DefaultIsolatedAntBuilder(ClassPathRegistry classPat..erFactory) { [MSG]Violation in class org.gradle.api.internal.project.DefaultIsolatedAntBuilder. The def keyword is unneeded on constructors
UnnecessaryDotClass | 3 | 103 | [SRC]Object antBuilder = gradleLoader.loadClass(BasicAntBuild..ewInstance() [MSG]BasicAntBuilder.class can be rewritten as BasicAntBuilder
UnnecessaryDotClass | 3 | 105 | [SRC]Object antLogger = gradleLoader.loadClass(AntLoggingAdap..ewInstance() [MSG]AntLoggingAdapter.class can be rewritten as AntLoggingAdapter
UnnecessaryGetter | 3 | 106 | [SRC]antBuilder.project.removeBuildListener(antBuilder.projec..teners()[0]) [MSG]Violation in class org.gradle.api.internal.project.DefaultIsolatedAntBuilder. getBuildListeners() can probably be rewritten as buildListeners
UnnecessaryDefInMethodDeclaration | 3 | 124 | [SRC]def AntBuilderDelegate(builder, antlibClassLoader) { [MSG]Violation in class org.gradle.api.internal.project.AntBuilderDelegate. The def keyword is unneeded on constructors

### ➥ ProjectScript.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 29 | [SRC]def void apply(Closure closure) { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 33 | [SRC]def void apply(Map options) { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 37 | [SRC]def ScriptHandler getBuildscript() { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 41 | [SRC]def void buildscript(Closure configureClosure) { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 45 | [SRC]def StandardOutputCapture getStandardOutputCapture() { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 49 | [SRC]def LoggingManager getLogging() { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 53 | [SRC]def Logger getLogger() { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 57 | [SRC]def String toString() { [MSG]Violation in class org.gradle.api.internal.project.ProjectScript. The def keyword is unneeded when a method specifies a return type

## Package: src.org.gradle.api.internal.tasks.compile

### ➥ AntGroovyCompiler.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedPrivateField | 2 | 35 | [SRC]private static Logger logger = LoggerFactory.getLogger(A..ovyCompiler) [MSG]The field logger is not used within the class org.gradle.api.internal.tasks.compile.AntGroovyCompiler
UnnecessaryDefInMethodDeclaration | 3 | 42 | [SRC]def AntGroovyCompiler(IsolatedAntBuilder ant, ClassPathR..hRegistry) { [MSG]Violation in class org.gradle.api.internal.tasks.compile.AntGroovyCompiler. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.internal.tasks.scala

### ➥ AntScalaCompiler.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedPrivateField | 2 | 27 | [SRC]private static Logger logger = LoggerFactory.getLogger(A..alaCompiler) [MSG]The field logger is not used within the class org.gradle.api.internal.tasks.scala.AntScalaCompiler
UnnecessaryDefInMethodDeclaration | 3 | 33 | [SRC]def AntScalaCompiler(IsolatedAntBuilder antBuilder) { [MSG]Violation in class org.gradle.api.internal.tasks.scala.AntScalaCompiler. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 39 | [SRC]def AntScalaCompiler(IsolatedAntBuilder antBuilder, Iter..nsionDirs) { [MSG]Violation in class org.gradle.api.internal.tasks.scala.AntScalaCompiler. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.plugins

### ➥ ApplicationPlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryObjectReferences | 3 | 98 | [SRC]installTask.doLast { [MSG]The code could be more concise by using a with() or identity() block

### ➥ BasePlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 77 | [SRC]Delete clean = project.tasks.add(CLEAN_TASK_NAME, Delete.class) [MSG]Delete.class can be rewritten as Delete
UnnecessarySubstring | 3 | 92 | [SRC]String targetTaskName = taskName.substring(prefix.length()) [MSG]Violation in class org.gradle.api.plugins.BasePlugin. The String.substring(int) method can be replaced with the subscript operator
UnnecessarySubstring | 3 | 118 | [SRC]Configuration configuration = project.configurations.fin...length()))) [MSG]Violation in class org.gradle.api.plugins.BasePlugin. The String.substring(int) method can be replaced with the subscript operator
UnnecessaryGetter | 3 | 120 | [SRC]project.tasks.add(taskName).dependsOn(configuration.getA..figuration)) [MSG]Violation in class org.gradle.api.plugins.BasePlugin. getAllArtifacts() can probably be rewritten as allArtifacts
UnnecessaryGetter | 3 | 158 | [SRC]Upload upload = project.getTasks().add(name, Upload.class) [MSG]Violation in class org.gradle.api.plugins.BasePlugin. getTasks() can probably be rewritten as tasks
UnnecessaryDotClass | 3 | 158 | [SRC]Upload upload = project.getTasks().add(name, Upload.class) [MSG]Upload.class can be rewritten as Upload
UnnecessaryGetter | 3 | 161 | [SRC]upload.descriptorDestination = new File(project.getBuild.., "ivy.xml") [MSG]Violation in class org.gradle.api.plugins.BasePlugin. getBuildDir() can probably be rewritten as buildDir
UnnecessaryGetter | 3 | 168 | [SRC]ConfigurationContainer configurations = project.getConfigurations(); [MSG]Violation in class org.gradle.api.plugins.BasePlugin. getConfigurations() can probably be rewritten as configurations

### ➥ JavaPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 74 | [SRC]sourceSets = instantiator.newInstance(DefaultSourceSetCo..nstantiator) [MSG]DefaultSourceSetContainer.class can be rewritten as DefaultSourceSetContainer
UnnecessaryGetter | 3 | 185 | [SRC]return ConfigureUtil.configure(closure, new DefaultManif..eResolver)); [MSG]Violation in class org.gradle.api.plugins.JavaPluginConvention. getProject() can probably be rewritten as project

### ➥ ProjectReportsPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 29 | [SRC]def ProjectReportsPluginConvention(Project project) { [MSG]Violation in class org.gradle.api.plugins.ProjectReportsPluginConvention. The def keyword is unneeded on constructors

### ➥ WarPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 27 | [SRC]def WarPluginConvention(Project project) { [MSG]Violation in class org.gradle.api.plugins.WarPluginConvention. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.plugins.announce.internal

### ➥ AnnouncingBuildListener.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 35 | [SRC]void beforeExecute(Task task) { [MSG]Violation in class AnnouncingBuildListener. Method parameter [task] is never referenced in the method beforeExecute of class org.gradle.api.plugins.announce.internal.AnnouncingBuildListener
UnnecessaryElseStatement | 3 | 73 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary

### ➥ AppleScriptBackedGrowlAnnouncer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 56 | [SRC]private def escape(String value) { [MSG]Violation in class org.gradle.api.plugins.announce.internal.AppleScriptBackedGrowlAnnouncer. The def keyword is unneeded when a method is marked private

### ➥ DefaultAnnouncerFactory.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
EmptyCatchBlock | 2 | 66 | [SRC]} catch (ClassNotFoundException e) { [MSG]The catch block is empty
UnusedMethodParameter | 2 | 78 | [SRC]void send(String title, String message) { [MSG]Violation in class UnknownAnnouncer. Method parameter [title] is never referenced in the method send of class org.gradle.api.plugins.announce.internal.UnknownAnnouncer
UnusedMethodParameter | 2 | 78 | [SRC]void send(String title, String message) { [MSG]Violation in class UnknownAnnouncer. Method parameter [message] is never referenced in the method send of class org.gradle.api.plugins.announce.internal.UnknownAnnouncer
UnnecessaryElseStatement | 3 | 51 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryGetter | 3 | 65 | [SRC]return getClass().getClassLoader().loadClass("org.gradle..conProvider) [MSG]Violation in class org.gradle.api.plugins.announce.internal.DefaultAnnouncerFactory. getClassLoader() can probably be rewritten as classLoader

### ➥ GrowlNotifyBackedAnnouncer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedPrivateMethod | 2 | 46 | [SRC]private def escape(String value) { [MSG]The method escape is not used within GrowlNotifyBackedAnnouncer.groovy
UnnecessaryDefInMethodDeclaration | 3 | 46 | [SRC]private def escape(String value) { [MSG]Violation in class org.gradle.api.plugins.announce.internal.GrowlNotifyBackedAnnouncer. The def keyword is unneeded when a method is marked private

### ➥ Snarl.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 43 | [SRC]with(new PrintWriter(sock.getOutputStream(), true)) { out -> [MSG]Violation in class org.gradle.api.plugins.announce.internal.Snarl. getOutputStream() can probably be rewritten as outputStream
UnnecessaryElseStatement | 3 | 66 | [SRC]else { [MSG]When an if statement block ends with a return statement the else is unnecessary

### ➥ Twitter.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
ImportFromSunPackages | 2 | 20 | [SRC]import sun.misc.BASE64Encoder [MSG]The file imports sun.misc.BASE64Encoder, which is not portable and likely to change
UnusedMethodParameter | 2 | 40 | [SRC]void send(String title, String message) { [MSG]Violation in class Twitter. Method parameter [title] is never referenced in the method send of class org.gradle.api.plugins.announce.internal.Twitter

## Package: src.org.gradle.api.plugins.quality

### ➥ Checkstyle.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 66 | [SRC]getConfigProperties() [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getConfigProperties() can probably be rewritten as configProperties
UnnecessaryGetter | 3 | 144 | [SRC]antBuilder.withClasspath(getCheckstyleClasspath()).execute { [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getCheckstyleClasspath() can probably be rewritten as checkstyleClasspath
UnnecessaryGetter | 3 | 147 | [SRC]ant.checkstyle(config: getConfigFile(), failOnViolation:..pertyName) { [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getConfigFile() can probably be rewritten as configFile
UnnecessaryGetter | 3 | 148 | [SRC]getSource().addToAntBuilder(ant, 'fileset', FileCollecti..ype.FileSet) [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getSource() can probably be rewritten as source
UnnecessaryGetter | 3 | 149 | [SRC]getClasspath().addToAntBuilder(ant, 'classpath') [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getClasspath() can probably be rewritten as classpath
UnnecessaryGetter | 3 | 155 | [SRC]getConfigProperties().each { key, value -> [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getConfigProperties() can probably be rewritten as configProperties
UnnecessaryGetter | 3 | 160 | [SRC]if (!getIgnoreFailures() && ant.project.properties[propertyName]) { [MSG]Violation in class org.gradle.api.plugins.quality.Checkstyle. getIgnoreFailures() can probably be rewritten as ignoreFailures

### ➥ CodeNarc.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 102 | [SRC]antBuilder.withClasspath(getCodenarcClasspath()).execute { [MSG]Violation in class org.gradle.api.plugins.quality.CodeNarc. getCodenarcClasspath() can probably be rewritten as codenarcClasspath
UnnecessaryGetter | 3 | 105 | [SRC]ant.codenarc(ruleSetFiles: "file:${getConfigFile()}", ma..ations: 0) { [MSG]Violation in class org.gradle.api.plugins.quality.CodeNarc. getConfigFile() can probably be rewritten as configFile
UnnecessaryGetter | 3 | 116 | [SRC]if (getIgnoreFailures()) { [MSG]Violation in class org.gradle.api.plugins.quality.CodeNarc. getIgnoreFailures() can probably be rewritten as ignoreFailures

### ➥ FindBugs.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 113 | [SRC]antBuilder.withClasspath(getFindbugsClasspath()).execute { [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getFindbugsClasspath() can probably be rewritten as findbugsClasspath
UnnecessaryGetter | 3 | 116 | [SRC]getFindbugsClasspath().addToAntBuilder(ant, 'classpath') [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getFindbugsClasspath() can probably be rewritten as findbugsClasspath
UnnecessaryGetter | 3 | 117 | [SRC]getPluginClasspath().addToAntBuilder(ant, 'pluginList') [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getPluginClasspath() can probably be rewritten as pluginClasspath
UnnecessaryGetter | 3 | 118 | [SRC]getClasses().addToAntBuilder(ant, 'auxAnalyzepath') [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getClasses() can probably be rewritten as classes
UnnecessaryGetter | 3 | 121 | [SRC]addUnlessEmpty(ant, getClasspath(), 'auxClasspath') [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getClasspath() can probably be rewritten as classpath
UnnecessaryGetter | 3 | 122 | [SRC]addUnlessEmpty(ant, getSource(), 'sourcePath') [MSG]Violation in class org.gradle.api.plugins.quality.FindBugs. getSource() can probably be rewritten as source

### ➥ GroovyCodeQualityPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 40 | [SRC]def GroovyCodeQualityPluginConvention(Project project) { [MSG]Violation in class org.gradle.api.plugins.quality.GroovyCodeQualityPluginConvention. The def keyword is unneeded on constructors

### ➥ JDepend.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 99 | [SRC]antBuilder.withClasspath(getJdependClasspath()).execute { [MSG]Violation in class org.gradle.api.plugins.quality.JDepend. getJdependClasspath() can probably be rewritten as jdependClasspath
UnnecessaryGetter | 3 | 103 | [SRC]pathElement(location: getClassesDir()) [MSG]Violation in class org.gradle.api.plugins.quality.JDepend. getClassesDir() can probably be rewritten as classesDir

### ➥ JavaCodeQualityPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 40 | [SRC]def JavaCodeQualityPluginConvention(Project project) { [MSG]Violation in class org.gradle.api.plugins.quality.JavaCodeQualityPluginConvention. The def keyword is unneeded on constructors

### ➥ Pmd.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 68 | [SRC]antBuilder.withClasspath(getPmdClasspath()).execute { [MSG]Violation in class org.gradle.api.plugins.quality.Pmd. getPmdClasspath() can probably be rewritten as pmdClasspath
UnnecessaryGetter | 3 | 70 | [SRC]ant.pmd(failOnRuleViolation: !getIgnoreFailures()) { [MSG]Violation in class org.gradle.api.plugins.quality.Pmd. getIgnoreFailures() can probably be rewritten as ignoreFailures
UnnecessaryGetter | 3 | 71 | [SRC]getSource().addToAntBuilder(ant, 'fileset', FileCollecti..ype.FileSet) [MSG]Violation in class org.gradle.api.plugins.quality.Pmd. getSource() can probably be rewritten as source
UnnecessaryGetter | 3 | 72 | [SRC]getRuleSets().each { [MSG]Violation in class org.gradle.api.plugins.quality.Pmd. getRuleSets() can probably be rewritten as ruleSets
UnnecessaryGetter | 3 | 75 | [SRC]getRuleSetFiles().each { [MSG]Violation in class org.gradle.api.plugins.quality.Pmd. getRuleSetFiles() can probably be rewritten as ruleSetFiles

## Package: src.org.gradle.api.plugins.quality.internal

### ➥ AbstractCodeQualityPlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 106 | [SRC]protected void configureTaskDefaults(T task, String baseName) { [MSG]Violation in class AbstractCodeQualityPlugin. Method parameter [task] is never referenced in the method configureTaskDefaults of class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
UnusedMethodParameter | 2 | 106 | [SRC]protected void configureTaskDefaults(T task, String baseName) { [MSG]Violation in class AbstractCodeQualityPlugin. Method parameter [baseName] is never referenced in the method configureTaskDefaults of class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
UnusedMethodParameter | 2 | 118 | [SRC]protected void configureForSourceSet(SourceSet sourceSet, T task) { [MSG]Violation in class AbstractCodeQualityPlugin. Method parameter [sourceSet] is never referenced in the method configureForSourceSet of class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
UnusedMethodParameter | 2 | 118 | [SRC]protected void configureForSourceSet(SourceSet sourceSet, T task) { [MSG]Violation in class AbstractCodeQualityPlugin. Method parameter [task] is never referenced in the method configureForSourceSet of class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
UnnecessarySubstring | 3 | 101 | [SRC]prunedName = prunedName[0].toLowerCase() + prunedName.substring(1) [MSG]Violation in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin. The String.substring(int) method can be replaced with the subscript operator
UnnecessaryCollectCall | 3 | 123 | [SRC]project.tasks['check'].dependsOn { extension.sourceSets...me, null) }} [MSG]Violation in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin. The call to collect could probably be rewritten as a spread expression: extension.sourceSets*.getTaskName(taskBaseName, null)

## Package: src.org.gradle.api.plugins.scala

### ➥ ScalaBasePlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedPrivateMethodParameter | 2 | 64 | [SRC]private void configureCompileDefaults(final Project proj..avaPlugin) { [MSG]Violation in class ScalaBasePlugin. Method parameter [javaPlugin] is never referenced in the method configureCompileDefaults of class org.gradle.api.plugins.scala.ScalaBasePlugin
UnnecessaryDotClass | 3 | 35 | [SRC]JavaBasePlugin javaPlugin = project.plugins.apply(JavaBa..ugin.class); [MSG]JavaBasePlugin.class can be rewritten as JavaBasePlugin
UnnecessaryDotClass | 3 | 46 | [SRC]project.convention.getPlugin(JavaPluginConvention.class)..sourceSet -> [MSG]JavaPluginConvention.class can be rewritten as JavaPluginConvention
UnnecessaryDotClass | 3 | 54 | [SRC]ScalaCompile scalaCompile = project.tasks.add(taskName, ..pile.class); [MSG]ScalaCompile.class can be rewritten as ScalaCompile
UnnecessaryDotClass | 3 | 65 | [SRC]project.tasks.withType(ScalaCompile.class) {ScalaCompile compile -> [MSG]ScalaCompile.class can be rewritten as ScalaCompile
UnnecessaryGetter | 3 | 71 | [SRC]project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc -> [MSG]Violation in class org.gradle.api.plugins.scala.ScalaBasePlugin. getTasks() can probably be rewritten as tasks
UnnecessaryDotClass | 3 | 71 | [SRC]project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc -> [MSG]ScalaDoc.class can be rewritten as ScalaDoc

### ➥ ScalaPlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 30 | [SRC]project.plugins.apply(ScalaBasePlugin.class); [MSG]ScalaBasePlugin.class can be rewritten as ScalaBasePlugin
UnnecessaryDotClass | 3 | 31 | [SRC]project.plugins.apply(JavaPlugin.class); [MSG]JavaPlugin.class can be rewritten as JavaPlugin
UnnecessaryGetter | 3 | 37 | [SRC]project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc -> [MSG]Violation in class org.gradle.api.plugins.scala.ScalaPlugin. getTasks() can probably be rewritten as tasks
UnnecessaryDotClass | 3 | 37 | [SRC]project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc -> [MSG]ScalaDoc.class can be rewritten as ScalaDoc
UnnecessaryDotClass | 3 | 41 | [SRC]ScalaDoc scalaDoc = project.tasks.add(SCALA_DOC_TASK_NAM..laDoc.class) [MSG]ScalaDoc.class can be rewritten as ScalaDoc

## Package: src.org.gradle.api.plugins.sonar.internal

### ➥ SonarCodeAnalyzer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryObjectReferences | 3 | 71 | [SRC]projectDef.workDir = sonarProject.workDir [MSG]The code could be more concise by using a with() or identity() block

## Package: src.org.gradle.api.plugins.sonar.model

### ➥ IncludeProperties.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryPackageReference | 3 | 26 | [SRC]public @interface IncludeProperties {} [MSG]The java.lang.annotation.Annotation class was explicitly imported, so specifying the package name is not necessary

### ➥ SonarProperty.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryPackageReference | 3 | 26 | [SRC]public @interface SonarProperty { [MSG]The java.lang.annotation.Annotation class was explicitly imported, so specifying the package name is not necessary

## Package: src.org.gradle.api.publication

### ➥ PublicationPlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 36 | [SRC]project.task("publishArchives", dependsOn: 'assemble', t..ons.class) { [MSG]PublishPublications.class can be rewritten as PublishPublications
UnnecessaryDotClass | 3 | 39 | [SRC]project.task("installArchives", dependsOn: 'assemble', t..ons.class) { [MSG]InstallPublications.class can be rewritten as InstallPublications

### ➥ Publications.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 27 | [SRC]ConfigureUtil.configure(c, getMaven()) [MSG]Violation in class org.gradle.api.publication.Publications. getMaven() can probably be rewritten as maven

## Package: src.org.gradle.api.publication.maven.internal

### ➥ MavenPublicationPomGenerator.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryObjectReferences | 3 | 44 | [SRC]model.description = publication.description [MSG]The code could be more concise by using a with() or identity() block
UnnecessaryObjectReferences | 3 | 55 | [SRC]dependency.optional = mavenDep.optional [MSG]The code could be more concise by using a with() or identity() block

## Package: src.org.gradle.api.publication.maven.internal.ant

### ➥ DefaultGroovyMavenDeployer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryElseStatement | 3 | 47 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary

### ➥ DefaultMavenPublisher.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 55 | [SRC]private def execute(MavenPublication publication, Instal..port task) { [MSG]Violation in class org.gradle.api.publication.maven.internal.ant.DefaultMavenPublisher. The def keyword is unneeded when a method is marked private

## Package: src.org.gradle.api.publication.maven.internal.model

### ➥ DefaultMavenPublication.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 42 | [SRC]ConfigureUtil.configure(c, getRepository()) [MSG]Violation in class org.gradle.api.publication.maven.internal.model.DefaultMavenPublication. getRepository() can probably be rewritten as repository

## Package: src.org.gradle.api.tasks.application

### ➥ CreateStartScripts.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 69 | [SRC]if (!getApplicationName()) { [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 72 | [SRC]return "${GUtil.toConstant(getApplicationName())}_OPTS" [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 80 | [SRC]if (!getApplicationName()) { [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 83 | [SRC]return "${GUtil.toConstant(getApplicationName())}_EXIT_CONSOLE" [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 88 | [SRC]return new File(getOutputDir(), getApplicationName()) [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getOutputDir() can probably be rewritten as outputDir
UnnecessaryGetter | 3 | 88 | [SRC]return new File(getOutputDir(), getApplicationName()) [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 93 | [SRC]return new File(getOutputDir(), "${getApplicationName()}.bat") [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getOutputDir() can probably be rewritten as outputDir
UnnecessaryGetter | 3 | 93 | [SRC]return new File(getOutputDir(), "${getApplicationName()}.bat") [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 98 | [SRC]getOutputDir().mkdirs() [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getOutputDir() can probably be rewritten as outputDir
UnnecessaryGetter | 3 | 101 | [SRC]generator.applicationName = getApplicationName() [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getApplicationName() can probably be rewritten as applicationName
UnnecessaryGetter | 3 | 102 | [SRC]generator.mainClassName = getMainClassName() [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getMainClassName() can probably be rewritten as mainClassName
UnnecessaryGetter | 3 | 103 | [SRC]generator.optsEnvironmentVar = getOptsEnvironmentVar() [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getOptsEnvironmentVar() can probably be rewritten as optsEnvironmentVar
UnnecessaryGetter | 3 | 104 | [SRC]generator.exitEnvironmentVar = getExitEnvironmentVar() [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getExitEnvironmentVar() can probably be rewritten as exitEnvironmentVar
UnnecessaryGetter | 3 | 105 | [SRC]generator.classpath = getClasspath().collect { "lib/${it.name}" } [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getClasspath() can probably be rewritten as classpath
UnnecessaryGetter | 3 | 106 | [SRC]generator.scriptRelPath = "bin/${getUnixScript().name}" [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getUnixScript() can probably be rewritten as unixScript
UnnecessaryObjectReferences | 3 | 106 | [SRC]generator.scriptRelPath = "bin/${getUnixScript().name}" [MSG]The code could be more concise by using a with() or identity() block
UnnecessaryGetter | 3 | 107 | [SRC]generator.generateUnixScript(getUnixScript()) [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getUnixScript() can probably be rewritten as unixScript
UnnecessaryObjectReferences | 3 | 107 | [SRC]generator.generateUnixScript(getUnixScript()) [MSG]The code could be more concise by using a with() or identity() block
UnnecessaryGetter | 3 | 108 | [SRC]generator.generateWindowsScript(getWindowsScript()) [MSG]Violation in class org.gradle.api.tasks.application.CreateStartScripts. getWindowsScript() can probably be rewritten as windowsScript
UnnecessaryObjectReferences | 3 | 108 | [SRC]generator.generateWindowsScript(getWindowsScript()) [MSG]The code could be more concise by using a with() or identity() block

## Package: src.org.gradle.api.tasks.bundling

### ➥ Jar.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 47 | [SRC]Manifest manifest = getManifest() ?: new DefaultManifest(null) [MSG]Violation in class org.gradle.api.tasks.bundling.Jar. getManifest() can probably be rewritten as manifest
UnnecessaryGetter | 3 | 86 | [SRC]if (getManifest() == null) { [MSG]Violation in class org.gradle.api.tasks.bundling.Jar. getManifest() can probably be rewritten as manifest
UnnecessaryGetter | 3 | 89 | [SRC]ConfigureUtil.configure(configureClosure, getManifest()); [MSG]Violation in class org.gradle.api.tasks.bundling.Jar. getManifest() can probably be rewritten as manifest
UnnecessaryGetter | 3 | 107 | [SRC]return ConfigureUtil.configure(configureClosure, getMetaInf()) [MSG]Violation in class org.gradle.api.tasks.bundling.Jar. getMetaInf() can probably be rewritten as metaInf

### ➥ War.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 46 | [SRC]def classpath = getClasspath() [MSG]Violation in class org.gradle.api.tasks.bundling.War. getClasspath() can probably be rewritten as classpath
UnnecessaryGetter | 3 | 52 | [SRC]def classpath = getClasspath() [MSG]Violation in class org.gradle.api.tasks.bundling.War. getClasspath() can probably be rewritten as classpath
UnnecessaryGetter | 3 | 58 | [SRC]getWebXml() [MSG]Violation in class org.gradle.api.tasks.bundling.War. getWebXml() can probably be rewritten as webXml
UnnecessaryGetter | 3 | 80 | [SRC]return ConfigureUtil.configure(configureClosure, getWebInf()) [MSG]Violation in class org.gradle.api.tasks.bundling.War. getWebInf() can probably be rewritten as webInf
UnnecessaryGetter | 3 | 110 | [SRC]FileCollection oldClasspath = getClasspath() [MSG]Violation in class org.gradle.api.tasks.bundling.War. getClasspath() can probably be rewritten as classpath

## Package: src.org.gradle.api.tasks.compile

### ➥ AbstractOptions.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 48 | [SRC]((field.getModifiers() & Modifier.STATIC) == 0) && [MSG]Violation in class org.gradle.api.tasks.compile.AbstractOptions. getModifiers() can probably be rewritten as modifiers
UnnecessaryGetter | 3 | 49 | [SRC](field.getName() != "metaClass") && [MSG]Violation in class org.gradle.api.tasks.compile.AbstractOptions. getName() can probably be rewritten as name

## Package: src.org.gradle.api.tasks.javadoc

### ➥ AntGroovydoc.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 31 | [SRC]def AntGroovydoc(IsolatedAntBuilder ant, ClassPathRegist..hRegistry) { [MSG]Violation in class org.gradle.api.tasks.javadoc.AntGroovydoc. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.tasks.scala

### ➥ AntScalaDoc.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedPrivateField | 2 | 24 | [SRC]private static Logger logger = LoggerFactory.getLogger(AntScalaDoc) [MSG]The field logger is not used within the class org.gradle.api.tasks.scala.AntScalaDoc
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def AntScalaDoc(IsolatedAntBuilder antBuilder) { [MSG]Violation in class org.gradle.api.tasks.scala.AntScalaDoc. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 36 | [SRC]def AntScalaDoc(IsolatedAntBuilder antBuilder, Iterable<..nsionDirs) { [MSG]Violation in class org.gradle.api.tasks.scala.AntScalaDoc. The def keyword is unneeded on constructors

## Package: src.org.gradle.api.tasks.testing.testng

### ➥ TestNGOptions.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 194 | [SRC]return suiteXmlBuilder.getMetaClass()."${name}" [MSG]Violation in class org.gradle.api.tasks.testing.testng.TestNGOptions. getMetaClass() can probably be rewritten as metaClass
UnnecessaryElseStatement | 3 | 195 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryGetter | 3 | 202 | [SRC]return suiteXmlBuilder.getMetaClass().invokeMethod(suite.. name, args) [MSG]Violation in class org.gradle.api.tasks.testing.testng.TestNGOptions. getMetaClass() can probably be rewritten as metaClass
UnnecessaryElseStatement | 3 | 203 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary

## Package: src.org.gradle.api.tasks.util

### ➥ PatternSet.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 206 | [SRC]def addToAntBuilder(node, String childNodeName = null) { [MSG]Violation in class PatternSet. Method parameter [childNodeName] is never referenced in the method addToAntBuilder of class org.gradle.api.tasks.util.PatternSet
UnusedMethodParameter | 2 | 242 | [SRC]def addToAntBuilder(Object node, String childNodeName) { [MSG]Violation in class IntersectionPatternSet. Method parameter [childNodeName] is never referenced in the method addToAntBuilder of class org.gradle.api.tasks.util.IntersectionPatternSet
UnnecessaryDefInFieldDeclaration | 3 | 51 | [SRC]def boolean caseSensitive = true [MSG]Violation in class org.gradle.api.tasks.util.PatternSet. The def keyword is unneeded when a field type is specified
UnnecessaryDefInMethodDeclaration | 3 | 57 | [SRC]static def setGlobalExcludes(Collection<String> excludes) { [MSG]Violation in class org.gradle.api.tasks.util.PatternSet. The def keyword is unneeded when a method is marked static
UnnecessaryDefInMethodDeclaration | 3 | 62 | [SRC]static def resetGlobalExcludes() { [MSG]Violation in class org.gradle.api.tasks.util.PatternSet. The def keyword is unneeded when a method is marked static
UnnecessaryDefInMethodDeclaration | 3 | 66 | [SRC]def boolean equals(Object o) { [MSG]Violation in class org.gradle.api.tasks.util.PatternSet. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 76 | [SRC]def int hashCode() { [MSG]Violation in class org.gradle.api.tasks.util.PatternSet. The def keyword is unneeded when a method specifies a return type
UnnecessaryDefInMethodDeclaration | 3 | 234 | [SRC]def IntersectionPatternSet(PatternSet other) { [MSG]Violation in class org.gradle.api.tasks.util.IntersectionPatternSet. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 239 | [SRC]return new AndSpec<FileTreeElement>([super.getAsSpec(), ..] as Spec[]) [MSG]Violation in class org.gradle.api.tasks.util.IntersectionPatternSet. getAsSpec() can probably be rewritten as asSpec
UnnecessaryGetter | 3 | 239 | [SRC]return new AndSpec<FileTreeElement>([super.getAsSpec(), ..] as Spec[]) [MSG]Violation in class org.gradle.api.tasks.util.IntersectionPatternSet. getAsSpec() can probably be rewritten as asSpec

## Package: src.org.gradle.groovy.scripts

### ➥ BasicScript.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 34 | [SRC]standardOutputCapture = services.get(StandardOutputCapture.class) [MSG]StandardOutputCapture.class can be rewritten as StandardOutputCapture
UnnecessaryDefInMethodDeclaration | 3 | 38 | [SRC]def Object getScriptTarget() { [MSG]Violation in class org.gradle.groovy.scripts.BasicScript. The def keyword is unneeded when a method returns the Object type
UnnecessaryDefInMethodDeclaration | 3 | 42 | [SRC]def StandardOutputCapture getStandardOutputCapture() { [MSG]Violation in class org.gradle.groovy.scripts.BasicScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryGetter | 3 | 65 | [SRC]return target.getProperties() [MSG]Violation in class org.gradle.groovy.scripts.BasicScript. getProperties() can probably be rewritten as properties

### ➥ DefaultScript.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 43 | [SRC]private static final Logger LOGGER = Logging.getLogger(Script.class) [MSG]Script.class can be rewritten as Script
UnnecessaryDefInMethodDeclaration | 3 | 49 | [SRC]def void init(Object target, ServiceRegistry services) { [MSG]Violation in class org.gradle.groovy.scripts.DefaultScript. The def keyword is unneeded when a method specifies a return type
UnnecessaryDotClass | 3 | 52 | [SRC]loggingManager = services.get(LoggingManager.class) [MSG]LoggingManager.class can be rewritten as LoggingManager
UnnecessaryDotClass | 3 | 68 | [SRC]ObjectConfigurationAction action = new DefaultObjectConf..criptTarget) [MSG]ScriptPluginFactory.class can be rewritten as ScriptPluginFactory
UnnecessaryDotClass | 3 | 74 | [SRC]ObjectConfigurationAction action = new DefaultObjectConf..criptTarget) [MSG]ScriptPluginFactory.class can be rewritten as ScriptPluginFactory
UnnecessaryDotClass | 3 | 80 | [SRC]return services.get(ScriptHandler.class); [MSG]ScriptHandler.class can be rewritten as ScriptHandler
UnnecessaryGetter | 3 | 84 | [SRC]ConfigureUtil.configure(configureClosure, getBuildscript()) [MSG]Violation in class org.gradle.groovy.scripts.DefaultScript. getBuildscript() can probably be rewritten as buildscript
UnnecessaryDefInMethodDeclaration | 3 | 172 | [SRC]def String toString() { [MSG]Violation in class org.gradle.groovy.scripts.DefaultScript. The def keyword is unneeded when a method specifies a return type

## Package: src.org.gradle.initialization

### ➥ InitScript.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 23 | [SRC]getBuildscript() [MSG]Violation in class org.gradle.initialization.InitScript. getBuildscript() can probably be rewritten as buildscript
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def String toString() { [MSG]Violation in class org.gradle.initialization.InitScript. The def keyword is unneeded when a method specifies a return type

### ➥ SettingsScript.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 21 | [SRC]def String toString() { [MSG]Violation in class org.gradle.initialization.SettingsScript. The def keyword is unneeded when a method specifies a return type

## Package: src.org.gradle.integtests.fixtures

### ➥ AbstractAutoTestedSamplesTest.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
JUnitPublicNonTestMethod | 2 | 26 | [SRC]void runSamplesFrom(String dir) { [MSG]Violation in class AbstractAutoTestedSamplesTest. The method runSamplesFrom is public but not a test method
JUnitPublicNonTestMethod | 2 | 41 | [SRC]void includeOnly(String includes) { [MSG]Violation in class AbstractAutoTestedSamplesTest. The method includeOnly is public but not a test method

### ➥ AbstractIntegrationSpec.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 44 | [SRC]distribution.getTestDir(); [MSG]Violation in class org.gradle.integtests.fixtures.AbstractIntegrationSpec. getTestDir() can probably be rewritten as testDir
UnnecessaryGetter | 3 | 48 | [SRC]getTestDir().file(path); [MSG]Violation in class org.gradle.integtests.fixtures.AbstractIntegrationSpec. getTestDir() can probably be rewritten as testDir
UnnecessaryGetter | 3 | 130 | [SRC]executer.withUserHomeDir(distribution.getUserHomeDir()) [MSG]Violation in class org.gradle.integtests.fixtures.AbstractIntegrationSpec. getUserHomeDir() can probably be rewritten as userHomeDir
UnnecessaryGetter | 3 | 131 | [SRC]return new GradleBackedArtifactBuilder(executer, getTest..artifacts")) [MSG]Violation in class org.gradle.integtests.fixtures.AbstractIntegrationSpec. getTestDir() can probably be rewritten as testDir

### ➥ AutoTestedSamplesUtil.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryParenthesesForMethodCallWithClosure | 3 | 34 | [SRC]list.each() { runSamplesFromFile(it, runner) } [MSG]Violation in class org.gradle.integtests.fixtures.AutoTestedSamplesUtil. Parentheses in the 'each' method call are unnecessary and can be removed.

### ➥ CrossVersionIntegrationSpec.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 37 | [SRC]current.getTestDir(); [MSG]Violation in class org.gradle.integtests.fixtures.CrossVersionIntegrationSpec. getTestDir() can probably be rewritten as testDir

### ➥ CrossVersionTestRunner.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessarySubstring | 3 | 68 | [SRC]def minVersion = targetGradleVersion.substring(0, target..ength() - 1) [MSG]Violation in class org.gradle.integtests.fixtures.CrossVersionTestRunner$PreviousVersionExecution. The String.substring(int, int) method can be replaced with the subscript operator

### ➥ HttpServer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 338 | [SRC]boolean reauthenticate(Principal user) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [user] is never referenced in the method reauthenticate of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
UnusedMethodParameter | 2 | 342 | [SRC]boolean isUserInRole(Principal user, String role) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [user] is never referenced in the method isUserInRole of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
UnusedMethodParameter | 2 | 342 | [SRC]boolean isUserInRole(Principal user, String role) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [role] is never referenced in the method isUserInRole of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
EmptyMethod | 2 | 346 | [SRC]void disassociate(Principal user) { [MSG]Violation in class HttpServer$TestUserRealm. The method disassociate is both empty and not marked with @Override
UnusedMethodParameter | 2 | 346 | [SRC]void disassociate(Principal user) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [user] is never referenced in the method disassociate of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
UnusedMethodParameter | 2 | 349 | [SRC]Principal pushRole(Principal user, String role) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [role] is never referenced in the method pushRole of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
EmptyMethod | 2 | 357 | [SRC]void logout(Principal user) { [MSG]Violation in class HttpServer$TestUserRealm. The method logout is both empty and not marked with @Override
UnusedMethodParameter | 2 | 357 | [SRC]void logout(Principal user) { [MSG]Violation in class HttpServer$TestUserRealm. Method parameter [user] is never referenced in the method logout of class org.gradle.integtests.fixtures.HttpServer$TestUserRealm
UnnecessaryDotClass | 3 | 31 | [SRC]private static Logger logger = LoggerFactory.getLogger(H..erver.class) [MSG]HttpServer.class can be rewritten as HttpServer
UnnecessarySubstring | 3 | 93 | [SRC]def relativePath = request.pathInfo.substring(path.length() + 1) [MSG]Violation in class org.gradle.integtests.fixtures.HttpServer$3. The String.substring(int) method can be replaced with the subscript operator

### ➥ JUnitTestExecutionResult.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 100 | [SRC]TestClassExecutionResult assertTestSkipped(String name) { [MSG]Violation in class JUnitTestClassExecutionResult. Method parameter [name] is never referenced in the method assertTestSkipped of class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult
UnusedMethodParameter | 2 | 110 | [SRC]TestClassExecutionResult assertConfigMethodPassed(String name) { [MSG]Violation in class JUnitTestClassExecutionResult. Method parameter [name] is never referenced in the method assertConfigMethodPassed of class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult
UnusedMethodParameter | 2 | 114 | [SRC]TestClassExecutionResult assertConfigMethodFailed(String name) { [MSG]Violation in class JUnitTestClassExecutionResult. Method parameter [name] is never referenced in the method assertConfigMethodFailed of class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult
MisorderedStaticImports | 3 | 21 | [SRC]import static org.hamcrest.Matchers.* [MSG]Static imports should appear before normal imports
MisorderedStaticImports | 3 | 22 | [SRC]import static org.junit.Assert.assertThat [MSG]Static imports should appear before normal imports
UnnecessaryDefInMethodDeclaration | 3 | 27 | [SRC]def JUnitTestExecutionResult(TestFile projectDir, String..= 'build') { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestExecutionResult. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 41 | [SRC]private def findTestClass(String testClass) { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 49 | [SRC]private def findClasses() { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 69 | [SRC]def JUnitTestClassExecutionResult(GPathResult testClassN..ClassName) { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 130 | [SRC]private def findTests() { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 160 | [SRC]private def findIgnoredTests() { [MSG]Violation in class org.gradle.integtests.fixtures.JUnitTestClassExecutionResult. The def keyword is unneeded when a method is marked private

### ➥ MavenRepository.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryCollectCall | 3 | 106 | [SRC]artifactNames = names.collect { it.replace('-SNAPSHOT', ..-${build}")} [MSG]Violation in class org.gradle.integtests.fixtures.MavenModule. The call to collect could probably be rewritten as a spread expression: names*.replace(-SNAPSHOT, -$timestamp-$build)
UnnecessaryCollectCall | 3 | 283 | [SRC]assert dependencies.collect { it.artifactId} as Set == a..ctIds as Set [MSG]Violation in class org.gradle.integtests.fixtures.MavenScope. The call to collect could probably be rewritten as a spread expression: dependencies*.artifactId

### ➥ PreviousGradleVersionExecuter.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 60 | [SRC]def String toString() { [MSG]Violation in class org.gradle.integtests.fixtures.PreviousGradleVersionExecuter. The def keyword is unneeded when a method specifies a return type
UnnecessaryElseStatement | 3 | 102 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryDefInMethodDeclaration | 3 | 158 | [SRC]def TestFile getGradleHomeDir() { [MSG]Violation in class org.gradle.integtests.fixtures.PreviousGradleVersionExecuter. The def keyword is unneeded when a method specifies a return type

### ➥ SFTPServer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
EmptyCatchBlock | 2 | 70 | [SRC]} catch (Throwable e) {} [MSG]The catch block is empty
EmptyCatchBlock | 2 | 73 | [SRC]} catch (Throwable e) {} [MSG]The catch block is empty
EmptyCatchBlock | 2 | 77 | [SRC]} catch (Throwable e) {} [MSG]The catch block is empty
EmptyMethod | 2 | 105 | [SRC]public void showMessage(String message) { [MSG]Violation in class SFTPServer$1. The method showMessage is both empty and not marked with @Override
UnusedMethodParameter | 2 | 128 | [SRC]boolean authenticate(String username, PublicKey key, Ser..n session) { [MSG]Violation in class SFTPServer$3. Method parameter [username] is never referenced in the method authenticate of class org.gradle.integtests.fixtures.SFTPServer$3
UnusedMethodParameter | 2 | 128 | [SRC]boolean authenticate(String username, PublicKey key, Ser..n session) { [MSG]Violation in class SFTPServer$3. Method parameter [key] is never referenced in the method authenticate of class org.gradle.integtests.fixtures.SFTPServer$3
UnusedMethodParameter | 2 | 128 | [SRC]boolean authenticate(String username, PublicKey key, Ser..n session) { [MSG]Violation in class SFTPServer$3. Method parameter [session] is never referenced in the method authenticate of class org.gradle.integtests.fixtures.SFTPServer$3
UnusedMethodParameter | 2 | 160 | [SRC]boolean authenticate(String username, String password, o..n session) { [MSG]Violation in class DummyPasswordAuthenticator. Method parameter [session] is never referenced in the method authenticate of class org.gradle.integtests.fixtures.DummyPasswordAuthenticator
UnnecessaryGetter | 3 | 114 | [SRC]FileUtils.copyURLToFile(fileUrl, new File(configDir.getR..-dsa.key")); [MSG]Violation in class org.gradle.integtests.fixtures.SFTPServer. getRoot() can probably be rewritten as root
UnnecessaryGetter | 3 | 118 | [SRC]sshServer.setFileSystemFactory(new TestNativeFileSystemF..stLogger() { [MSG]Violation in class org.gradle.integtests.fixtures.SFTPServer. getRoot() can probably be rewritten as root
UnnecessaryGetter | 3 | 125 | [SRC]sshServer.setKeyPairProvider(new SimpleGeneratorHostKeyP..-dsa.key")); [MSG]Violation in class org.gradle.integtests.fixtures.SFTPServer. getRoot() can probably be rewritten as root
UnnecessaryObjectReferences | 3 | 126 | [SRC]sshServer.setPasswordAuthenticator(new DummyPasswordAuthenticator()); [MSG]The code could be more concise by using a with() or identity() block
UnnecessaryObjectReferences | 3 | 127 | [SRC]sshServer.setPublickeyAuthenticator(new PublickeyAuthenticator() { [MSG]The code could be more concise by using a with() or identity() block
UnnecessaryGetter | 3 | 136 | [SRC]new File(baseDir.getRoot(), filePathToCheck).exists() [MSG]Violation in class org.gradle.integtests.fixtures.SFTPServer. getRoot() can probably be rewritten as root
UnnecessaryGetter | 3 | 140 | [SRC]new TestFile(new File(baseDir.getRoot(), expectedPath)) [MSG]Violation in class org.gradle.integtests.fixtures.SFTPServer. getRoot() can probably be rewritten as root
UnnecessaryPackageReference | 3 | 160 | [SRC]boolean authenticate(String username, String password, o..n session) { [MSG]The org.apache.sshd.server.session.ServerSession class was explicitly imported, so specifying the package name is not necessary

### ➥ TestNGExecutionResult.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 84 | [SRC]TestClassExecutionResult assertTestsSkipped(String... testNames) { [MSG]Violation in class TestNgTestClassExecutionResult. Method parameter [testNames] is never referenced in the method assertTestsSkipped of class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult
UnusedMethodParameter | 2 | 107 | [SRC]TestClassExecutionResult assertStdout(Matcher<? super St..> matcher) { [MSG]Violation in class TestNgTestClassExecutionResult. Method parameter [matcher] is never referenced in the method assertStdout of class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult
UnusedMethodParameter | 2 | 111 | [SRC]TestClassExecutionResult assertStderr(Matcher<? super St..> matcher) { [MSG]Violation in class TestNgTestClassExecutionResult. Method parameter [matcher] is never referenced in the method assertStderr of class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def TestNGExecutionResult(projectDir) { [MSG]Violation in class org.gradle.integtests.fixtures.TestNGExecutionResult. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 46 | [SRC]private def findTestClass(String testClass) { [MSG]Violation in class org.gradle.integtests.fixtures.TestNGExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 54 | [SRC]private def findTestClasses() { [MSG]Violation in class org.gradle.integtests.fixtures.TestNGExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInFieldDeclaration | 3 | 64 | [SRC]def String testClass [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a field type is specified
UnnecessaryDefInFieldDeclaration | 3 | 65 | [SRC]def GPathResult testClassNode [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a field type is specified
UnnecessaryDefInMethodDeclaration | 3 | 67 | [SRC]def TestNgTestClassExecutionResult(String testClass, GPa..resultXml) { [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 127 | [SRC]private def findConfigMethod(String testName) { [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 135 | [SRC]private def findConfigMethods() { [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 143 | [SRC]private def findTestMethod(String testName) { [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 151 | [SRC]private def findTestMethods() { [MSG]Violation in class org.gradle.integtests.fixtures.TestNgTestClassExecutionResult. The def keyword is unneeded when a method is marked private

### ➥ TestNativeFileSystem.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 67 | [SRC]return getFile(baseDir.getAbsolutePath(), file); [MSG]Violation in class org.gradle.integtests.fixtures.TestNativeFileSystemView. getAbsolutePath() can probably be rewritten as absolutePath
UnnecessarySubstring | 3 | 77 | [SRC]String userFileName = physicalName.substring("/".length() - 1); [MSG]Violation in class org.gradle.integtests.fixtures.TestNativeFileSystemView. The String.substring(int) method can be replaced with the subscript operator
UnnecessaryGetter | 3 | 107 | [SRC]String userName = session.getUsername(); [MSG]Violation in class org.gradle.integtests.fixtures.TestNativeFileSystemFactory. getUsername() can probably be rewritten as username

### ➥ TestProxyServer.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 51 | [SRC]void filter(HttpRequest httpRequest) { [MSG]Violation in class TestProxyServer$1. Method parameter [httpRequest] is never referenced in the method filter of class org.gradle.integtests.fixtures.TestProxyServer$1

### ➥ UserGuideSamplesRunner.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
EmptyIfStatement | 2 | 176 | [SRC]if (line.matches('Download .+')) { [MSG]The if statement is empty
UnnecessaryDefInMethodDeclaration | 3 | 42 | [SRC]def UserGuideSamplesRunner(Class<?> testClass) { [MSG]Violation in class org.gradle.integtests.fixtures.UserGuideSamplesRunner. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 45 | [SRC]this.dirFilter = getDirFilterPattern() [MSG]Violation in class org.gradle.integtests.fixtures.UserGuideSamplesRunner. getDirFilterPattern() can probably be rewritten as dirFilterPattern
UnnecessaryDefInMethodDeclaration | 3 | 88 | [SRC]private def cleanup(SampleRun run) { [MSG]Violation in class org.gradle.integtests.fixtures.UserGuideSamplesRunner. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 99 | [SRC]private def runSample(GradleRun run) { [MSG]Violation in class org.gradle.integtests.fixtures.UserGuideSamplesRunner. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 138 | [SRC]private def compareStrings(String expected, String actua..xtraLines) { [MSG]Violation in class org.gradle.integtests.fixtures.UserGuideSamplesRunner. The def keyword is unneeded when a method is marked private
UnnecessaryPackageReference | 3 | 197 | [SRC]actual = actual.replaceAll(java.util.regex.Pattern.quote..le/samples') [MSG]The java.util.regex.Pattern class was explicitly imported, so specifying the package name is not necessary
UnnecessaryPackageReference | 3 | 199 | [SRC]actual = actual.replaceAll(java.util.regex.Pattern.quote..rator), '/') [MSG]The java.util.regex.Pattern class was explicitly imported, so specifying the package name is not necessary

### ➥ WellBehavedPluginTest.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
JUnitPublicNonTestMethod | 2 | 23 | [SRC]String getPluginId() { [MSG]Violation in class WellBehavedPluginTest. The method getPluginId is public but not a test method
JUnitPublicNonTestMethod | 2 | 31 | [SRC]String getMainTask() { [MSG]Violation in class WellBehavedPluginTest. The method getMainTask is public but not a test method
JUnitPublicNonTestMethod | 2 | 35 | [SRC]def "plugin does not force creation of build dir during ..uration"() { [MSG]Violation in class WellBehavedPluginTest. The method plugin does not force creation of build dir during configuration is public but not a test method
JUnitPublicNonTestMethod | 2 | 46 | [SRC]def "plugin can build with empty project"() { [MSG]Violation in class WellBehavedPluginTest. The method plugin can build with empty project is public but not a test method
UnnecessaryGetter | 3 | 37 | [SRC]buildFile << "apply plugin: '${getPluginId()}'" [MSG]Violation in class org.gradle.integtests.fixtures.WellBehavedPluginTest. getPluginId() can probably be rewritten as pluginId
UnnecessaryGetter | 3 | 48 | [SRC]buildFile << "apply plugin: '${getPluginId()}'" [MSG]Violation in class org.gradle.integtests.fixtures.WellBehavedPluginTest. getPluginId() can probably be rewritten as pluginId

## Package: src.org.gradle.plugins.binaries.model.internal

### ➥ ConfigurationBasedNativeDependencySet.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 50 | [SRC]def headersConfiguration = getHeadersConfiguration() [MSG]Violation in class org.gradle.plugins.binaries.model.internal.ConfigurationBasedNativeDependencySet. getHeadersConfiguration() can probably be rewritten as headersConfiguration

## Package: src.org.gradle.plugins.cpp.cdt.model

### ➥ CprojectDescriptor.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 109 | [SRC]protected void store(Node xml) { [MSG]Violation in class CprojectDescriptor. Method parameter [xml] is never referenced in the method store of class org.gradle.plugins.cpp.cdt.model.CprojectDescriptor

## Package: src.org.gradle.plugins.cpp.gpp

### ➥ GppCompileSpec.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 67 | [SRC]task.outputs.file { getOutputFile() } [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppCompileSpec. getOutputFile() can probably be rewritten as outputFile
UnnecessaryGetter | 3 | 143 | [SRC]project.file "$project.buildDir/binaries/${getOutputFileName()}" [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppCompileSpec. getOutputFileName() can probably be rewritten as outputFileName
UnnecessaryGetter | 3 | 150 | [SRC]return "${getBaseName()}.${extension}" [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppCompileSpec. getBaseName() can probably be rewritten as baseName
UnnecessaryElseStatement | 3 | 151 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryGetter | 3 | 152 | [SRC]return getDefaultOutputFileName() [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppCompileSpec. getDefaultOutputFileName() can probably be rewritten as defaultOutputFileName
UnnecessaryGetter | 3 | 157 | [SRC]return OperatingSystem.current().getExecutableName(getBaseName()) [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppCompileSpec. getBaseName() can probably be rewritten as baseName

### ➥ GppLibraryCompileSpec.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 34 | [SRC]return OperatingSystem.current().getSharedLibraryName(getBaseName()) [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppLibraryCompileSpec. getBaseName() can probably be rewritten as baseName
UnnecessaryGetter | 3 | 38 | [SRC]return installName ?: getOutputFileName() [MSG]Violation in class org.gradle.plugins.cpp.gpp.GppLibraryCompileSpec. getOutputFileName() can probably be rewritten as outputFileName

## Package: src.org.gradle.plugins.ear

### ➥ Ear.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 55 | [SRC]getLibDirName() [MSG]Violation in class org.gradle.plugins.ear.Ear. getLibDirName() can probably be rewritten as libDirName
UnnecessarySubstring | 3 | 66 | [SRC]module = new DefaultEarWebModule(details.path, details.p..dexOf('.'))) [MSG]Violation in class org.gradle.plugins.ear.Ear. The String.substring(int, int) method can be replaced with the subscript operator
UnnecessaryGetter | 3 | 128 | [SRC]return ConfigureUtil.configure(configureClosure, getLib()) [MSG]Violation in class org.gradle.plugins.ear.Ear. getLib() can probably be rewritten as lib

### ➥ EarPluginConvention.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 65 | [SRC]def EarPluginConvention(FileResolver fileResolver) { [MSG]Violation in class org.gradle.plugins.ear.EarPluginConvention. The def keyword is unneeded on constructors

## Package: src.org.gradle.plugins.ear.descriptor.internal

### ➥ DefaultDeploymentDescriptor.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 189 | [SRC]if (file.getParentFile() != null) { [MSG]Violation in class org.gradle.plugins.ear.descriptor.internal.DefaultDeploymentDescriptor. getParentFile() can probably be rewritten as parentFile
UnnecessaryGetter | 3 | 190 | [SRC]file.getParentFile().mkdirs() [MSG]Violation in class org.gradle.plugins.ear.descriptor.internal.DefaultDeploymentDescriptor. getParentFile() can probably be rewritten as parentFile

### ➥ DefaultEarWebModule.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedObject | 2 | 39 | [SRC]new Node(web, nodeNameFor("web-uri", name), path) [MSG]The instantiated object is not used
UnusedObject | 2 | 40 | [SRC]new Node(web, nodeNameFor("context-root", name), contextRoot) [MSG]The instantiated object is not used

## Package: src.org.gradle.plugins.ide.eclipse

### ➥ EclipseWtpPlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 44 | [SRC]EclipsePlugin delegatePlugin = project.getPlugins().appl..ugin.class); [MSG]Violation in class org.gradle.plugins.ide.eclipse.EclipseWtpPlugin. getPlugins() can probably be rewritten as plugins
UnnecessaryDotClass | 3 | 44 | [SRC]EclipsePlugin delegatePlugin = project.getPlugins().appl..ugin.class); [MSG]EclipsePlugin.class can be rewritten as EclipsePlugin
UnnecessaryGetter | 3 | 50 | [SRC]delegatePlugin.getLifecycleTask().dependsOn(getLifecycleTask()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.EclipseWtpPlugin. getLifecycleTask() can probably be rewritten as lifecycleTask
UnnecessaryGetter | 3 | 50 | [SRC]delegatePlugin.getLifecycleTask().dependsOn(getLifecycleTask()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.EclipseWtpPlugin. getLifecycleTask() can probably be rewritten as lifecycleTask
UnnecessaryGetter | 3 | 51 | [SRC]delegatePlugin.getCleanTask().dependsOn(getCleanTask()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.EclipseWtpPlugin. getCleanTask() can probably be rewritten as cleanTask
UnnecessaryGetter | 3 | 51 | [SRC]delegatePlugin.getCleanTask().dependsOn(getCleanTask()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.EclipseWtpPlugin. getCleanTask() can probably be rewritten as cleanTask
UnnecessaryDotClass | 3 | 96 | [SRC]if (WarPlugin.class.isAssignableFrom(type)) { [MSG]WarPlugin.class can be rewritten as WarPlugin
UnnecessaryDotClass | 3 | 102 | [SRC]} else if (EarPlugin.class.isAssignableFrom(type)) { [MSG]EarPlugin.class can be rewritten as EarPlugin

### ➥ GenerateEclipseJdt.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 37 | [SRC]jdt = services.get(Instantiator).newInstance(EclipseJdt,..nsformer())) [MSG]Violation in class org.gradle.plugins.ide.eclipse.GenerateEclipseJdt. getTransformer() can probably be rewritten as transformer
UnnecessaryGetter | 3 | 41 | [SRC]return new Jdt(getTransformer()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.GenerateEclipseJdt. getTransformer() can probably be rewritten as transformer
UnnecessaryGetter | 3 | 45 | [SRC]def jdtModel = getJdt() [MSG]Violation in class org.gradle.plugins.ide.eclipse.GenerateEclipseJdt. getJdt() can probably be rewritten as jdt

## Package: src.org.gradle.plugins.ide.eclipse.model

### ➥ AbstractClasspathEntry.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 61 | [SRC]def allAttributes = attributes.findAll { it.value } + [k.. path: path] [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry. getKind() can probably be rewritten as kind

### ➥ AccessRule.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 25 | [SRC]def AccessRule(kind, pattern) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.AccessRule. The def keyword is unneeded on constructors

### ➥ BuildCommand.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 25 | [SRC]def BuildCommand(String name, Map arguments = [:]) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.BuildCommand. The def keyword is unneeded on constructors

### ➥ EclipseWtpComponent.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 144 | [SRC]getLibConfigurations() [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.EclipseWtpComponent. getLibConfigurations() can probably be rewritten as libConfigurations

### ➥ EclipseWtpFacet.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 115 | [SRC]xmlFacet.configure(getFacets()) [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.EclipseWtpFacet. getFacets() can probably be rewritten as facets

### ➥ Facet.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def Facet() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Facet. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 34 | [SRC]def Facet(Node node) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Facet. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 38 | [SRC]def Facet(String name, String version) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Facet. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 42 | [SRC]def Facet(FacetType type, String name, String version) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Facet. The def keyword is unneeded on constructors

### ➥ Link.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 29 | [SRC]def Link(String name, String type, String location, Stri..cationUri) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Link. The def keyword is unneeded on constructors

### ➥ Output.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 27 | [SRC]def Output(Node node) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Output. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 31 | [SRC]def Output(String path) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Output. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 41 | [SRC]node.appendNode('classpathentry', [kind: getKind(), path: path]) [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Output. getKind() can probably be rewritten as kind

### ➥ Project.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 59 | [SRC]def Project(XmlTransformer xmlTransformer) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 76 | [SRC]private def readReferencedProjects() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 82 | [SRC]private def readNatures() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 86 | [SRC]private def readBuildCommands() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 96 | [SRC]private def readLinkedResources() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 132 | [SRC]private def addReferencedProjectsToXml() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 139 | [SRC]private def addNaturesToXml() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 146 | [SRC]private def addBuildSpecToXml() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 160 | [SRC]private def addLinkedResourcesToXml() { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.Project. The def keyword is unneeded when a method is marked private

### ➥ WbDependentModule.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 28 | [SRC]def WbDependentModule(node) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbDependentModule. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 32 | [SRC]def WbDependentModule(String deployPath, String handle) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbDependentModule. The def keyword is unneeded on constructors

### ➥ WbProperty.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 26 | [SRC]def WbProperty(node) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbProperty. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def WbProperty(String name, String value) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbProperty. The def keyword is unneeded on constructors

### ➥ WbResource.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 28 | [SRC]def WbResource(node) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbResource. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 32 | [SRC]def WbResource(String deployPath, String sourcePath) { [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.WbResource. The def keyword is unneeded on constructors

## Package: src.org.gradle.plugins.ide.eclipse.model.internal

### ➥ FileReferenceFactory.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessarySubstring | 3 | 49 | [SRC]path = entry.key + filePath.substring(len) [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory. The String.substring(int) method can be replaced with the subscript operator
UnnecessarySubstring | 3 | 91 | [SRC]def file = new File(entry.value, path.substring(prefix.length())) [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory. The String.substring(int) method can be replaced with the subscript operator
UnnecessaryGetter | 3 | 130 | [SRC]", jarUrl='" + getJarURL() + '\'' + [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory$FileReferenceImpl. getJarURL() can probably be rewritten as jarURL

### ➥ WtpComponentFactory.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryCollectCall | 3 | 100 | [SRC]dependencies.collect { it.resolve() }.flatten() as LinkedHashSet [MSG]Violation in class org.gradle.plugins.ide.eclipse.model.internal.WtpComponentFactory. The call to collect could probably be rewritten as a spread expression: dependencies*.resolve()

## Package: src.org.gradle.plugins.ide.idea

### ➥ GenerateIdeaModule.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 43 | [SRC]getModule().mergeXmlModule(xmlModule) [MSG]Violation in class org.gradle.plugins.ide.idea.GenerateIdeaModule. getModule() can probably be rewritten as module

### ➥ GenerateIdeaProject.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 37 | [SRC]getIdeaProject().mergeXmlProject(xmlModule) [MSG]Violation in class org.gradle.plugins.ide.idea.GenerateIdeaProject. getIdeaProject() can probably be rewritten as ideaProject

### ➥ GenerateIdeaWorkspace.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 37 | [SRC]getWorkspace().mergeXmlWorkspace(xmlWorkspace) [MSG]Violation in class org.gradle.plugins.ide.idea.GenerateIdeaWorkspace. getWorkspace() can probably be rewritten as workspace

## Package: src.org.gradle.plugins.ide.idea.model

### ➥ IdeaModel.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 60 | [SRC]ConfigureUtil.configure(closure, getModule()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModel. getModule() can probably be rewritten as module
UnnecessaryGetter | 3 | 71 | [SRC]ConfigureUtil.configure(closure, getProject()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModel. getProject() can probably be rewritten as project
UnnecessaryGetter | 3 | 82 | [SRC]ConfigureUtil.configure(closure, getWorkspace()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModel. getWorkspace() can probably be rewritten as workspace

### ➥ IdeaModule.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 277 | [SRC]ConfigureUtil.configure(closure, getIml()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getIml() can probably be rewritten as iml
UnnecessaryGetter | 3 | 288 | [SRC]new File((File) iml.getGenerateTo(), getName() + ".iml") [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getGenerateTo() can probably be rewritten as generateTo
UnnecessaryGetter | 3 | 288 | [SRC]new File((File) iml.getGenerateTo(), getName() + ".iml") [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getName() can probably be rewritten as name
UnnecessaryGetter | 3 | 302 | [SRC]return new IdeaDependenciesProvider().provide(this, getPathFactory()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getPathFactory() can probably be rewritten as pathFactory
UnnecessaryGetter | 3 | 330 | [SRC]def path = { getPathFactory().path(it) } [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getPathFactory() can probably be rewritten as pathFactory
UnnecessaryGetter | 3 | 331 | [SRC]def contentRoot = path(getContentRoot()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getContentRoot() can probably be rewritten as contentRoot
UnnecessaryGetter | 3 | 332 | [SRC]Set sourceFolders = getSourceDirs().findAll { it.exists(..{ path(it) } [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getSourceDirs() can probably be rewritten as sourceDirs
UnnecessaryGetter | 3 | 333 | [SRC]Set testSourceFolders = getTestSourceDirs().findAll { it..{ path(it) } [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getTestSourceDirs() can probably be rewritten as testSourceDirs
UnnecessaryGetter | 3 | 334 | [SRC]Set excludeFolders = getExcludeDirs().collect { path(it) } [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getExcludeDirs() can probably be rewritten as excludeDirs
UnnecessaryGetter | 3 | 335 | [SRC]def outputDir = getOutputDir() ? path(getOutputDir()) : null [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getOutputDir() can probably be rewritten as outputDir
UnnecessaryGetter | 3 | 335 | [SRC]def outputDir = getOutputDir() ? path(getOutputDir()) : null [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getOutputDir() can probably be rewritten as outputDir
UnnecessaryGetter | 3 | 336 | [SRC]def testOutputDir = getTestOutputDir() ? path(getTestOut..ir()) : null [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getTestOutputDir() can probably be rewritten as testOutputDir
UnnecessaryGetter | 3 | 336 | [SRC]def testOutputDir = getTestOutputDir() ? path(getTestOut..ir()) : null [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getTestOutputDir() can probably be rewritten as testOutputDir
UnnecessaryGetter | 3 | 340 | [SRC]getInheritOutputDirs(), outputDir, testOutputDir, depend..etJdkName()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getInheritOutputDirs() can probably be rewritten as inheritOutputDirs
UnnecessaryGetter | 3 | 340 | [SRC]getInheritOutputDirs(), outputDir, testOutputDir, depend..etJdkName()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaModule. getJdkName() can probably be rewritten as jdkName

### ➥ IdeaProject.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 136 | [SRC]getOutputFile().name.replaceFirst(/\.ipr$/, '') [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getOutputFile() can probably be rewritten as outputFile
UnnecessaryGetter | 3 | 146 | [SRC]ConfigureUtil.configure(closure, getIpr()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getIpr() can probably be rewritten as ipr
UnnecessaryGetter | 3 | 162 | [SRC]def modulePaths = getModules().collect { [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getModules() can probably be rewritten as modules
UnnecessaryGetter | 3 | 163 | [SRC]getPathFactory().relativePath('PROJECT_DIR', it.outputFile) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getPathFactory() can probably be rewritten as pathFactory
UnnecessaryGetter | 3 | 165 | [SRC]xmlProject.configure(modulePaths, getJdkName(), getLangu..Wildcards()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getJdkName() can probably be rewritten as jdkName
UnnecessaryGetter | 3 | 165 | [SRC]xmlProject.configure(modulePaths, getJdkName(), getLangu..Wildcards()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getLanguageLevel() can probably be rewritten as languageLevel
UnnecessaryGetter | 3 | 165 | [SRC]xmlProject.configure(modulePaths, getJdkName(), getLangu..Wildcards()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaProject. getWildcards() can probably be rewritten as wildcards

### ➥ IdeaWorkspace.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 48 | [SRC]ConfigureUtil.configure(closure, getIws()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.IdeaWorkspace. getIws() can probably be rewritten as iws

### ➥ JarDirectory.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 34 | [SRC]def JarDirectory(path, recursive) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.JarDirectory. The def keyword is unneeded on constructors

### ➥ Jdk.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 30 | [SRC]def Jdk(String jdkName, IdeaLanguageLevel ideaLanguageLevel) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Jdk. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 46 | [SRC]def Jdk(assertKeyword, jdk15, languageLevel, projectJdkName) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Jdk. The def keyword is unneeded on constructors

### ➥ Module.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 155 | [SRC]protected def configure(Path contentPath, Set sourceFold..ludeFolders, [MSG]Violation in class org.gradle.plugins.ide.idea.model.Module. The def keyword is unneeded when a method is marked protected

### ➥ ModuleDependency.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 36 | [SRC]def ModuleDependency(name, scope) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleDependency. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 43 | [SRC]parentNode.appendNode('orderEntry', [type: 'module', 'mo..dExported()) [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleDependency. getAttributeMapForScopeAndExported() can probably be rewritten as attributeMapForScopeAndExported
UnnecessaryElseStatement | 3 | 68 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryGetter | 3 | 77 | [SRC]result = 31 * result + getScopeHash(); [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleDependency. getScopeHash() can probably be rewritten as scopeHash

### ➥ ModuleLibrary.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 51 | [SRC]def ModuleLibrary(Collection<Path> classes, Collection<P..ing scope) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleLibrary. The def keyword is unneeded on constructors
UnnecessaryGetter | 3 | 61 | [SRC]Node libraryNode = parentNode.appendNode('orderEntry', [..e('library') [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleLibrary. getAttributeMapForScopeAndExported() can probably be rewritten as attributeMapForScopeAndExported
UnnecessaryElseStatement | 3 | 104 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryGetter | 3 | 117 | [SRC]result = 31 * result + getScopeHash() [MSG]Violation in class org.gradle.plugins.ide.idea.model.ModuleLibrary. getScopeHash() can probably be rewritten as scopeHash

### ➥ PathFactory.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessarySubstring | 3 | 84 | [SRC]expandedUrl = toUrl('file', new File(expandedUrl.substri..nonicalFile) [MSG]Violation in class org.gradle.plugins.ide.idea.model.PathFactory. The String.substring(int) method can be replaced with the subscript operator
UnnecessarySubstring | 3 | 86 | [SRC]def parts = expandedUrl.substring(6).split('!') [MSG]Violation in class org.gradle.plugins.ide.idea.model.PathFactory. The String.substring(int) method can be replaced with the subscript operator
UnnecessaryDefInMethodDeclaration | 3 | 94 | [SRC]private def toUrl(String scheme, File file) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.PathFactory. The def keyword is unneeded when a method is marked private
UnnecessaryElseStatement | 3 | 106 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary

### ➥ Project.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 44 | [SRC]def Project(XmlTransformer xmlTransformer, pathFactory) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Project. The def keyword is unneeded on constructors
UnnecessaryDefInMethodDeclaration | 3 | 96 | [SRC]private def findProjectRootManager() { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 100 | [SRC]private def findWildcardResourcePatterns() { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Project. The def keyword is unneeded when a method is marked private
UnnecessaryDefInMethodDeclaration | 3 | 104 | [SRC]private def findModules() { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Project. The def keyword is unneeded when a method is marked private

### ➥ SingleEntryModuleLibrary.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryElseStatement | 3 | 63 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary
UnnecessaryElseStatement | 3 | 74 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary

### ➥ Workspace.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInMethodDeclaration | 3 | 28 | [SRC]def Workspace(XmlTransformer withXmlActions) { [MSG]Violation in class org.gradle.plugins.ide.idea.model.Workspace. The def keyword is unneeded on constructors

## Package: src.org.gradle.plugins.ide.internal

### ➥ IdeDependenciesExtractor.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryPackageReference | 3 | 118 | [SRC]def filter = { it instanceof SelfResolvingDependency && ..Dependency)} [MSG]The org.gradle.api.artifacts.ProjectDependency class was explicitly imported, so specifying the package name is not necessary
UnnecessaryCollectCall | 3 | 122 | [SRC]def files = deps.collect { it.resolve() }.flatten() [MSG]Violation in class org.gradle.plugins.ide.internal.IdeDependenciesExtractor. The call to collect could probably be rewritten as a spread expression: deps*.resolve()
UnnecessaryCollectCall | 3 | 127 | [SRC]def files = deps.collect { it.resolve() }.flatten() [MSG]Violation in class org.gradle.plugins.ide.internal.IdeDependenciesExtractor. The call to collect could probably be rewritten as a spread expression: deps*.resolve()

### ➥ IdePlugin.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 65 | [SRC]protected void onApply(Project target) { [MSG]Violation in class IdePlugin. Method parameter [target] is never referenced in the method onApply of class org.gradle.plugins.ide.internal.IdePlugin
UnnecessaryGetter | 3 | 32 | [SRC]String lifecyleTaskName = getLifecycleTaskName(); [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getLifecycleTaskName() can probably be rewritten as lifecycleTaskName
UnnecessaryGetter | 3 | 49 | [SRC]return project.getTasks().getByName(cleanName(worker.getName())); [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getTasks() can probably be rewritten as tasks
UnnecessaryGetter | 3 | 49 | [SRC]return project.getTasks().getByName(cleanName(worker.getName())); [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getName() can probably be rewritten as name
UnnecessaryGetter | 3 | 58 | [SRC]Delete cleanWorker = project.getTasks().add(cleanName(wo..elete.class) [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getTasks() can probably be rewritten as tasks
UnnecessaryGetter | 3 | 58 | [SRC]Delete cleanWorker = project.getTasks().add(cleanName(wo..elete.class) [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getName() can probably be rewritten as name
UnnecessaryDotClass | 3 | 58 | [SRC]Delete cleanWorker = project.getTasks().add(cleanName(wo..elete.class) [MSG]Delete.class can be rewritten as Delete
UnnecessaryGetter | 3 | 59 | [SRC]cleanWorker.delete(worker.getOutputs().getFiles()) [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getFiles() can probably be rewritten as files
UnnecessaryGetter | 3 | 59 | [SRC]cleanWorker.delete(worker.getOutputs().getFiles()) [MSG]Violation in class org.gradle.plugins.ide.internal.IdePlugin. getOutputs() can probably be rewritten as outputs

## Package: src.org.gradle.plugins.ide.internal.configurer

### ➥ DeduplicationTarget.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInFieldDeclaration | 3 | 26 | [SRC]def String moduleName [MSG]Violation in class org.gradle.plugins.ide.internal.configurer.DeduplicationTarget. The def keyword is unneeded when a field type is specified
UnnecessaryDefInFieldDeclaration | 3 | 27 | [SRC]def Project project [MSG]Violation in class org.gradle.plugins.ide.internal.configurer.DeduplicationTarget. The def keyword is unneeded when a field type is specified
UnnecessaryDefInFieldDeclaration | 3 | 28 | [SRC]def Closure updateModuleName [MSG]Violation in class org.gradle.plugins.ide.internal.configurer.DeduplicationTarget. The def keyword is unneeded when a field type is specified

## Package: src.org.gradle.plugins.ide.internal.generator

### ➥ AbstractPersistableConfigurationObject.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 38 | [SRC]String defaultResourceName = getDefaultResourceName(); [MSG]Violation in class org.gradle.plugins.ide.internal.generator.AbstractPersistableConfigurationObject. getDefaultResourceName() can probably be rewritten as defaultResourceName
UnnecessaryGetter | 3 | 41 | [SRC]throw new IllegalStateException(String.format("Failed to..getName())); [MSG]Violation in class org.gradle.plugins.ide.internal.generator.AbstractPersistableConfigurationObject. getName() can probably be rewritten as name

### ➥ XmlPersistableConfigurationObject.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 51 | [SRC]protected void load(Node xml) { [MSG]Violation in class XmlPersistableConfigurationObject. Method parameter [xml] is never referenced in the method load of class org.gradle.plugins.ide.internal.generator.XmlPersistableConfigurationObject
UnusedMethodParameter | 2 | 58 | [SRC]protected void store(Node xml) { [MSG]Violation in class XmlPersistableConfigurationObject. Method parameter [xml] is never referenced in the method store of class org.gradle.plugins.ide.internal.generator.XmlPersistableConfigurationObject

## Package: src.org.gradle.plugins.signing

### ➥ Sign.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnusedMethodParameter | 2 | 138 | [SRC]void signatureType(SignatureType type) { [MSG]Violation in class Sign. Method parameter [type] is never referenced in the method signatureType of class org.gradle.plugins.signing.Sign
UnnecessaryGetter | 3 | 65 | [SRC]isRequired() || getSignatory() != null [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 69 | [SRC]inputs.property("signatory") { getSignatory()?.keyId?.asHex } [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 71 | [SRC]inputs.files { getSignatures()*.toSign } [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures
UnnecessaryGetter | 3 | 72 | [SRC]outputs.files { getSignatures()*.toSign } [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures
UnnecessaryGetter | 3 | 161 | [SRC]if (getSignatory() == null) { [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 162 | [SRC]throw new InvalidUserDataException("Cannot perform signi.. signatory") [MSG]Violation in class org.gradle.plugins.signing.Sign. getPath() can probably be rewritten as path
UnnecessaryGetter | 3 | 165 | [SRC]getSignatures()*.generate() [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures
UnnecessaryGetter | 3 | 182 | [SRC]def signatureSet = getSignatures() [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures
UnnecessaryGetter | 3 | 196 | [SRC]new SimpleFileCollection(*getSignatures()*.toSign.findAl.. != null })) [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures
UnnecessaryGetter | 3 | 203 | [SRC]new SimpleFileCollection(*getSignatures()*.file.findAll(.. != null })) [MSG]Violation in class org.gradle.plugins.signing.Sign. getSignatures() can probably be rewritten as signatures

### ➥ SignOperation.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 61 | [SRC]getDisplayName() [MSG]Violation in class org.gradle.plugins.signing.SignOperation. getDisplayName() can probably be rewritten as displayName

### ➥ Signature.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 176 | [SRC]name == null ? (toSignArtifact?.name ?: getFile()?.name) : name [MSG]Violation in class org.gradle.plugins.signing.Signature. getFile() can probably be rewritten as file
UnnecessaryGetter | 3 | 187 | [SRC]extension == null ? getSignatureType()?.extension : extension [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatureType() can probably be rewritten as signatureType
UnnecessaryGetter | 3 | 200 | [SRC]def toSign = getToSign() [MSG]Violation in class org.gradle.plugins.signing.Signature. getToSign() can probably be rewritten as toSign
UnnecessaryGetter | 3 | 201 | [SRC]def signatureType = getSignatureType() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatureType() can probably be rewritten as signatureType
UnnecessaryGetter | 3 | 234 | [SRC]def file = getFile() [MSG]Violation in class org.gradle.plugins.signing.Signature. getFile() can probably be rewritten as file
UnnecessaryGetter | 3 | 260 | [SRC]def toSign = getToSign() [MSG]Violation in class org.gradle.plugins.signing.Signature. getToSign() can probably be rewritten as toSign
UnnecessaryGetter | 3 | 261 | [SRC]def signatureType = getSignatureType() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatureType() can probably be rewritten as signatureType
UnnecessaryGetter | 3 | 279 | [SRC]signatureSpec.getSignatory() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 288 | [SRC]signatureSpec.getSignatureType() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatureType() can probably be rewritten as signatureType
UnnecessaryGetter | 3 | 300 | [SRC]def toSign = getToSign() [MSG]Violation in class org.gradle.plugins.signing.Signature. getToSign() can probably be rewritten as toSign
UnnecessaryGetter | 3 | 309 | [SRC]def signatory = getSignatory() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 318 | [SRC]def signatureType = getSignatureType() [MSG]Violation in class org.gradle.plugins.signing.Signature. getSignatureType() can probably be rewritten as signatureType

### ➥ SigningExtension.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 118 | [SRC]this.configuration = getDefaultConfiguration() [MSG]Violation in class org.gradle.plugins.signing.SigningExtension. getDefaultConfiguration() can probably be rewritten as defaultConfiguration
UnnecessaryGetter | 3 | 198 | [SRC]spec.conventionMapping.map('signatory') { getSignatory() } [MSG]Violation in class org.gradle.plugins.signing.SigningExtension. getSignatory() can probably be rewritten as signatory
UnnecessaryGetter | 3 | 199 | [SRC]spec.conventionMapping.map('signatureType') { getSignatureType() } [MSG]Violation in class org.gradle.plugins.signing.SigningExtension. getSignatureType() can probably be rewritten as signatureType
UnnecessaryGetter | 3 | 222 | [SRC]addSignaturesToConfiguration(signTask, getConfiguration()) [MSG]Violation in class org.gradle.plugins.signing.SigningExtension. getConfiguration() can probably be rewritten as configuration
UnnecessaryGetter | 3 | 243 | [SRC]this.addSignaturesToConfiguration(signTask, getConfiguration()) [MSG]Violation in class org.gradle.plugins.signing.SigningExtension. getConfiguration() can probably be rewritten as configuration

## Package: src.org.gradle.plugins.signing.signatory.pgp

### ➥ PgpKeyId.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessarySubstring | 3 | 63 | [SRC]normalised = keyIdUpped.substring(2) [MSG]Violation in class org.gradle.plugins.signing.signatory.pgp.PgpKeyId. The String.substring(int) method can be replaced with the subscript operator

## Package: src.org.gradle.plugins.signing.type

### ➥ AbstractSignatureType.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryGetter | 3 | 37 | [SRC]new File(toSign.path + ".${getExtension()}") [MSG]Violation in class org.gradle.plugins.signing.type.AbstractSignatureType. getExtension() can probably be rewritten as extension
UnnecessaryGetter | 3 | 44 | [SRC]getExtension() [MSG]Violation in class org.gradle.plugins.signing.type.AbstractSignatureType. getExtension() can probably be rewritten as extension
UnnecessaryGetter | 3 | 46 | [SRC]name[++dotIndex..-1] + ".${getExtension()}" [MSG]Violation in class org.gradle.plugins.signing.type.AbstractSignatureType. getExtension() can probably be rewritten as extension

## Package: src.org.gradle.profile

### ➥ HTMLProfileReport.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
StaticSimpleDateFormatField | 2 | 25 | [SRC]private static final SimpleDateFormat DATE_FORMAT = new .. HH:mm:ss"); [MSG]Violation in class org.gradle.profile.HTMLProfileReport. SimpleDateFormat instances are not thread safe. Wrap the SimpleDateFormat field DATE_FORMAT in a ThreadLocal or make it an instance field

## Package: src.org.gradle.util

### ➥ ReflectionUtil.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 49 | [SRC]return Boolean.class; [MSG]Boolean.class can be rewritten as Boolean
UnnecessaryDotClass | 3 | 51 | [SRC]return Long.class; [MSG]Long.class can be rewritten as Long
UnnecessaryDotClass | 3 | 53 | [SRC]return Integer.class; [MSG]Integer.class can be rewritten as Integer
UnnecessaryDotClass | 3 | 55 | [SRC]return Short.class; [MSG]Short.class can be rewritten as Short
UnnecessaryDotClass | 3 | 57 | [SRC]return Byte.class; [MSG]Byte.class can be rewritten as Byte
UnnecessaryDotClass | 3 | 59 | [SRC]return Float.class; [MSG]Float.class can be rewritten as Float
UnnecessaryDotClass | 3 | 61 | [SRC]return Double.class; [MSG]Double.class can be rewritten as Double

### ➥ Requires.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDotClass | 3 | 27 | [SRC]@ExtensionAnnotation(TestPreconditionExtension.class) [MSG]TestPreconditionExtension.class can be rewritten as TestPreconditionExtension

### ➥ TestDirHelper.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryDefInFieldDeclaration | 3 | 19 | [SRC]def TestFile baseDir [MSG]Violation in class org.gradle.util.TestDirHelper. The def keyword is unneeded when a field type is specified
UnnecessaryDefInMethodDeclaration | 3 | 21 | [SRC]def TestDirHelper(TestFile baseDir) { [MSG]Violation in class org.gradle.util.TestDirHelper. The def keyword is unneeded on constructors

### ➥ TestFileHelper.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
AssignmentInConditional | 2 | 40 | [SRC]while (entry = zipStr.getNextEntry()) { [MSG]Assignment used as conditional value, which always results in true. Use the == operator instead
MisorderedStaticImports | 3 | 22 | [SRC]import static org.hamcrest.Matchers.equalTo [MSG]Static imports should appear before normal imports
MisorderedStaticImports | 3 | 23 | [SRC]import static org.junit.Assert.assertThat [MSG]Static imports should appear before normal imports
MisorderedStaticImports | 3 | 24 | [SRC]import static org.junit.Assert.assertTrue [MSG]Static imports should appear before normal imports
UnnecessaryGetter | 3 | 40 | [SRC]while (entry = zipStr.getNextEntry()) { [MSG]Violation in class org.gradle.util.TestFileHelper. getNextEntry() can probably be rewritten as nextEntry
UnnecessarySubstring | 3 | 110 | [SRC]return perms.substring(1, 10) [MSG]Violation in class org.gradle.util.TestFileHelper. The String.substring(int, int) method can be replaced with the subscript operator

### ➥ TestPreconditionExtension.groovy

Rule Name | Priority | Line # | Source Line / Message
--- | --- | --- | ---
UnnecessaryParenthesesForMethodCallWithClosure | 3 | 25 | [SRC]spec.skipped = annotation.value().any() { !it.fulfilled } [MSG]Violation in class org.gradle.util.TestPreconditionExtension. Parentheses in the 'any' method call are unnecessary and can be removed.
UnnecessaryParenthesesForMethodCallWithClosure | 3 | 30 | [SRC]feature.skipped = annotation.value().any() { !it.fulfilled } [MSG]Violation in class org.gradle.util.TestPreconditionExtension. Parentheses in the 'any' method call are unnecessary and can be removed.

## Rule Descriptions

# | Rule Name | Description
--- | --- | ---
1 | AddEmptyString | Finds empty string literals which are being added. This is an inefficient way to convert any type to a String.
2 | AssertWithinFinallyBlock | Checks for assert statements within a finally block. An assert can throw an exception, hiding the original exception, if there is one.
3 | AssignmentInConditional | An assignment operator (=) was used in a conditional test. This is usually a typo, and the comparison operator (==) was intended.
4 | BigDecimalInstantiation | Checks for calls to the BigDecimal constructors that take a double parameter, which may result in an unexpected BigDecimal value.
5 | BitwiseOperatorInConditional | Checks for bitwise operations in conditionals, if you need to do a bitwise operation then it is best practive to extract a temp variable.
6 | BooleanGetBoolean | This rule catches usages of java.lang.Boolean.getBoolean(String) which reads a boolean from the System properties. It is often mistakenly used to attempt to read user input or parse a String into a boolean. It is a poor piece of API to use; replace it with System.properties['prop'].
7 | BrokenNullCheck | Looks for faulty checks for null that can cause a NullPointerException.
8 | BrokenOddnessCheck | The code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0.
9 | BusyWait | Busy waiting (forcing a Thread.sleep() while waiting on a condition) should be avoided. Prefer using the gate and barrier objects in the java.util.concurrent package.
10 | ChainedTest | A test method that invokes another test method is a chained test; the methods are dependent on one another. Tests should be isolated, and not be dependent on one another.
11 | ClassForName | Using Class.forName(...) is a common way to add dynamic behavior to a system. However, using this method can cause resource leaks because the classes can be pinned in memory for long periods of time.
12 | ComparisonOfTwoConstants | Checks for expressions where a comparison operator or equals() or compareTo() is used to compare two constants to each other or two literals that contain only constant values., e.g.: 23 == 67, Boolean.FALSE != false, 0.17 <= 0.99, "abc" > "ddd", [a:1] <=> [a:2], [1,2].equals([3,4]) or [a:false, b:true].compareTo(['a':34.5, b:Boolean.TRUE].
13 | ComparisonWithSelf | Checks for expressions where a comparison operator or equals() or compareTo() is used to compare a variable to itself, e.g.: x == x, x != x, x <=> x, x < x, x =>= x, x.equals(x) or x.compareTo(x), where x is a variable.
14 | ConsecutiveLiteralAppends | Violations occur when method calls to append(Object) are chained together with literals as parameters. The chained calls can be joined into one invocation.
15 | ConsecutiveStringConcatenation | Catches concatenation of two string literals on the same line. These can safely by joined.
16 | ConstantAssertExpression | Checks for assert statements where the assert boolean condition expression is a constant or literal value.
17 | ConstantIfExpression | Checks for if statements with a constant value for the if expression, such as true, false, null, or a literal constant value.
18 | ConstantTernaryExpression | Checks for ternary expressions with a constant value for the boolean expression, such as true, false, null, or a literal constant value.
19 | CoupledTestCase | This rule finds test cases that are coupled to other test cases, either by invoking static methods on another test case or by creating instances of another test case. If you require shared logic in test cases then extract that logic to a new class where it can properly be reused.
20 | CyclomaticComplexity | Checks the cyclomatic complexity for methods/classes.A method (or "closure field") with a cyclomatic complexity value greater than the maxMethodComplexity property (20) causes a violation. Likewise, a class that has an (average method) cyclomatic complexityvalue greater than the maxClassAverageMethodComplexity property (20) causes a violation.
21 | DeadCode | Dead code appears after a return statement or an exception is thrown. If code appears after one of these statements then it will never be executed and can be safely deleted.
22 | DoubleCheckedLocking | This rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block. Double checked locking does not guarantee correctness and is an anti-pattern.
23 | DoubleNegative | There is no point in using a double negative, it is always positive. For instance !!x can always be simplified to x. And !(!x) can as well.
24 | DuplicateCaseStatement | Check for duplicate case statements in a switch block, such as two equal integers or strings.
25 | DuplicateImport | Duplicate import statements are unnecessary.
26 | DuplicateMapKey | A map literal is created with duplicated key. The map entry will be overwritten.
27 | DuplicateSetValue | A Set literal is created with duplicate constant value. A set cannot contain two elements with the same value.
28 | EmptyCatchBlock | In most cases, exceptions should not be caught and ignored (swallowed).
29 | EmptyElseBlock | Empty else blocks are confusing and serve no purpose.
30 | EmptyFinallyBlock | Empty finally blocks are confusing and serve no purpose.
31 | EmptyForStatement | Empty for statements are confusing and serve no purpose.
32 | EmptyIfStatement | Empty if statements are confusing and serve no purpose.
33 | EmptyInstanceInitializer | An empty class instance initializer was found. It is safe to remove it.
34 | EmptyMethod | A method was found without an implementation. If the method is overriding or implementing a parent method, then mark it with the @Override annotation.
35 | EmptyStaticInitializer | An empty static initializer was found. It is safe to remove it.
36 | EmptySwitchStatement | Empty switch statements are confusing and serve no purpose.
37 | EmptySynchronizedStatement | Empty synchronized statements are confusing and serve no purpose.
38 | EmptyTryBlock | Empty try blocks are confusing and serve no purpose.
39 | EmptyWhileStatement | Empty while statements are confusing and serve no purpose.
40 | EqualsAndHashCode | If either the boolean equals(Object) or the int hashCode() methods are overridden within a class, then both must be overridden.
41 | EqualsOverloaded | The class has an equals method, but the parameter of the method is not of type Object. It is not overriding equals but instead overloading it.
42 | ExplicitGarbageCollection | Calls to System.gc(), Runtime.getRuntime().gc(), and System.runFinalization() are not advised. Code should have the same behavior whether the garbage collection is disabled using the option -Xdisableexplicitgc or not. Moreover, "modern" jvms do a very good job handling garbage collections. If memory usage issues unrelated to memory leaks develop within an application, it should be dealt with JVM options rather than within the code itself.
43 | ForLoopShouldBeWhileLoop | A for loop without an init and update statement can be simplified to a while loop.
44 | HardCodedWindowsFileSeparator | This rule finds usages of a Windows file separator within the constructor call of a File object. It is better to use the Unix file separator or use the File.separator constant.
45 | HardCodedWindowsRootDirectory | This rule find cases where a File object is constructed with a windows-based path. This is not portable, and using the File.listRoots() method is a better alternative.
46 | ImportFromSamePackage | An import of a class that is within the same package is unnecessary.
47 | ImportFromSunPackages | Avoid importing anything from the 'sun.*' packages. These packages are not portable and are likely to change.
48 | InconsistentPropertyLocking | Class contains similarly-named get and set methods where one method of the pair is marked either @WithReadLock or @WithWriteLock and the other is not locked at all.
49 | InconsistentPropertySynchronization | Class contains similarly-named get and set methods where the set method is synchronized and the get method is not, or the get method is synchronized and the set method is not.
50 | IntegerGetInteger | This rule catches usages of java.lang.Integer.getInteger(String, ...) which reads an Integer from the System properties. It is often mistakenly used to attempt to read user input or parse a String into an Integer. It is a poor piece of API to use; replace it with System.properties['prop'].
51 | JUnitAssertAlwaysFails | Checks for JUnit assert() method calls with constant arguments such that the assertion always fails. This includes: assertTrue(false), assertFalse(true) and assertNull(CONSTANT).
52 | JUnitAssertAlwaysSucceeds | Checks for JUnit assert() method calls with constant arguments such that the assertion always succeeds. This includes: assertTrue(true), assertFalse(false) and assertNull(null).
53 | JUnitFailWithoutMessage | This rule detects JUnit calling the fail() method without an argument. For better error reporting you should always provide a message.
54 | JUnitPublicNonTestMethod | Checks if a JUnit test class contains public methods other than standard test methods, JUnit framework methods or methods with JUnit annotations.
55 | JUnitSetUpCallsSuper | Checks that if the JUnit setUp() method is defined, that it includes a call to super.setUp().
56 | JUnitTearDownCallsSuper | Checks that if the JUnit tearDown() method is defined, that it includes a call to super.tearDown().
57 | JUnitTestMethodWithoutAssert | This rule searches for test methods that do not contain assert statements. Either the test method is missing assert statements, which is an error, or the test method contains custom assert statements that do not follow a proper assert naming convention. Test methods are defined as public void methods that begin with the work test or have a @Test annotation. By default this rule applies to the default test class names, but this can be changed using the rule's applyToClassNames property.
58 | JUnitUnnecessarySetUp | Checks for JUnit setUp() methods that contain only a call to super.setUp().
59 | JUnitUnnecessaryTearDown | Checks for JUnit tearDown() methods that contain only a call to super.tearDown().
60 | MisorderedStaticImports | Static imports should never be declared after nonstatic imports.
61 | NestedSynchronization | Nested synchronized statements should be avoided. Nested synchronized statements are either useless (if the lock objects are identical) or prone to deadlock.
62 | RandomDoubleCoercedToZero | The Math.random() method returns a double result greater than or equal to 0.0 and less than 1.0. If you coerce this result into an Integer or int, then it is coerced to zero. Casting the result to int, or assigning it to an int field is probably a bug.
63 | RemoveAllOnSelf | Don't use removeAll to clear a collection. If you want to remove all elements from a collection c, use c.clear, not c.removeAll(c). Calling c.removeAll(c) to clear a collection is less clear, susceptible to errors from typos, less efficient and for some collections, might throw a ConcurrentModificationException.
64 | ReturnFromFinallyBlock | Returning from a finally block is confusing and can hide the original exception.
65 | SpockIgnoreRestUsed | If Spock's @IgnoreRest appears on any method, all non-annotated test methods are not executed. This behaviour is almost always unintended. It's fine to use @IgnoreRest locally during development, but when committing code, it should be removed.
66 | StaticCalendarField | Calendar objects should not be used as static fields. Calendars are inherently unsafe for multihtreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
67 | StaticConnection | Creates violations when a java.sql.Connection object is used as a static field. Database connections stored in static fields will be shared between threads, which is unsafe and can lead to race conditions.
68 | StaticDateFormatField | DateFormat objects should not be used as static fields. DateFormat are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
69 | StaticMatcherField | Matcher objects should not be used as static fields. Matcher instances are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
70 | StaticSimpleDateFormatField | SimpleDateFormat objects should not be used as static fields. SimpleDateFormat are inherently unsafe for multi-threaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
71 | SynchronizedMethod | This rule reports uses of the synchronized keyword on methods. Synchronized methods are the same as synchronizing on 'this', which effectively make your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.
72 | SynchronizedOnBoxedPrimitive | The code synchronizes on a boxed primitive constant, such as an Integer. Since Integer objects can be cached and shared, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness and possible deadlock
73 | SynchronizedOnGetClass | Synchronization on getClass rather than class literal. This instance method synchronizes on this.getClass(). If this class is subclassed, subclasses will synchronize on the class object for the subclass, which isn't likely what was intended.
74 | SynchronizedOnReentrantLock | Synchronizing on a ReentrantLock field is almost never the intended usage. A ReentrantLock should be obtained using the lock() method and released in a finally block using the unlock() method.
75 | SynchronizedOnString | Synchronization on a String field can lead to deadlock because Strings are interned by the JVM and can be shared.
76 | SynchronizedOnThis | This rule reports uses of the synchronized blocks where the synchronization reference is 'this'. Doing this effectively makes your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.
77 | SynchronizedReadObjectMethod | Catches Serializable classes that define a synchronized readObject method. By definition, an object created by deserialization is only reachable by one thread, and thus there is no need for readObject() to be synchronized. If the readObject() method itself is causing the object to become visible to another thread, that is an example of very dubious coding style.
78 | SystemRunFinalizersOnExit | Method calls to System.runFinalizersOnExit() should not be allowed. This method is inherently non-thread-safe, may result in data corruption, deadlock, and may effect parts of the program far removed from it's call point. It is deprecated, and it's use strongly discouraged.
79 | ThreadGroup | Avoid using ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe.
80 | ThreadLocalNotStaticFinal | ThreadLocal fields should be static and final. In the most common case a java.lang.ThreadLocal instance associates state with a thread. A non-static non-final java.lang.ThreadLocal field associates state with an instance-thread combination. This is seldom necessary and often a bug which can cause memory leaks and possibly incorrect behavior.
81 | ThreadYield | Method calls to Thread.yield() should not be allowed. This method has no useful guaranteed semantics, and is often used by inexperienced programmers to mask race conditions.
82 | ThrowExceptionFromFinallyBlock | Throwing an exception from a finally block is confusing and can hide the original exception.
83 | UnnecessaryBigDecimalInstantiation | It is unnecessary to instantiate BigDecimal objects. Instead just use the decimal literal or the 'G' identifier to force the type, such as 123.45 or 123.45G.
84 | UnnecessaryBigIntegerInstantiation | It is unnecessary to instantiate BigInteger objects. Instead just use the literal with the 'G' identifier to force the type, such as 8G or 42G.
85 | UnnecessaryBooleanExpression | Checks for unnecessary boolean expressions, including ANDing (&&) or ORing (||) with true, false, null, or a Map/List/String/Number literal. Also checks for negation (!) of true, false, null, or a Map/List/String/Number literal.
86 | UnnecessaryBooleanInstantiation | Use Boolean.valueOf() for variable values or Boolean.TRUE and Boolean.FALSE for constant values instead of calling the Boolean() constructor directly or calling Boolean.valueOf(true) or Boolean.valueOf(false).
87 | UnnecessaryCallForLastElement | This rule checks for excessively verbose methods of accessing the last element of an array or list. For instance, it is possible to access the last element of an array by performing array[array.length - 1], in Groovy it is simpler to either call array.last() or array[-1]. The same is true for lists. This violation is triggered whenever a get, getAt, or array-style access is used with an object size check.
88 | UnnecessaryCallToSubstring | Calling String.substring(0) always returns the original string. This code is meaningless.
89 | UnnecessaryCatchBlock | Violations are triggered when a catch block does nothing but throw the original exception. In this scenario there is usually no need for a catch block, just let the exception be thrown from the original code. This condition frequently occurs when catching an exception for debugging purposes but then forgetting to take the catch statement out.
90 | UnnecessaryCollectCall | Some method calls to Object.collect(Closure) can be replaced with the spread operator. For instance, list.collect { it.multiply(2) } can be replaced by list*.multiply(2).
91 | UnnecessaryCollectionCall | Useless call to collections. This call doesn't make sense. For any collection c, calling c.containsAll(c) should always be true, and c.retainAll(c) should have no effect.
92 | UnnecessaryConstructor | This rule detects when a constructor is not necessary; i.e., when there's only one constructor, it's public, has an empty body, and takes no arguments.
93 | UnnecessaryDefInFieldDeclaration | If a field has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance, 'static def constraints = {}' is redundant and can be simplified to 'static constraints = {}.
94 | UnnecessaryDefInMethodDeclaration | If a method has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private method() {}' is redundant and can be simplified to 'private method() {}'.
95 | UnnecessaryDefInVariableDeclaration | If a variable has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private n = 2' is redundant and can be simplified to 'private n = 2'.
96 | UnnecessaryDotClass | To make a reference to a class, it is unnecessary to specify the '.class' identifier. For instance String.class can be shortened to String.
97 | UnnecessaryDoubleInstantiation | It is unnecessary to instantiate Double objects. Instead just use the double literal or the 'D' identifier to force the type, such as 123.45d or 0.42d.
98 | UnnecessaryElseStatement | When an if statement block ends with a return statement the else is unnecessary. The logic in the else branch can be run without being in a new scope.
99 | UnnecessaryFail | In a unit test, catching an exception and immediately calling Assert.fail() is pointless and hides the stack trace. It is better to rethrow the exception or not catch the exception at all.
100 | UnnecessaryFinalOnPrivateMethod | A private method is marked final. Private methods cannot be overridden, so marking it final is unnecessary.
101 | UnnecessaryFloatInstantiation | It is unnecessary to instantiate Float objects. Instead just use the float literal with the 'F' identifier to force the type, such as 123.45F or 0.42f.
102 | UnnecessaryGetter | Checks for explicit calls to getter/accessor methods which can, for the most part, be replaced by property access. A getter is defined as a method call that matches get[A-Z] but not getClass() or get[A-Z][A-Z] such as getURL(). Getters do not take method arguments.
103 | UnnecessaryGroovyImport | A Groovy file does not need to include an import for classes from java.lang, java.util, java.io, java.net, groovy.lang and groovy.util, as well as the classes java.math.BigDecimal and java.math.BigInteger.
104 | UnnecessaryIfStatement | Checks for if statements where the if and else blocks are merely returning true and false constants. These cases can be replaced by a simple return statement.
105 | UnnecessaryInstanceOfCheck | This rule finds instanceof checks that cannot possibly evaluate to true. For instance, checking that (!variable instanceof String) will never be true because the result of a not expression is always a boolean.
106 | UnnecessaryInstantiationToGetClass | Avoid instantiating an object just to call getClass() on it; use the .class public member instead.
107 | UnnecessaryIntegerInstantiation | It is unnecessary to instantiate Integer objects. Instead just use the literal with the 'I' identifier to force the type, such as 8I or 42i.
108 | UnnecessaryLongInstantiation | It is unnecessary to instantiate Long objects. Instead just use the literal with the 'L' identifier to force the type, such as 8L or 42L.
109 | UnnecessaryModOne | Any expression mod 1 (exp % 1) is guaranteed to always return zero. This code is probably an error, and should be either (exp & 1) or (exp % 2).
110 | UnnecessaryNullCheck | Groovy contains the safe dereference operator, which can be used in boolean conditional statements to safely replace explicit "x == null" tests.
111 | UnnecessaryNullCheckBeforeInstanceOf | There is no need to check for null before an instanceof; the instanceof keyword returns false when given a null argument.
112 | UnnecessaryObjectReferences | Violations are triggered when an excessive set of consecutive statements all reference the same variable. This can be made more readable by using a with or identity block.
113 | UnnecessaryOverridingMethod | The overriding method merely calls the same method defined in a superclass
114 | UnnecessaryPackageReference | Checks for explicit package reference for classes that Groovy imports by default, such as java.lang.String, java.util.Map and groovy.lang.Closure.
115 | UnnecessaryParenthesesForMethodCallWithClosure | If a method is called and the only parameter to that method is an inline closure then the parentheses of the method call can be omitted.
116 | UnnecessarySelfAssignment | Method contains a pointless self-assignment to a variable or property.
117 | UnnecessaryStringInstantiation | Use a String literal (e.g., "...") instead of calling the corresponding String constructor (new String("..")) directly.
118 | UnnecessarySubstring | This rule finds usages of String.substring(int) and String.substring(int, int) that can be replaced by use of the subscript operator. For instance, var.substring(5) can be replaced with var[5..-1].
119 | UnnecessaryTernaryExpression | Checks for ternary expressions where the conditional expression always evaluates to a boolean and the true and false expressions are merely returning true and false constants. Also checks for ternary expressions where both expressions are the same constant or variable.
120 | UnnecessaryTransientModifier | The field is marked as transient, but the class isn't Serializable, so marking it as transient has no effect.
121 | UnusedArray | Checks for array allocations that are not assigned or used, unless it is the last statement within a block.
122 | UnusedImport | Imports for a class that is never referenced within the source file is unnecessary.
123 | UnusedMethodParameter | This rule finds instances of method parameters not being used. It does not analyze private methods (that is done by the UnusedPrivateMethodParameter rule) or methods marked @Override.
124 | UnusedObject | Checks for object allocations that are not assigned or used, unless it is the last statement within a block
125 | UnusedPrivateField | Checks for private fields that are not referenced within the same class.
126 | UnusedPrivateMethod | Checks for private methods that are not referenced within the same class.
127 | UnusedPrivateMethodParameter | Checks for parameters to private methods that are not referenced within the method body.
128 | UnusedVariable | Checks for variables that are never referenced.
129 | UseAssertEqualsInsteadOfAssertTrue | This rule detects JUnit assertions in object equality. These assertions should be made by more specific methods, like assertEquals.
130 | UseAssertFalseInsteadOfNegation | In unit tests, if a condition is expected to be false then there is no sense using assertTrue with the negation operator. For instance, assertTrue(!condition) can always be simplified to assertFalse(condition)
131 | UseAssertNullInsteadOfAssertEquals | This rule detects JUnit calling assertEquals where the first or second parameter is null. These assertion should be made against the assertNull method instead.
132 | UseAssertSameInsteadOfAssertTrue | This rule detects JUnit calling assertTrue where the first or second parameter is an Object#is() call testing for reference equality. These assertion should be made against the assertSame method instead.
133 | UseAssertTrueInsteadOfAssertEquals | This rule detects JUnit calling assertEquals where the first parameter is a boolean. These assertions should be made by more specific methods, like assertTrue or assertFalse.
134 | UseAssertTrueInsteadOfNegation | In unit tests, if a condition is expected to be true then there is no sense using assertFalse with the negation operator. For instance, assertFalse(!condition) can always be simplified to assertTrue(condition)
135 | UseOfNotifyMethod | This code calls notify() rather than notifyAll(). Java monitors are often used for multiple conditions. Calling notify() only wakes up one thread, meaning that the thread woken up might not be the one waiting for the condition that the caller just satisfied.
136 | VolatileArrayField | Volatile array fields are unsafe because the contents of the array are not treated as volatile. Changing the entire array reference is visible to other threads, but changing an array element is not.
137 | VolatileLongOrDoubleField | Long or double fields should not be declared as volatile. Java specifies that reads and writes from such fields are atomic, but many JVM's have violated this specification. Unless you are certain of your JVM, it is better to synchronize access to such fields rather than declare them volatile. This rule flags fields marked volatile when their type is double or long or the name of their type is "Double" or "Long".
138 | WaitOutsideOfWhileLoop | Calls to Object.wait() must be within a while loop. Consider using the Java concurrency utilities instead of wait() and notify().