Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
SimpleDateFormatMissingLocale | 2 | 43 | [SRC]def date = new java.text.SimpleDateFormat("ddMMyyyy").fo..(new Date()) [MSG]Created an instance of SimpleDateFormat without specifying a Locale |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 97 | [SRC]void focusLost(java.awt.event.FocusEvent e){} [MSG]The method focusLost is both empty and not marked with @Override |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
NestedBlockDepth | 2 | 116 | [SRC]if (!helpFile.exists()) { [MSG]The nested block depth is 6 |
UnusedVariable | 2 | 70 | [SRC]def helpText = "" [MSG]The variable [helpText] is not used |
UnnecessaryCollectCall | 2 | 68 | [SRC]def scripts = pluginSettings.availableScripts.collect { it.file } [MSG]The call to collect could probably be rewritten as a spread expression: pluginSettings.availableScripts*.file |
UnnecessaryGetter | 2 | 112 | [SRC]grails ${scriptName} -- ${getDefaultDescription()} [MSG]getDefaultDescription() can probably be rewritten as defaultDescription |
UnnecessaryGetter | 2 | 55 | [SRC]String scriptname = script.getName() [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [69.2] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [72.8] | |
UnnecessaryObjectReferences | 2 | 88 | [SRC]ant.copy(todir:basedir) { [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 91 | [SRC]ant.move(file: "${basedir}/ideaGrailsProject.iml", tofil..write: true) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 92 | [SRC]ant.move(file: "${basedir}/ideaGrailsProject.ipr", tofil..write: true) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 93 | [SRC]ant.move(file: "${basedir}/ideaGrailsProject.iws", tofil..write: true) [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
NestedBlockDepth | 2 | 34 | [SRC]plugin.'release'.each { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 35 | [SRC]if (!"${it.'@version'}".endsWith("SNAPSHOT") && "${it.'@..> version) { [MSG]The nested block depth is 7 |
UnnecessaryGetter | 2 | 61 | [SRC]def availablePluginVersions = getAvailablePluginVersions() [MSG]getAvailablePluginVersions() can probably be rewritten as availablePluginVersions |
UnnecessaryGetter | 2 | 62 | [SRC]def installedPluginVersions = getInstalledPluginVersions() [MSG]getInstalledPluginVersions() can probably be rewritten as installedPluginVersions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 705 | [SRC]catch (SVNException e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 710 | [SRC]catch (SVNException e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 715 | [SRC]catch (SVNException e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 419 | [SRC]catch (SVNException e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 445 | [SRC]catch (e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 530 | [SRC]catch (e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 918 | [SRC]catch(e) { [MSG]The catch block is empty |
InvertedIfElse | 2 | 753 | [SRC]if (!pluginsListFile.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 506 | [SRC]if (!pluginMetaDir.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
AddEmptyString | 2 | 180 | [SRC]ant.antProject.setNewProperty usr, ""+tokenizeUrl[KEY_USER_NAME] [MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object) |
AssignmentInConditional | 2 | 809 | [SRC]while (line = reader.readLine()) { [MSG]Assignment used as conditional value, which always results in true. Use the == operator instead |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [333.6] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [80] | |
NestedBlockDepth | 2 | 362 | [SRC]if (notInRepository) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 365 | [SRC]else { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 784 | [SRC]if (remoteRevision > localRevision) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 788 | [SRC]repo.getDir('', -1,null,(Collection)null).each() { entry -> [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 790 | [SRC]if (entry.name.startsWith(PREFIX)) { [MSG]The nested block depth is 8 |
NestedBlockDepth | 2 | 801 | [SRC]line.eachMatch(/Revision (.*):/) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 804 | [SRC]if (remoteRevision > localRevision) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 809 | [SRC]while (line = reader.readLine()) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 810 | [SRC]line.eachMatch(/<li><a href="grails-(.+?)">/) { [MSG]The nested block depth is 8 |
UnusedVariable | 2 | 720 | [SRC]def wcClient = new SVNWCClient((ISVNAuthenticationManage..nager, null) [MSG]The variable [wcClient] is not used |
UnusedVariable | 2 | 1001 | [SRC]def ver = repo.getFile(file , (long)-1L, props , baos) [MSG]The variable [ver] is not used |
UnusedVariable | 2 | 176 | [SRC]ISVNAuthenticationManager aAuthManager [MSG]The variable [aAuthManager] is not used |
UnusedVariable | 2 | 503 | [SRC]def addClient = new SVNWCClient((ISVNAuthenticationManag..nager, null) [MSG]The variable [addClient] is not used |
UnnecessaryGetter | 2 | 466 | [SRC]remoteRevision = repo.getLatestRevision().toString() [MSG]getLatestRevision() can probably be rewritten as latestRevision |
UnnecessaryGetter | 2 | 783 | [SRC]remoteRevision = repo.getLatestRevision() [MSG]getLatestRevision() can probably be rewritten as latestRevision |
UnnecessaryGetter | 2 | 1047 | [SRC]repo.getLatestRevision() [MSG]getLatestRevision() can probably be rewritten as latestRevision |
UnnecessaryGetter | 2 | 1059 | [SRC]repo.getLatestRevision() [MSG]getLatestRevision() can probably be rewritten as latestRevision |
UnusedImport | 3 | 35 | [SRC]import org.codehaus.groovy.grails.plugins.PluginManagerHolder |
UnnecessaryDefInMethodDeclaration | 3 | 548 | [SRC]private def commitNewestPluginList(File pluginMetaDir, S..ortClient) { [MSG]The def keyword is unneeded when a method is marked private |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [110.9] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [43] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 49 | [SRC]if (!args) { [MSG]Testing the negative condition first can make an if statement confusing |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 115 | [SRC]if (!new File(baseFile, '/grails-app/conf').listFiles()...mplate) }) { [MSG]Explicit call to it.name.equals(template) method can be rewritten as it.name == (template) |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [111.8] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [28] | |
NestedBlockDepth | 2 | 116 | [SRC]copy(tofile: "${basedir}/grails-app/conf/${template}") { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 117 | [SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 127 | [SRC]copy(tofile: "${basedir}/grails-app/conf/${template}") { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 128 | [SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 140 | [SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") { [MSG]The nested block depth is 6 |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 26 | [SRC]if (getBinding().variables.containsKey("_grails_arg_pars..ed")) return [MSG]getBinding() can probably be rewritten as binding |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [81.3] | |
UnnecessaryGetter | 2 | 130 | [SRC]ClassLoader contextLoader = Thread.currentThread().getCo..lassLoader() [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [85.2] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [23] | |
UnnecessaryGetter | 2 | 30 | [SRC]if (getBinding().variables.containsKey("_grails_classpat..ed")) return [MSG]getBinding() can probably be rewritten as binding |
UnnecessaryGetter | 2 | 75 | [SRC]jarFiles.addAll(getExtraDependencies()) [MSG]getExtraDependencies() can probably be rewritten as extraDependencies |
UnnecessaryGetter | 2 | 92 | [SRC]for (jar in getExtraDependencies()) { [MSG]getExtraDependencies() can probably be rewritten as extraDependencies |
UnnecessaryGetter | 2 | 197 | [SRC]def jarFiles = getJarFiles() [MSG]getJarFiles() can probably be rewritten as jarFiles |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 47 | [SRC]ant.delete(dir:classesDirPath) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 48 | [SRC]ant.delete(dir:pluginClassesDirPath, failonerror:false) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 49 | [SRC]ant.delete(dir:resourcesDirPath) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 50 | [SRC]ant.delete(dir:testDirPath) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 56 | [SRC]ant.delete(failonerror:false, includeemptydirs: true) { [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 26 | [SRC]if (getBinding().variables.containsKey("_grails_clean_called")) return [MSG]getBinding() can probably be rewritten as binding |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [115.0] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 116 | [SRC]if (!argsMap["params"]) { [MSG]Testing the negative condition first can make an if statement confusing |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [130.1] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [25] | |
NestedBlockDepth | 2 | 192 | [SRC]foo.${m.name}(${m.arguments?.collect {GrailsNameUtils.ge...join(',')}) [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 201 | [SRC]${m.arguments?.collect { '* @'+GrailsNameUtils.getProper..it)+'@\n' }} [MSG]The nested block depth is 6 |
UnnecessaryObjectReferences | 2 | 216 | [SRC]publisher.license = "" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 217 | [SRC]publisher.copyright = "" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 218 | [SRC]publisher.footer = "" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 219 | [SRC]publisher.engineProperties = config?.grails?.doc [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 225 | [SRC]publisher.publish() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 173 | [SRC]def context = DocumentationContext.getInstance() [MSG]getInstance() can probably be rewritten as instance |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 28 | [SRC]if (getBinding().variables.containsKey("_grails_events_c..ed")) return [MSG]getBinding() can probably be rewritten as binding |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 31 | [SRC]if (getBinding().variables.containsKey("_init_called")) return [MSG]getBinding() can probably be rewritten as binding |
UnusedImport | 3 | 26 | [SRC]import grails.util.GrailsNameUtils |
UnusedImport | 3 | 25 | [SRC]import org.springframework.core.io.FileSystemResource |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 218 | [SRC]if (!webXml.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [167.6] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [30] | |
NestedBlockDepth | 2 | 125 | [SRC]i18nPluginDirs.eachParallel { Resource srcDir -> [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 126 | [SRC]if (srcDir.exists()) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 131 | [SRC]if (info) { [MSG]The nested block depth is 8 |
NestedBlockDepth | 2 | 134 | [SRC]try { [MSG]The nested block depth is 9 |
NestedBlockDepth | 2 | 143 | [SRC]catch (e) { [MSG]The nested block depth is 9 |
UnnecessaryGetter | 2 | 35 | [SRC]if (getBinding().variables.containsKey("_grails_package_..ed")) return [MSG]getBinding() can probably be rewritten as binding |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 21 | [SRC]import org.apache.commons.io.FilenameUtils |
UnusedImport | 3 | 18 | [SRC]import grails.util.GrailsNameUtils |
UnusedImport | 3 | 24 | [SRC]import org.codehaus.groovy.grails.compiler.support.Grail..LoaderHolder |
UnusedImport | 3 | 17 | [SRC]import groovy.xml.MarkupBuilder |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [118.7] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [26] | |
UnnecessaryGetter | 2 | 167 | [SRC]def pluginInfos = pluginSettings.getPluginInfos() [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [125.2] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [29] | |
NestedBlockDepth | 2 | 210 | [SRC]if (scriptName) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 251 | [SRC]pluginClassesDir].collect { it.toURI().toURL() } [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 259 | [SRC]if (usingSecureServer) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 262 | [SRC]else { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 124 | [SRC]grails.util.Metadata.getCurrent().put(grails.util.Metada..YED, "true") [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ReturnsNullInsteadOfEmptyArray | 2 | 40 | [SRC]if (getBinding().variables.containsKey("_settings_called")) return [MSG]Returning null from a method that might return an Array |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [146.0] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [26] | |
UnnecessaryGetter | 2 | 40 | [SRC]if (getBinding().variables.containsKey("_settings_called")) return [MSG]getBinding() can probably be rewritten as binding |
UnnecessaryGetter | 2 | 104 | [SRC]grailsAppName = metadata.getApplicationName() [MSG]getApplicationName() can probably be rewritten as applicationName |
UnnecessaryGetter | 2 | 105 | [SRC]grailsAppVersion = metadata.getApplicationVersion() [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 106 | [SRC]appGrailsVersion = metadata.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 107 | [SRC]servletVersion = metadata.getServletVersion() ?: servletVersion [MSG]getServletVersion() can probably be rewritten as servletVersion |
UnnecessaryGetter | 2 | 107 | [SRC]servletVersion = metadata.getServletVersion() ?: servletVersion [MSG]getServletVersion() can probably be rewritten as servletVersion |
UnnecessaryGetter | 2 | 138 | [SRC]if (grailsSettings.defaultEnv && getBinding().variables...riptEnv")) { [MSG]getBinding() can probably be rewritten as binding |
UnnecessaryGetter | 2 | 148 | [SRC]if (getBinding().variables.containsKey("scriptScope")) { [MSG]getBinding() can probably be rewritten as binding |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [195.8] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [41] | |
NestedBlockDepth | 2 | 137 | [SRC]if (phaseName == 'integration') { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 141 | [SRC]else { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 163 | [SRC]if (type.name in targetTypesForPhase || TEST_TYPE_WILDCA..sForPhase) { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 123 | [SRC]if (reRunTests) testNames = getFailedTests() [MSG]getFailedTests() can probably be rewritten as failedTests |
UnusedImport | 3 | 26 | [SRC]import org.codehaus.groovy.grails.test.report.junit.JUni..portsFactory |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashSetInstantiation | 2 | 364 | [SRC]def addedResources = new HashSet() [MSG]HashSet objects are better instantiated using the form "[] as HashSet" |
ExplicitHashSetInstantiation | 2 | 395 | [SRC]def addedPlugins = new HashSet() [MSG]HashSet objects are better instantiated using the form "[] as HashSet" |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [220.8] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [37] | |
NestedBlockDepth | 2 | 213 | [SRC]for (GrailsPluginInfo info in pluginInfos) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 214 | [SRC]fileset(dir: info.pluginDir.file.path) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 222 | [SRC]freshManager.parseDependencies {} [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 225 | [SRC]for(File file in freshManager.resolveDependencies("runti..localFile) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 226 | [SRC]if(file) { [MSG]The nested block depth is 7 |
UnnecessaryGetter | 2 | 247 | [SRC]attribute(name:"Bundle-Version",value:"${metadata.getApp..Version()}") [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 253 | [SRC]switch (metadata.getServletVersion()) { [MSG]getServletVersion() can probably be rewritten as servletVersion |
UnnecessaryGetter | 2 | 286 | [SRC]attribute(name:"Implementation-Version",value:"${metadat..Version()}") [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 287 | [SRC]attribute(name:"Grails-Version",value:"${metadata.getGra..Version()}") [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 313 | [SRC]def resourceList = pluginSettings.getArtefactResources() [MSG]getArtefactResources() can probably be rewritten as artefactResources |
UnnecessaryGetter | 2 | 353 | [SRC]def resourceList = ps.getArtefactResources() [MSG]getArtefactResources() can probably be rewritten as artefactResources |
UnnecessaryGetter | 2 | 520 | [SRC]def version = metadata.getApplicationVersion() [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryDefInMethodDeclaration | 3 | 358 | [SRC]protected def createDescriptorInternal(pluginInfos, resourceList) { [MSG]The def keyword is unneeded when a method is marked protected |
UnnecessaryDefInMethodDeclaration | 3 | 418 | [SRC]private def warPluginsInternal(pluginInfos) { [MSG]The def keyword is unneeded when a method is marked private |
UnnecessaryDefInMethodDeclaration | 3 | 428 | [SRC]private def warPluginForPluginInfo(GrailsPluginInfo info) { [MSG]The def keyword is unneeded when a method is marked private |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 71 | [SRC]def pluginInfos = pluginSettings.getSupportedPluginInfos() [MSG]getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos |
UnnecessaryGetter | 2 | 88 | [SRC]def pluginInfos = pluginSettings.getSupportedPluginInfos() [MSG]getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 450 | [SRC]catch (e) { [MSG]The catch block is empty |
ExplicitCallToCompareToMethod | 2 | 163 | [SRC]def rcComparator = [ compare: {a, b -> a.URI.compareTo(b..s Comparator [MSG]Explicit call to a.URI.compareTo(b.URI) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
InvertedIfElse | 2 | 229 | [SRC]if (!PluginManagerHolder.pluginManager) { // plugin mana..eady loaded? [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | [SRC]true [MSG]The ABC score for method [run] is [240.9] | |
CyclomaticComplexity | 2 | [SRC]true [MSG]The cyclomatic complexity for method [run] is [52] | |
NestedBlockDepth | 2 | 98 | [SRC]for (File dir in pluginResources.file) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 99 | [SRC]if (dir.exists() && dir.isDirectory()) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 186 | [SRC]for (d in pluginProps.dependsOn) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 195 | [SRC]for (DocumentedMethod m in docContext.methods) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 196 | [SRC]method(name:m.name, artefact:m.artefact, type:m.type?.name) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 198 | [SRC]if (m.arguments) { [MSG]The nested block depth is 8 |
NestedBlockDepth | 2 | 199 | [SRC]for (arg in m.arguments) { [MSG]The nested block depth is 9 |
NestedBlockDepth | 2 | 205 | [SRC]for (DocumentedMethod m in docContext.staticMethods) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 206 | [SRC]'static-method'(name:m.name, artefact:m.artefact, type:m.type?.name) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 208 | [SRC]if (m.arguments) { [MSG]The nested block depth is 8 |
NestedBlockDepth | 2 | 209 | [SRC]for (arg in m.arguments) { [MSG]The nested block depth is 9 |
NestedBlockDepth | 2 | 215 | [SRC]for (DocumentedProperty p in docContext.properties) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 216 | [SRC]property(name:p.name, type:p?.type?.name, artefact:p.artefact) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 258 | [SRC]if (grailsApp == null) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 275 | [SRC]if (plugin) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 281 | [SRC]for (p in pluginManager.failedLoadPlugins) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 284 | [SRC]for(depName in p.dependencyNames) { [MSG]The nested block depth is 7 |
UnusedVariable | 2 | 249 | [SRC]def application [MSG]The variable [application] is not used |
UnnecessaryObjectReferences | 2 | 456 | [SRC]pluginInstallEngine.pluginDirVariableStore = binding [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 457 | [SRC]pluginInstallEngine.pluginScriptRunner = runPluginScript [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 49 | [SRC]if (getBinding().variables.containsKey("_plugin_dependen..ed")) return [MSG]getBinding() can probably be rewritten as binding |
UnusedImport | 3 | 20 | [SRC]import grails.util.PluginBuildSettings |
UnusedImport | 3 | 17 | [SRC]import grails.util.BuildSettings |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 128 | [SRC]catch (e) { [MSG]The catch block is empty |
UnnecessaryGetter | 2 | 137 | [SRC]def props = DocEngine.getDefaultProps() [MSG]getDefaultProps() can probably be rewritten as defaultProps |
UnnecessaryGetter | 2 | 178 | [SRC]def repository = filter.getMacroRepository() [MSG]getMacroRepository() can probably be rewritten as macroRepository |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToCompareToMethod | 2 | 154 | [SRC]result = nums1[i].compareTo(nums2[i]) [MSG]Explicit call to nums1[i].compareTo(nums2[i]) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
AbcComplexity | 2 | 88 | [SRC]void publish() { [MSG]The ABC score for method [publish] is [204.5] |
CyclomaticComplexity | 2 | 88 | [SRC]void publish() { [MSG]The cyclomatic complexity for method [publish] is [26] |
UnnecessaryGetter | 2 | 81 | [SRC]def props = DocEngine.getDefaultProps() [MSG]getDefaultProps() can probably be rewritten as defaultProps |
UnnecessaryGetter | 2 | 353 | [SRC]URL url = getClass().getClassLoader().getResource(src) [MSG]getClassLoader() can probably be rewritten as classLoader |
MethodSize | 3 | 88 | [MSG]Method "publish" is 227 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedPrivateField | 2 | 25 | [SRC]private static final String LIVE_DOC_SITE = 'http://grails.org' [MSG]The field LIVE_DOC_SITE is not used within PdfBuilder.groovy |
UnnecessaryGetter | 2 | 79 | [SRC]Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes())) [MSG]getBytes() can probably be rewritten as bytes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 70 | [SRC]publisher.images = imagesDir [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 77 | [SRC]publisher.workDir = workDir [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 17 | [SRC]import org.radeox.filter.regex.RegexFilter |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 54 | [SRC]Writer writer = new StringBufferWriter(buffer) [MSG]The variable [writer] is not used |
UnnecessaryGetter | 2 | 48 | [SRC]def engine = context.getRenderContext().getRenderEngine() [MSG]getRenderEngine() can probably be rewritten as renderEngine |
UnnecessaryGetter | 2 | 48 | [SRC]def engine = context.getRenderContext().getRenderEngine() [MSG]getRenderContext() can probably be rewritten as renderContext |
UnnecessaryGetter | 2 | 106 | [SRC]context.getRenderContext().setCacheable(false) [MSG]getRenderContext() can probably be rewritten as renderContext |
UnusedImport | 3 | 22 | [SRC]import org.radeox.filter.interwiki.InterWiki |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 86 | [SRC]if (name.equals("doCall")) { [MSG]Explicit call to name.equals(doCall) method can be rewritten as name == (doCall) |
EmptyMethod | 2 | 75 | [SRC]protected void afterInvocation() { [MSG]The method afterInvocation is both empty and not marked with @Override |
UnnecessaryGetter | 2 | 53 | [SRC]EntityResolver entityResolver = new DelegatingEntityReso..assLoader()) [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 53 | [SRC]EntityResolver entityResolver = new DelegatingEntityReso..assLoader()) [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 121 | [SRC]Element element = documentLoader.loadDocument(is, entity..entElement() [MSG]getDocumentElement() can probably be rewritten as documentElement |
UnnecessaryGetter | 2 | 126 | [SRC]BeanDefinitionHolder holder = new BeanDefinitionHolder(b..n.getName()) [MSG]getBeanDefinition() can probably be rewritten as beanDefinition |
UnnecessaryGetter | 2 | 126 | [SRC]BeanDefinitionHolder holder = new BeanDefinitionHolder(b..n.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 128 | [SRC]beanConfiguration.setBeanDefinition(holder.getBeanDefinition()) [MSG]getBeanDefinition() can probably be rewritten as beanDefinition |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 127 | [SRC]catch (InterruptedException ex) { [MSG]The catch block is empty |
JUnitPublicNonTestMethod | 2 | 79 | [SRC]String getOutput() { [MSG]The method getOutput is public but not a test method |
JUnitPublicNonTestMethod | 2 | 83 | [SRC]void setOutput(String output) { [MSG]The method setOutput is public but not a test method |
JUnitPublicNonTestMethod | 2 | 91 | [SRC]File getWorkDir() { [MSG]The method getWorkDir is public but not a test method |
JUnitPublicNonTestMethod | 2 | 95 | [SRC]void setWorkDir(File dir) { [MSG]The method setWorkDir is public but not a test method |
JUnitPublicNonTestMethod | 2 | 105 | [SRC]void enterInput(String input) { [MSG]The method enterInput is public but not a test method |
JUnitPublicNonTestMethod | 2 | 115 | [SRC]int waitForProcess() { [MSG]The method waitForProcess is public but not a test method |
UnusedPrivateField | 2 | 20 | [SRC]private final Condition waiting = lock.newCondition() [MSG]The field waiting is not used within AbstractCliTestCase.groovy |
UnusedVariable | 2 | 117 | [SRC]final monitor = "monitor" [MSG]The variable [monitor] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 58 | [SRC]Class getControllerClass() { [MSG]The method getControllerClass is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryDefInMethodDeclaration | 3 | 170 | [SRC]def invokeMethod(String methodName, Object args) { [MSG]The def keyword is unneeded when a method returns the Object type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 55 | [SRC]def createMappingsHolder() { [MSG]The method createMappingsHolder is public but not a test method |
JUnitPublicNonTestMethod | 2 | 63 | [SRC]def createControllerMap() { [MSG]The method createControllerMap is public but not a test method |
JUnitPublicNonTestMethod | 2 | 71 | [SRC]def getUrlMappingEvaluatees() { [MSG]The method getUrlMappingEvaluatees is public but not a test method |
JUnitPublicNonTestMethod | 2 | 95 | [SRC]def getActions(controller) { [MSG]The method getActions is public but not a test method |
JUnitPublicNonTestMethod | 2 | 104 | [SRC]def getDefaultAction(controllerName) { [MSG]The method getDefaultAction is public but not a test method |
JUnitPublicNonTestMethod | 2 | 109 | [SRC]def assertController(controller, url) { [MSG]The method assertController is public but not a test method |
JUnitPublicNonTestMethod | 2 | 115 | [SRC]def assertAction(controller, action, url) { [MSG]The method assertAction is public but not a test method |
JUnitPublicNonTestMethod | 2 | 121 | [SRC]def assertView(controller, view, url) { [MSG]The method assertView is public but not a test method |
JUnitPublicNonTestMethod | 2 | 130 | [SRC]void assertUrlMapping(assertions, url) { [MSG]The method assertUrlMapping is public but not a test method |
JUnitPublicNonTestMethod | 2 | 134 | [SRC]void assertUrlMapping(assertions, url, paramAssertions) { [MSG]The method assertUrlMapping is public but not a test method |
JUnitPublicNonTestMethod | 2 | 141 | [SRC]void assertForwardUrlMapping(assertions, url) { [MSG]The method assertForwardUrlMapping is public but not a test method |
JUnitPublicNonTestMethod | 2 | 145 | [SRC]void assertForwardUrlMapping(assertions, url, paramAssertions) { [MSG]The method assertForwardUrlMapping is public but not a test method |
JUnitPublicNonTestMethod | 2 | 199 | [SRC]void assertReverseUrlMapping(assertions, url) { [MSG]The method assertReverseUrlMapping is public but not a test method |
JUnitPublicNonTestMethod | 2 | 203 | [SRC]void assertReverseUrlMapping(assertions, url, paramAssertions) { [MSG]The method assertReverseUrlMapping is public but not a test method |
JUnitSetUpCallsSuper | 2 | 84 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 91 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
DuplicateImport | 3 | 36 | [SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils |
UnusedImport | 3 | 23 | [SRC]import org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin |
UnusedImport | 3 | 21 | [SRC]import org.codehaus.groovy.grails.commons.GrailsApplication |
UnusedImport | 3 | 20 | [SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsApplication |
UnusedImport | 3 | 32 | [SRC]import org.springframework.web.servlet.DispatcherServlet |
UnusedImport | 3 | 34 | [SRC]import org.springframework.web.context.ServletContextAware |
UnusedImport | 3 | 18 | [SRC]import grails.util.GrailsWebUtil |
UnusedImport | 3 | 30 | [SRC]import org.springframework.web.context.WebApplicationContext |
UnusedImport | 3 | 28 | [SRC]import org.codehaus.groovy.grails.web.multipart.ContentL..partResolver |
UnusedImport | 3 | 24 | [SRC]import org.codehaus.groovy.grails.plugins.web.mapping.Ur..GrailsPlugin |
UnusedImport | 3 | 35 | [SRC]import javax.servlet.ServletContext |
UnusedImport | 3 | 25 | [SRC]import org.codehaus.groovy.grails.support.MockApplicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 37 | [SRC]void setControllerName(String name) { [MSG]The method setControllerName is public but not a test method |
JUnitPublicNonTestMethod | 2 | 49 | [SRC]void assertOutputEquals(expected, template, params = [:]..tring() }) { [MSG]The method assertOutputEquals is public but not a test method |
JUnitPublicNonTestMethod | 2 | 61 | [SRC]String applyTemplate(template, params = [:]) { [MSG]The method applyTemplate is public but not a test method |
JUnitPublicNonTestMethod | 2 | 67 | [SRC]void applyTemplate(StringWriter sw, template, params = [:]) { [MSG]The method applyTemplate is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ReturnsNullInsteadOfEmptyCollection | 2 | 628 | [SRC]return result ? result[0] : null [MSG]Returning null from a method that might return a Collection or Map |
ExplicitCallToEqualsMethod | 2 | 1278 | [SRC]if (value instanceof Number && Long.class.equals(targetType)) { [MSG]Explicit call to Long.class.equals(targetType) method can be rewritten as Long.class == (targetType) |
ExplicitLinkedListInstantiation | 2 | 916 | [SRC]LinkedList classChain = new LinkedList() [MSG]LinkedList objects are better instantiated using the form "[] as LinkedList" |
InvertedIfElse | 2 | 153 | [SRC]if (!delegate.request.invalidToken) { [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | 101 | [SRC]static void mockController(Class clazz) { [MSG]The ABC score for method [mockController] is [94.2] |
AbcComplexity | 2 | 736 | [SRC]private static void addDynamicInstanceMethods(Class claz..Instances) { [MSG]The ABC score for method [addDynamicInstanceMethods] is [79.3] |
AbcComplexity | 2 | 897 | [SRC]private static void addValidateMethod( [MSG]The ABC score for method [addValidateMethod] is [87.5] |
CyclomaticComplexity | 2 | 736 | [SRC]private static void addDynamicInstanceMethods(Class claz..Instances) { [MSG]The cyclomatic complexity for method [addDynamicInstanceMethods] is [23] |
CyclomaticComplexity | 2 | 897 | [SRC]private static void addValidateMethod( [MSG]The cyclomatic complexity for method [addValidateMethod] is [24] |
CyclomaticComplexity | 2 | 1053 | [SRC]private static processInstances(instances, property, com..tor, args) { [MSG]The cyclomatic complexity for method [processInstances] is [26] |
MethodCount | 2 | 55 | [SRC]class MockUtils { [MSG]Class grails.test.MockUtils has 35 methods |
NestedBlockDepth | 2 | 837 | [SRC]if (clazz.isAssignableFrom(otherCollectionType) && clazz..ctionType) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 838 | [SRC]if (arg."$otherCollectionName" == null) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 848 | [SRC]if (clazz.isAssignableFrom(pd.propertyType)) { [MSG]The nested block depth is 6 |
UnusedPrivateMethodParameter | 2 | 563 | [SRC]private static void addDynamicFinders(Class clazz, List ..Instances) { [MSG]Method parameter [testInstances] is never referenced |
UnusedPrivateMethodParameter | 2 | 651 | [SRC]private static void addCountMethods(Class clazz, GrailsD..Instances) { [MSG]Method parameter [dc] is never referenced |
UnusedPrivateMethodParameter | 2 | 716 | [SRC]private static void addOtherStaticMethods(Class clazz, L..Instances) { [MSG]Method parameter [testInstances] is never referenced |
UnnecessaryGetter | 2 | 311 | [SRC]clazz.metaClass.getSession = {-> mockRequest.getSession() } [MSG]getSession() can probably be rewritten as session |
UnnecessaryGetter | 2 | 919 | [SRC]clazz = clazz.getSuperclass() [MSG]getSuperclass() can probably be rewritten as superclass |
UnusedImport | 3 | 43 | [SRC]import org.springframework.validation.ObjectError |
ClassSize | 3 | 55 | [MSG]Class "MockUtils" is 1230 lines |
MethodSize | 3 | 101 | [MSG]Method "mockController" is 138 lines |
MethodSize | 3 | 736 | [MSG]Method "addDynamicInstanceMethods" is 132 lines |
MethodSize | 3 | 897 | [MSG]Method "addValidateMethod" is 151 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 82 | [SRC]Class getTestClass() { [MSG]The method getTestClass is public but not a test method |
UnusedImport | 3 | 17 | [SRC]import grails.util.GrailsNameUtils |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 63 | [SRC]Class getTagLibClass() { [MSG]The method getTagLibClass is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 59 | [SRC]abstract getFlow() [MSG]The method getFlow is public but not a test method |
JUnitPublicNonTestMethod | 2 | 64 | [SRC]String getFlowId() { "test" } [MSG]The method getFlowId is public but not a test method |
JUnitPublicNonTestMethod | 2 | 101 | [SRC]FlowDefinition registerFlow(String flowId, Closure flowClosure) { [MSG]The method registerFlow is public but not a test method |
JUnitPublicNonTestMethod | 2 | 110 | [SRC]FlowDefinition getFlowDefinition() { [MSG]The method getFlowDefinition is public but not a test method |
UnnecessaryGetter | 2 | 68 | [SRC]GrailsWebRequest webRequest = RequestContextHolder.getRe..Attributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 72 | [SRC]mockServletContext = webRequest.getServletContext() [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 73 | [SRC]applicationContext = WebApplicationContextUtils.getWebAp..etContext()) [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 91 | [SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser() [MSG]getExpressionParser() can probably be rewritten as expressionParser |
UnnecessaryGetter | 2 | 105 | [SRC]FlowAssembler assembler = new FlowAssembler(builder, bui..erContext()) [MSG]getFlowBuilderContext() can probably be rewritten as flowBuilderContext |
UnnecessaryGetter | 2 | 111 | [SRC]return registerFlow(getFlowId(), getFlow()) [MSG]getFlowId() can probably be rewritten as flowId |
UnnecessaryGetter | 2 | 111 | [SRC]return registerFlow(getFlowId(), getFlow()) [MSG]getFlow() can probably be rewritten as flow |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 753 | [SRC]if (!dependenciesExternallyConfigured) { [MSG]Testing the negative condition first can make an if statement confusing |
CyclomaticComplexity | 2 | 855 | [SRC]private void establishProjectStructure() { [MSG]The cyclomatic complexity for method [establishProjectStructure] is [21] |
MethodCount | 2 | 43 | [SRC]class BuildSettings extends AbstractBuildSettings { [MSG]Class grails.util.BuildSettings has 56 methods |
NestedBlockDepth | 2 | 707 | [SRC]proxySettings[current]?.each { key, value -> [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 727 | [SRC]gcl = rootLoader != null ? new GroovyClassLoader(rootLoa..assLoader()) [MSG]getSystemClassLoader() can probably be rewritten as systemClassLoader |
UnnecessaryGetter | 2 | 736 | [SRC]def appName = metadata.getApplicationName() ?: "grails" [MSG]getApplicationName() can probably be rewritten as applicationName |
UnnecessaryGetter | 2 | 736 | [SRC]def appName = metadata.getApplicationName() ?: "grails" [MSG]getApplicationName() can probably be rewritten as applicationName |
UnnecessaryGetter | 2 | 737 | [SRC]def appVersion = metadata.getApplicationVersion() ?: grailsVersion [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 737 | [SRC]def appVersion = metadata.getApplicationVersion() ?: grailsVersion [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 783 | [SRC]def pluginDirs = getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 850 | [SRC]appName:Metadata.current.getApplicationName(), [MSG]getApplicationName() can probably be rewritten as applicationName |
UnnecessaryGetter | 2 | 851 | [SRC]appVersion:Metadata.current.getApplicationVersion()) [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 875 | [SRC]def version = metadata.getApplicationVersion() [MSG]getApplicationVersion() can probably be rewritten as applicationVersion |
UnnecessaryGetter | 2 | 876 | [SRC]def appName = metadata.getApplicationName() ?: baseDir.name [MSG]getApplicationName() can probably be rewritten as applicationName |
UnnecessaryGetter | 2 | 876 | [SRC]def appName = metadata.getApplicationName() ?: baseDir.name [MSG]getApplicationName() can probably be rewritten as applicationName |
ImportFromSamePackage | 3 | 18 | [SRC]import grails.util.Metadata |
UnusedImport | 3 | 30 | [SRC]import java.util.concurrent.ConcurrentHashMap |
UnnecessaryDefInMethodDeclaration | 3 | 475 | [SRC]private def loadBuildPropertiesFromClasspath(Properties buildProps) { [MSG]The def keyword is unneeded when a method is marked private |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 24 | [SRC]props.load(getClass().getClassLoader().getResourceAsStre..roperties")) [MSG]getClassLoader() can probably be rewritten as classLoader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 130 | [SRC]catch (e) { [MSG]The catch block is empty |
MethodCount | 2 | 42 | [SRC]class PluginBuildSettings { [MSG]Class grails.util.PluginBuildSettings has 35 methods |
UnnecessaryGetter | 2 | 119 | [SRC]Resource[] pluginDescriptors = getPluginDescriptors() [MSG]getPluginDescriptors() can probably be rewritten as pluginDescriptors |
UnnecessaryGetter | 2 | 142 | [SRC]buildSettings?.isInlinePluginLocation(pluginLocation?.getFile()) [MSG]getFile() can probably be rewritten as file |
UnnecessaryGetter | 2 | 152 | [SRC]locations = buildSettings.getInlinePluginDirectories().c..source(it) } [MSG]getInlinePluginDirectories() can probably be rewritten as inlinePluginDirectories |
UnnecessaryGetter | 2 | 167 | [SRC]if (!pluginInfosMap) getPluginInfos() // initialize the infos [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 180 | [SRC]if (!pluginInfosMap) getPluginInfos() // initialize the infos [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 192 | [SRC]def pluginDirs = getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 311 | [SRC]getPluginSourceFiles() // initialize cache [MSG]getPluginSourceFiles() can probably be rewritten as pluginSourceFiles |
UnnecessaryGetter | 2 | 344 | [SRC]pluginDirectoryResources = buildSettings.getPluginDirect..s Resource[] [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 361 | [SRC]if (pluginManager == null) return getPluginInfos() [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 363 | [SRC]def pluginInfos = getPluginInfos().findAll {GrailsPluginInfo info -> [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 364 | [SRC]GrailsPlugin plugin = pluginManager.getGrailsPlugin(info.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 378 | [SRC]implicitPluginDirectories = buildSettings.getImplicitPlu..source(it) } [MSG]getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories |
UnnecessaryGetter | 2 | 392 | [SRC]return buildSettings?.getPluginBaseDirectories() ?: [] [MSG]getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories |
UnnecessaryGetter | 2 | 392 | [SRC]return buildSettings?.getPluginBaseDirectories() ?: [] [MSG]getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories |
UnnecessaryGetter | 2 | 445 | [SRC]def pluginDirs = getPluginDirectories().toList() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 581 | [SRC]Resource[] pluginDirs = getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGroovyImport | 3 | 19 | [SRC]import java.io.File; |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryDefInMethodDeclaration | 3 | 71 | [SRC]def invokeMethod(String methodName, Object args) { [MSG]The def keyword is unneeded when a method returns the Object type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashMapInstantiation | 2 | 45 | [SRC]Map binding = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
UnnecessaryGetter | 2 | 52 | [SRC]binding.put(CONFIG_BINDING_APP_NAME, application.getMeta..ATION_NAME)) [MSG]getMetadata() can probably be rewritten as metadata |
UnnecessaryGetter | 2 | 53 | [SRC]binding.put(CONFIG_BINDING_APP_VERSION, application.getM..ON_VERSION)) [MSG]getMetadata() can probably be rewritten as metadata |
UnnecessaryGetter | 2 | 58 | [SRC]ClassLoader classLoader = application != null ? applicat..lassLoader() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 58 | [SRC]ClassLoader classLoader = application != null ? applicat..lassLoader() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 147 | [SRC]stream = resource.getInputStream() [MSG]getInputStream() can probably be rewritten as inputStream |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 45 | [SRC]def beans = getBeansConfig() [MSG]getBeansConfig() can probably be rewritten as beansConfig |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CloneableWithoutClone | 2 | 26 | [SRC]class PropertyExpression implements Cloneable { [MSG]The class org.codehaus.groovy.grails.commons.metaclass.PropertyExpression implements Cloneable but does not define a proper clone() method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 82 | [SRC]getDestdir().setLastModified(now) [MSG]getDestdir() can probably be rewritten as destdir |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 19 | [SRC]import org.hibernate.Session |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 364 | [SRC]private handleMethodMissing = { String name, args -> [MSG]The ABC score for method [handleMethodMissing] is [148.8] |
CyclomaticComplexity | 2 | 364 | [SRC]private handleMethodMissing = { String name, args -> [MSG]The cyclomatic complexity for method [handleMethodMissing] is [44] |
UnnecessaryObjectReferences | 2 | 373 | [SRC]property.cascade = namedArgs.cascade ?: property.cascade [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 374 | [SRC]property.sort = namedArgs.sort ?: property.sort [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 375 | [SRC]property.order = namedArgs.order ?: property.order [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 376 | [SRC]property.batchSize = namedArgs.batchSize instanceof Inte..ty.batchSize [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 377 | [SRC]property.ignoreNotFound = namedArgs.ignoreNotFound != nu..noreNotFound [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 378 | [SRC]property.typeParams = namedArgs.params ?: property.typeParams [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 560 | [SRC]column.length = args["length"] ?: -1 [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 561 | [SRC]column.precision = args["precision"] ?: -1 [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 562 | [SRC]column.scale = args["scale"] ?: -1 [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 211 | [SRC]def preparedClosure = getPreparedCriteriaClosure() [MSG]getPreparedCriteriaClosure() can probably be rewritten as preparedCriteriaClosure |
UnnecessaryGetter | 2 | 242 | [SRC]def previousClosure = previousInChain.getPreparedCriteriaClosure() [MSG]getPreparedCriteriaClosure() can probably be rewritten as preparedCriteriaClosure |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 32 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 67 | [SRC]def encodeMethod = codecClass.getEncodeMethod() [MSG]getEncodeMethod() can probably be rewritten as encodeMethod |
UnnecessaryGetter | 2 | 79 | [SRC]def decodeMethod = codecClass.getDecodeMethod() [MSG]getDecodeMethod() can probably be rewritten as decodeMethod |
UnnecessaryGetter | 2 | 32 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 67 | [SRC]def encodeMethod = codecClass.getEncodeMethod() [MSG]getEncodeMethod() can probably be rewritten as encodeMethod |
UnnecessaryGetter | 2 | 79 | [SRC]def decodeMethod = codecClass.getDecodeMethod() [MSG]getDecodeMethod() can probably be rewritten as decodeMethod |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 49 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 89 | [SRC]if (getParentCtx()?.containsBean('pluginManager')) { [MSG]getParentCtx() can probably be rewritten as parentCtx |
UnnecessaryGetter | 2 | 99 | [SRC]if (!Metadata.getCurrent().isWarDeployed() || Environmen..VELOPMENT) { [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 49 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 89 | [SRC]if (getParentCtx()?.containsBean('pluginManager')) { [MSG]getParentCtx() can probably be rewritten as parentCtx |
UnnecessaryGetter | 2 | 99 | [SRC]if (!Metadata.getCurrent().isWarDeployed() || Environmen..VELOPMENT) { [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 174 | [SRC]private static addRelationshipManagementMethods(GrailsDo..nClass dc) { [MSG]The ABC score for method [addRelationshipManagementMethods] is [84.1] |
CyclomaticComplexity | 2 | 174 | [SRC]private static addRelationshipManagementMethods(GrailsDo..nClass dc) { [MSG]The cyclomatic complexity for method [addRelationshipManagementMethods] is [27] |
NestedBlockDepth | 2 | 238 | [SRC]if (otherSide.oneToMany || otherSide.manyToMany) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 240 | [SRC]if (!obj[name]) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 245 | [SRC]else { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 254 | [SRC]if (prop.bidirectional) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 255 | [SRC]if (prop.manyToMany) { [MSG]The nested block depth is 7 |
NestedBlockDepth | 2 | 259 | [SRC]else { [MSG]The nested block depth is 7 |
UnnecessaryGetter | 2 | 38 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 38 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 120 | [SRC]def attributes = rch.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 127 | [SRC]def attributes = rch.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 146 | [SRC]errors = new BeanPropertyBindingResult( delegate, deleg..).getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 156 | [SRC]delegate.setErrors (new BeanPropertyBindingResult(delega...getName())) [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 40 | [SRC]prop.validate(object, object.getProperty(prop.getPropert..localErrors) [MSG]getPropertyName() can probably be rewritten as propertyName |
UnnecessaryGetter | 2 | 45 | [SRC]def fieldName = localError.getField() [MSG]getField() can probably be rewritten as field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EqualsAndHashCode | 2 | 347 | [SRC]class VersionComparator implements Comparator { [MSG]The class org.codehaus.groovy.grails.plugins.VersionComparator defines equals(Object) but not hashCode() |
ExplicitCallToCompareToMethod | 2 | 382 | [SRC]result = nums1[i].compareTo(nums2[i]) [MSG]Explicit call to nums1[i].compareTo(nums2[i]) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToEqualsMethod | 2 | 81 | [SRC]else if (pluginVersion.equals(trimTag(requiredVersion))) { [MSG]Explicit call to pluginVersion.equals(this.trimTag(requiredVersion)) method can be rewritten as pluginVersion == (this.trimTag(requiredVersion)) |
SynchronizedMethod | 2 | 149 | [SRC]static synchronized PluginBuildSettings getPluginBuildSettings() { [MSG]The method getPluginBuildSettings is synchronized at the method level |
SynchronizedMethod | 2 | 156 | [SRC]static synchronized setPluginBuildSettings(PluginBuildSe.. settings) { [MSG]The method setPluginBuildSettings is synchronized at the method level |
SynchronizedMethod | 2 | 341 | [SRC]static synchronized clearCaches() { [MSG]The method clearCaches is synchronized at the method level |
MethodCount | 2 | 32 | [SRC]class GrailsPluginUtils { [MSG]Class org.codehaus.groovy.grails.plugins.GrailsPluginUtils has 40 methods |
UnnecessaryGetter | 2 | 142 | [SRC]new PluginBuildSettings(BuildSettingsHolder.settings, Pl..inManager()) [MSG]getPluginManager() can probably be rewritten as pluginManager |
UnnecessaryGetter | 2 | 164 | [SRC]return getPluginBuildSettings().getPluginInfos() [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 164 | [SRC]return getPluginBuildSettings().getPluginInfos() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 174 | [SRC]final PluginBuildSettings settings = getPluginBuildSettings() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 178 | [SRC]return settings.getSupportedPluginInfos() [MSG]getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos |
UnnecessaryGetter | 2 | 185 | [SRC]getPluginBuildSettings().getPluginBaseDirectories() [MSG]getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories |
UnnecessaryGetter | 2 | 185 | [SRC]getPluginBuildSettings().getPluginBaseDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 192 | [SRC]getPluginBuildSettings().getPluginBaseDirectories() [MSG]getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories |
UnnecessaryGetter | 2 | 192 | [SRC]getPluginBuildSettings().getPluginBaseDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 196 | [SRC]getPluginBuildSettings().getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 196 | [SRC]getPluginBuildSettings().getPluginDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 200 | [SRC]getPluginBuildSettings().getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 200 | [SRC]getPluginBuildSettings().getPluginDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 207 | [SRC]getPluginBuildSettings().getImplicitPluginDirectories() [MSG]getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories |
UnnecessaryGetter | 2 | 207 | [SRC]getPluginBuildSettings().getImplicitPluginDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 211 | [SRC]getPluginBuildSettings().isGlobalPluginLocation(pluginDir) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 218 | [SRC]getPluginBuildSettings().getArtefactResources() [MSG]getArtefactResources() can probably be rewritten as artefactResources |
UnnecessaryGetter | 2 | 218 | [SRC]getPluginBuildSettings().getArtefactResources() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 225 | [SRC]getPluginBuildSettings().getArtefactResourcesForOne(projectDir) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 232 | [SRC]getPluginBuildSettings().getPluginXmlMetadata() [MSG]getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata |
UnnecessaryGetter | 2 | 232 | [SRC]getPluginBuildSettings().getPluginXmlMetadata() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 239 | [SRC]getPluginBuildSettings().getAvailableScripts() [MSG]getAvailableScripts() can probably be rewritten as availableScripts |
UnnecessaryGetter | 2 | 239 | [SRC]getPluginBuildSettings().getAvailableScripts() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 246 | [SRC]getPluginBuildSettings().getPluginScripts() [MSG]getPluginScripts() can probably be rewritten as pluginScripts |
UnnecessaryGetter | 2 | 246 | [SRC]getPluginBuildSettings().getPluginScripts() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 253 | [SRC]getPluginBuildSettings().getPluginResourceBundles() [MSG]getPluginResourceBundles() can probably be rewritten as pluginResourceBundles |
UnnecessaryGetter | 2 | 253 | [SRC]getPluginBuildSettings().getPluginResourceBundles() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 260 | [SRC]getPluginBuildSettings().getPluginSourceFiles() [MSG]getPluginSourceFiles() can probably be rewritten as pluginSourceFiles |
UnnecessaryGetter | 2 | 260 | [SRC]getPluginBuildSettings().getPluginSourceFiles() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 267 | [SRC]getPluginBuildSettings().getPluginJarFiles() [MSG]getPluginJarFiles() can probably be rewritten as pluginJarFiles |
UnnecessaryGetter | 2 | 267 | [SRC]getPluginBuildSettings().getPluginJarFiles() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 274 | [SRC]getPluginBuildSettings().getPluginDescriptors() [MSG]getPluginDescriptors() can probably be rewritten as pluginDescriptors |
UnnecessaryGetter | 2 | 274 | [SRC]getPluginBuildSettings().getPluginDescriptors() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 278 | [SRC]getPluginBuildSettings().getBasePluginDescriptor(basedir) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 286 | [SRC]getPluginBuildSettings().getDescriptorForPlugin(pluginDir) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 293 | [SRC]getPluginBuildSettings().getPluginLibDirectories() [MSG]getPluginLibDirectories() can probably be rewritten as pluginLibDirectories |
UnnecessaryGetter | 2 | 293 | [SRC]getPluginBuildSettings().getPluginLibDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 300 | [SRC]getPluginBuildSettings().getPluginI18nDirectories() [MSG]getPluginI18nDirectories() can probably be rewritten as pluginI18nDirectories |
UnnecessaryGetter | 2 | 300 | [SRC]getPluginBuildSettings().getPluginI18nDirectories() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 307 | [SRC]getPluginBuildSettings().getGlobalPluginsPath() [MSG]getGlobalPluginsPath() can probably be rewritten as globalPluginsPath |
UnnecessaryGetter | 2 | 307 | [SRC]getPluginBuildSettings().getGlobalPluginsPath() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 314 | [SRC]getPluginBuildSettings().getPluginDirForName(pluginName) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 321 | [SRC]getPluginBuildSettings().getMetadataForPlugin(pluginName) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 328 | [SRC]getPluginBuildSettings().getMetadataForPlugin(pluginDir) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 335 | [SRC]getPluginBuildSettings().getPluginDirForName(pluginName) [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
UnnecessaryGetter | 2 | 342 | [SRC]getPluginBuildSettings().clearCache() [MSG]getPluginBuildSettings() can probably be rewritten as pluginBuildSettings |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 35 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 35 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 43 | [SRC]catch(e) { [MSG]The catch block is empty |
UnnecessaryGetter | 2 | 55 | [SRC]input = pluginXml.getInputStream() [MSG]getInputStream() can probably be rewritten as inputStream |
UnnecessaryGetter | 2 | 96 | [SRC]"${getName()}-${getVersion()}" [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 96 | [SRC]"${getName()}-${getVersion()}" [MSG]getVersion() can probably be rewritten as version |
UnnecessaryGetter | 2 | 100 | [SRC][name:getName(), version:getVersion()] [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 100 | [SRC][name:getName(), version:getVersion()] [MSG]getVersion() can probably be rewritten as version |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 34 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 34 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 74 | [SRC]def attributes = rch.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 81 | [SRC]def attributes = rch.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 100 | [SRC]errors = new BeanPropertyBindingResult(delegate, delegat..).getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 110 | [SRC]delegate.setErrors(new BeanPropertyBindingResult(delegat...getName())) [MSG]getName() can probably be rewritten as name |
ImportFromSamePackage | 3 | 22 | [SRC]import org.codehaus.groovy.grails.plugins.DomainClassPluginSupport |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 49 | [SRC]return Base64.decodeBase64(theTarget.toString().getBytes()) [MSG]getBytes() can probably be rewritten as bytes |
UnnecessaryGetter | 2 | 49 | [SRC]return Base64.decodeBase64(theTarget.toString().getBytes()) [MSG]getBytes() can probably be rewritten as bytes |
UnusedImport | 3 | 18 | [SRC]import org.codehaus.groovy.runtime.DefaultGroovyMethods |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 51 | [SRC]if (!(idx % 2)) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 51 | [SRC]if (!(idx % 2)) { [MSG]Testing the negative condition first can make an if statement confusing |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 18 | [SRC]import java.security.MessageDigest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 30 | [SRC]URLEncoder.encode(obj.toString(), URLCodec.getEncoding()) [MSG]getEncoding() can probably be rewritten as encoding |
UnnecessaryGetter | 2 | 34 | [SRC]URLDecoder.decode(obj.toString(), URLCodec.getEncoding()) [MSG]getEncoding() can probably be rewritten as encoding |
UnnecessaryGetter | 2 | 30 | [SRC]URLEncoder.encode(obj.toString(), URLCodec.getEncoding()) [MSG]getEncoding() can probably be rewritten as encoding |
UnnecessaryGetter | 2 | 34 | [SRC]URLDecoder.decode(obj.toString(), URLCodec.getEncoding()) [MSG]getEncoding() can probably be rewritten as encoding |
UnnecessaryGetter | 2 | 38 | [SRC]def request = RequestContextHolder.getRequestAttributes()?.request [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGroovyImport | 3 | 18 | [SRC]import java.net.URLEncoder |
UnnecessaryGroovyImport | 3 | 19 | [SRC]import java.net.URLDecoder |
UnnecessaryDefInMethodDeclaration | 3 | 37 | [SRC]private static def getEncoding() { [MSG]The def keyword is unneeded when a method is marked private |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 103 | [SRC]def json = (value instanceof JSON || value instanceof JS..JSONArray || [MSG]The variable [json] is not used |
UnnecessaryGetter | 2 | 52 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 64 | [SRC]controllers: GrailsUtil.getGrailsVersion(), [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 65 | [SRC]domainClass: GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 52 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 64 | [SRC]controllers: GrailsUtil.getGrailsVersion(), [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 65 | [SRC]domainClass: GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnusedImport | 3 | 36 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 49 | [SRC]def doWithSpring = { [MSG]The ABC score for method [doWithSpring] is [71.1] |
CyclomaticComplexity | 2 | 49 | [SRC]def doWithSpring = { [MSG]The cyclomatic complexity for method [doWithSpring] is [33] |
NestedBlockDepth | 2 | 97 | [SRC]if (!codecClass) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 100 | [SRC]if (codecClass) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 103 | [SRC]else { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 44 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 45 | [SRC]def dependsOn = [core: GrailsUtil.getGrailsVersion()] [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 174 | [SRC]connection = dataSource.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 44 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 45 | [SRC]def dependsOn = [core: GrailsUtil.getGrailsVersion()] [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 174 | [SRC]connection = dataSource.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 190 | [SRC]Enumeration<Driver> drivers = DriverManager.getDrivers() [MSG]getDrivers() can probably be rewritten as drivers |
UnnecessaryGetter | 2 | 196 | [SRC]log.error("Error deregistering JDBC driver ["+driver+"]:..essage(), e) [MSG]getMessage() can probably be rewritten as message |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 45 | [SRC]String version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 45 | [SRC]String version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 64 | [SRC]if (!appender.name) { [MSG]Testing the negative condition first can make an if statement confusing |
MethodCount | 2 | 45 | [SRC]class Log4jConfig { [MSG]Class org.codehaus.groovy.grails.plugins.logging.Log4jConfig has 34 methods |
UnnecessaryObjectReferences | 2 | 306 | [SRC]eachLogger(packages) { Logger logger -> logger.level = Level.DEBUG } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 310 | [SRC]eachLogger(packages) { logger -> logger.level = Level.TRACE } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 314 | [SRC]eachLogger(packages) { logger -> logger.level = Level.ALL } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 125 | [SRC]Logger root = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 169 | [SRC]BuildSettings settings = BuildSettingsHolder.getSettings() [MSG]getSettings() can probably be rewritten as settings |
UnnecessaryGetter | 2 | 170 | [SRC]def targetDir = settings?.getProjectTargetDir() [MSG]getProjectTargetDir() can probably be rewritten as projectTargetDir |
UnnecessaryGetter | 2 | 183 | [SRC]def root = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 263 | [SRC]LogLog.error "Appender $appender not found configuring l...getName()}" [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 318 | [SRC]Logger.getRootLogger().removeAppender name [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnusedImport | 3 | 35 | [SRC]import org.apache.log4j.net.SMTPAppender |
UnusedImport | 3 | 21 | [SRC]import grails.util.GrailsUtil |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 1004 | [SRC]} catch (TypeMismatchException e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 1035 | [SRC]} catch (FileNotFoundException fnfe) { [MSG]The catch block is empty |
ThrowExceptionFromFinallyBlock | 2 | 978 | [SRC]throw e [MSG]Throwing an exception from a finally block can hide an underlieing error |
ExplicitCallToEqualsMethod | 2 | 998 | [SRC]if (value instanceof Number && Long.equals(targetType)) { [MSG]Explicit call to Long.equals(targetType) method can be rewritten as Long == (targetType) |
SynchronizedOnThis | 2 | 461 | [SRC]synchronized(this) { [MSG]The synchronized statement uses the 'this' reference |
AbcComplexity | 2 | 549 | [SRC]private static addQueryMethods(GrailsDomainClass dc, Gra..ntext ctx) { [MSG]The ABC score for method [addQueryMethods] is [215.4] |
AbcComplexity | 2 | 794 | [SRC]private static addBasicPersistenceMethods(GrailsDomainCl..ntext ctx) { [MSG]The ABC score for method [addBasicPersistenceMethods] is [124.5] |
AbcComplexity | 2 | 93 | [SRC]static doWithSpring = { [MSG]The ABC score for method [doWithSpring] is [135.3] |
CyclomaticComplexity | 2 | 93 | [SRC]static doWithSpring = { [MSG]The cyclomatic complexity for method [doWithSpring] is [40] |
UnusedVariable | 2 | 155 | [SRC]def cacheClass = getClass().classLoader.loadClass(cacheProvider) [MSG]The variable [cacheClass] is not used |
UnusedVariable | 2 | 354 | [SRC]MetaClass emc = GroovySystem.metaClassRegistry.getMetaClass(dc.clazz) [MSG]The variable [emc] is not used |
UnusedVariable | 2 | 497 | [SRC]def Class domainClassType = dc.clazz [MSG]The variable [domainClassType] is not used |
UnusedVariable | 2 | 499 | [SRC]ClassLoader classLoader = application.classLoader [MSG]The variable [classLoader] is not used |
UnnecessaryCollectCall | 2 | 200 | [SRC]hibConfigLocations.addAll(explicitLocations.collect { it.toString() }) [MSG]The call to collect could probably be rewritten as a spread expression: explicitLocations*.toString() |
UnnecessaryCollectCall | 2 | 200 | [SRC]hibConfigLocations.addAll(explicitLocations.collect { it.toString() }) [MSG]The call to collect could probably be rewritten as a spread expression: explicitLocations*.toString() |
UnnecessaryObjectReferences | 2 | 727 | [SRC]findAllMethod.invoke(domainClassType, "findAll", [query,..as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 731 | [SRC]findAllMethod.invoke(domainClassType, "findAll", [query,..as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 735 | [SRC]findAllMethod.invoke(domainClassType, "findAll", [query,..as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 739 | [SRC]findAllMethod.invoke(domainClassType, "findAll", [query,..as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 743 | [SRC]findAllMethod.invoke(domainClassType, "findAll", [query,..as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 859 | [SRC]metaClass.attach = {->template.lock(delegate, LockMode.N..; delegate } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 860 | [SRC]metaClass.isAttached = {-> template.contains(delegate) } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 94 | [SRC]def factory = new PersistentConstraintFactory(getSpringC..eConstraint) [MSG]getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext |
UnnecessaryGetter | 2 | 94 | [SRC]def factory = new PersistentConstraintFactory(getSpringC..eConstraint) [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 255 | [SRC]if (getSpringConfig().containsBean("controllerHandlerMappings")) { [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 258 | [SRC]if (getSpringConfig().containsBean("annotationHandlerMapping")) { [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 94 | [SRC]def factory = new PersistentConstraintFactory(getSpringC..eConstraint) [MSG]getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext |
UnnecessaryGetter | 2 | 94 | [SRC]def factory = new PersistentConstraintFactory(getSpringC..eConstraint) [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 255 | [SRC]if (getSpringConfig().containsBean("controllerHandlerMappings")) { [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 258 | [SRC]if (getSpringConfig().containsBean("annotationHandlerMapping")) { [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessarySelfAssignment | 2 | 183 | [SRC]dataSource = dataSource [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 192 | [SRC]dataSource = dataSource [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 210 | [SRC]hibernateProperties = hibernateProperties [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 213 | [SRC]entityInterceptor = entityInterceptor [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 224 | [SRC]hibernateEventListeners = hibernateEventListeners [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 228 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 231 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 253 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 183 | [SRC]dataSource = dataSource [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 192 | [SRC]dataSource = dataSource [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 210 | [SRC]hibernateProperties = hibernateProperties [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 213 | [SRC]entityInterceptor = entityInterceptor [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 224 | [SRC]hibernateEventListeners = hibernateEventListeners [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 228 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 231 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 253 | [SRC]sessionFactory = sessionFactory [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
MethodSize | 3 | 549 | [MSG]Method "addQueryMethods" is 216 lines |
MethodSize | 3 | 794 | [MSG]Method "addBasicPersistenceMethods" is 160 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 137 | [SRC]InputStream stream = pluginsListFile.getInputStream() [MSG]getInputStream() can probably be rewritten as inputStream |
UnnecessaryCallForLastElement | 2 | 116 | [SRC]def lastPlugin = allPlugins[allPlugins.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to allPlugins.last() or allPlugins[-1] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 158 | [SRC]catch (Exception e) { [MSG]The catch block is empty |
UnnecessaryGetter | 2 | 40 | [SRC]def version = grails.util.GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 59 | [SRC]for (PropertyValue pv in beanDef.getPropertyValues().get..lueList()) { [MSG]getPropertyValueList() can probably be rewritten as propertyValueList |
UnnecessaryGetter | 2 | 59 | [SRC]for (PropertyValue pv in beanDef.getPropertyValues().get..lueList()) { [MSG]getPropertyValues() can probably be rewritten as propertyValues |
UnnecessaryGetter | 2 | 40 | [SRC]def version = grails.util.GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 59 | [SRC]for (PropertyValue pv in beanDef.getPropertyValues().get..lueList()) { [MSG]getPropertyValueList() can probably be rewritten as propertyValueList |
UnnecessaryGetter | 2 | 59 | [SRC]for (PropertyValue pv in beanDef.getPropertyValues().get..lueList()) { [MSG]getPropertyValues() can probably be rewritten as propertyValues |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 39 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 81 | [SRC]"${serviceClass.propertyName}"(serviceClass.getClazz()) { bean -> [MSG]getClazz() can probably be rewritten as clazz |
UnnecessaryGetter | 2 | 140 | [SRC]"$serviceName"(serviceClass.getClazz()) { bean -> [MSG]getClazz() can probably be rewritten as clazz |
UnnecessaryGetter | 2 | 39 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 81 | [SRC]"${serviceClass.propertyName}"(serviceClass.getClazz()) { bean -> [MSG]getClazz() can probably be rewritten as clazz |
UnnecessaryGetter | 2 | 140 | [SRC]"$serviceName"(serviceClass.getClazz()) { bean -> [MSG]getClazz() can probably be rewritten as clazz |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 13 | [SRC]return GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 18 | [SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 241 | [SRC]def registerControllerMethods(MetaClass mc, ApplicationContext ctx) { [MSG]The ABC score for method [registerControllerMethods] is [81.5] |
UnusedVariable | 2 | 111 | [SRC]def basedir = System.getProperty("base.dir") [MSG]The variable [basedir] is not used |
UnusedVariable | 2 | 192 | [SRC]def registry = GroovySystem.getMetaClassRegistry() [MSG]The variable [registry] is not used |
UnnecessaryObjectReferences | 2 | 255 | [SRC]mc.getErrors = { -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 258 | [SRC]mc.setModelAndView = { ModelAndView mav -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 261 | [SRC]mc.getModelAndView = { -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 264 | [SRC]mc.getChainModel = { -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 267 | [SRC]mc.hasErrors = { -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 292 | [SRC]mc.render = {Closure c -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 295 | [SRC]mc.render = {Map args, Closure c -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 299 | [SRC]mc.bindData = {Object target, Object args -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 302 | [SRC]mc.bindData = {Object target, Object args, List disallowed -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 305 | [SRC]mc.bindData = {Object target, Object args, List disallow..ng filter -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 308 | [SRC]mc.bindData = {Object target, Object args, Map includeExclude -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 311 | [SRC]mc.bindData = {Object target, Object args, Map includeEx..ng filter -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 314 | [SRC]mc.bindData = {Object target, Object args, String filter -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 315 | [SRC]bind.invoke(delegate, "bindData", [target, args, filter] as Object[]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 65 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 112 | [SRC]def grailsEnv = GrailsUtil.getEnvironment() [MSG]getEnvironment() can probably be rewritten as environment |
UnnecessaryGetter | 2 | 189 | [SRC]ctx.getAutowireCapableBeanFactory().addBeanPostProcessor..cessor(ctx)) [MSG]getAutowireCapableBeanFactory() can probably be rewritten as autowireCapableBeanFactory |
UnnecessaryGetter | 2 | 192 | [SRC]def registry = GroovySystem.getMetaClassRegistry() [MSG]getMetaClassRegistry() can probably be rewritten as metaClassRegistry |
UnnecessaryGetter | 2 | 193 | [SRC]GrailsPluginManager pluginManager = getManager() [MSG]getManager() can probably be rewritten as manager |
UnnecessaryGetter | 2 | 228 | [SRC]if (Modifier.isAbstract(superClass.getModifiers())) { [MSG]getModifiers() can probably be rewritten as modifiers |
UnnecessaryGetter | 2 | 65 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 112 | [SRC]def grailsEnv = GrailsUtil.getEnvironment() [MSG]getEnvironment() can probably be rewritten as environment |
UnnecessaryGetter | 2 | 189 | [SRC]ctx.getAutowireCapableBeanFactory().addBeanPostProcessor..cessor(ctx)) [MSG]getAutowireCapableBeanFactory() can probably be rewritten as autowireCapableBeanFactory |
UnnecessaryGetter | 2 | 192 | [SRC]def registry = GroovySystem.getMetaClassRegistry() [MSG]getMetaClassRegistry() can probably be rewritten as metaClassRegistry |
UnnecessaryGetter | 2 | 193 | [SRC]GrailsPluginManager pluginManager = getManager() [MSG]getManager() can probably be rewritten as manager |
UnnecessaryGetter | 2 | 228 | [SRC]if (Modifier.isAbstract(superClass.getModifiers())) { [MSG]getModifiers() can probably be rewritten as modifiers |
UnnecessaryCallForLastElement | 2 | 115 | [SRC]mappingElement = mappingElement[mappingElement.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1] |
UnnecessaryCallForLastElement | 2 | 127 | [SRC]def lastFilter = filters[filters.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1] |
UnnecessaryCallForLastElement | 2 | 128 | [SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1] |
UnnecessaryCallForLastElement | 2 | 115 | [SRC]mappingElement = mappingElement[mappingElement.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1] |
UnnecessaryCallForLastElement | 2 | 127 | [SRC]def lastFilter = filters[filters.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1] |
UnnecessaryCallForLastElement | 2 | 128 | [SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1] |
UnusedImport | 3 | 22 | [SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 86 | [SRC]def doWithSpring = { [MSG]The ABC score for method [doWithSpring] is [64.7] |
AbcComplexity | 2 | 215 | [SRC]def doWithDynamicMethods = { ApplicationContext ctx -> [MSG]The ABC score for method [doWithDynamicMethods] is [76.4] |
CyclomaticComplexity | 2 | 215 | [SRC]def doWithDynamicMethods = { ApplicationContext ctx -> [MSG]The cyclomatic complexity for method [doWithDynamicMethods] is [21] |
UnnecessaryObjectReferences | 2 | 277 | [SRC]mc.setOut = {Writer newOut -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 281 | [SRC]mc.propertyMissing = { String name -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 301 | [SRC]mc.methodMissing = { String name, args -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 277 | [SRC]mc.setOut = {Writer newOut -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 281 | [SRC]mc.propertyMissing = { String name -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 301 | [SRC]mc.methodMissing = { String name, args -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 58 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 220 | [SRC]GrailsPluginManager pluginManager = getManager() [MSG]getManager() can probably be rewritten as manager |
UnnecessaryGetter | 2 | 236 | [SRC]if (Modifier.isAbstract(superClass.getModifiers())) { [MSG]getModifiers() can probably be rewritten as modifiers |
UnnecessaryGetter | 2 | 256 | [SRC]mc.getTagNamesThatReturnObject = {-> taglib.getTagNamesT..rnObject() } [MSG]getTagNamesThatReturnObject() can probably be rewritten as tagNamesThatReturnObject |
UnnecessaryGetter | 2 | 58 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 220 | [SRC]GrailsPluginManager pluginManager = getManager() [MSG]getManager() can probably be rewritten as manager |
UnnecessaryGetter | 2 | 236 | [SRC]if (Modifier.isAbstract(superClass.getModifiers())) { [MSG]getModifiers() can probably be rewritten as modifiers |
UnnecessaryGetter | 2 | 256 | [SRC]mc.getTagNamesThatReturnObject = {-> taglib.getTagNamesT..rnObject() } [MSG]getTagNamesThatReturnObject() can probably be rewritten as tagNamesThatReturnObject |
UnnecessarySelfAssignment | 2 | 146 | [SRC]jspTagLibraryResolver = jspTagLibraryResolver [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 146 | [SRC]jspTagLibraryResolver = jspTagLibraryResolver [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 40 | [SRC]def doWithDynamicMethods = { ctx -> [MSG]The ABC score for method [doWithDynamicMethods] is [101.4] |
AbcComplexity | 2 | 35 | [SRC]class ServletsGrailsPlugin { [MSG]The ABC score for class [org.codehaus.groovy.grails.plugins.web.ServletsGrailsPlugin] is [101.4] |
UnnecessaryGetter | 2 | 37 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 37 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 69 | [SRC]if (!args) { [MSG]Testing the negative condition first can make an if statement confusing |
ConsecutiveStringConcatenation | 3 | 87 | [SRC]"Invalid filter definition in ${filtersDefinition.getCla..} - trying " [MSG]String concatenation can be joined into a single literal |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 96 | [SRC]if (!uri) uri = request.getRequestURI() [MSG]getRequestURI() can probably be rewritten as requestURI |
UnnecessaryGetter | 2 | 97 | [SRC]return uri.substring(request.getContextPath().length()) [MSG]getContextPath() can probably be rewritten as contextPath |
UnnecessaryGetter | 2 | 198 | [SRC]actionName = controllerClass?.getDefaultAction() [MSG]getDefaultAction() can probably be rewritten as defaultAction |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 160 | [SRC]if (!addedDeps.containsKey(dep)) { [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | 125 | [SRC]private reloadFilters(GrailsApplication application, app..onContext) { [MSG]The ABC score for method [reloadFilters] is [82.7] |
UnusedVariable | 2 | 142 | [SRC]def filterClass = applicationContext.getBean("${c.fullName}Class") [MSG]The variable [filterClass] is not used |
UnusedVariable | 2 | 191 | [SRC]def filterClass = applicationContext.getBean("${c.fullName}Class") [MSG]The variable [filterClass] is not used |
UnnecessaryObjectReferences | 2 | 106 | [SRC]mc.render = {Map args, Closure c -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 106 | [SRC]mc.render = {Map args, Closure c -> [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 43 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 43 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
ImportFromSamePackage | 3 | 24 | [SRC]import org.codehaus.groovy.grails.plugins.web.filters.Co..eInterceptor |
ImportFromSamePackage | 3 | 25 | [SRC]import org.codehaus.groovy.grails.plugins.web.filters.Fi..efactHandler |
ImportFromSamePackage | 3 | 26 | [SRC]import org.codehaus.groovy.grails.plugins.web.filters.Fi..ndlerAdapter |
MethodSize | 3 | 125 | [MSG]Method "reloadFilters" is 108 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
NestedBlockDepth | 2 | 99 | [SRC]'error-page' { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 41 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 41 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryCallForLastElement | 2 | 61 | [SRC]def lastFilter = filters[filters.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1] |
UnnecessaryCallForLastElement | 2 | 71 | [SRC]def lastServlet = servlets[servlets.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to servlets.last() or servlets[-1] |
UnnecessaryCallForLastElement | 2 | 81 | [SRC]def lastMapping = servletMappings[servletMappings.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to servletMappings.last() or servletMappings[-1] |
UnnecessaryCallForLastElement | 2 | 110 | [SRC]welcomeFileList = welcomeFileList[welcomeFileList.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to welcomeFileList.last() or welcomeFileList[-1] |
UnnecessaryCallForLastElement | 2 | 118 | [SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1] |
UnnecessaryCallForLastElement | 2 | 61 | [SRC]def lastFilter = filters[filters.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1] |
UnnecessaryCallForLastElement | 2 | 71 | [SRC]def lastServlet = servlets[servlets.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to servlets.last() or servlets[-1] |
UnnecessaryCallForLastElement | 2 | 81 | [SRC]def lastMapping = servletMappings[servletMappings.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to servletMappings.last() or servletMappings[-1] |
UnnecessaryCallForLastElement | 2 | 110 | [SRC]welcomeFileList = welcomeFileList[welcomeFileList.size()-1] [MSG]Unnecessarily complex access of last element. This can be simplified to welcomeFileList.last() or welcomeFileList[-1] |
UnnecessaryCallForLastElement | 2 | 118 | [SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1] [MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
NestedBlockDepth | 2 | 136 | [SRC]if (formats.containsKey(mime.extension)) { [MSG]The nested block depth is 6 |
UnusedVariable | 2 | 121 | [SRC]def mimeTypes = req.mimeTypes [MSG]The variable [mimeTypes] is not used |
UnnecessaryGetter | 2 | 39 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 55 | [SRC]def allMimes = MimeType.getConfiguredMimeTypes() [MSG]getConfiguredMimeTypes() can probably be rewritten as configuredMimeTypes |
UnnecessaryGetter | 2 | 39 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 55 | [SRC]def allMimes = MimeType.getConfiguredMimeTypes() [MSG]getConfiguredMimeTypes() can probably be rewritten as configuredMimeTypes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 218 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 269 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 298 | [SRC]String defaultAction = controllerClass?.getDefaultAction() [MSG]getDefaultAction() can probably be rewritten as defaultAction |
UnnecessaryGetter | 2 | 218 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 269 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 298 | [SRC]String defaultAction = controllerClass?.getDefaultAction() [MSG]getDefaultAction() can probably be rewritten as defaultAction |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToCompareToMethod | 2 | 271 | [SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key } [MSG]Explicit call to a.value.compareTo(b.value) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 271 | [SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key } [MSG]Explicit call to a.value.compareTo(b.value) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
UnnecessaryCollectCall | 2 | 271 | [SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key } [MSG]The call to collect could probably be rewritten as a spread expression: ISO3166_3.entrySet().sort(<not implemented yet for class: org.codehaus.groovy.ast.expr.ClosureExpression>)*.key |
UnnecessaryCollectCall | 2 | 271 | [SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key } [MSG]The call to collect could probably be rewritten as a spread expression: ISO3166_3.entrySet().sort(<not implemented yet for class: org.codehaus.groovy.ast.expr.ClosureExpression>)*.key |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 796 | [SRC]catch (e) { [MSG]The catch block is empty |
AddEmptyString | 2 | 535 | [SRC]def h = '' + i [MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object) |
AddEmptyString | 2 | 557 | [SRC]def m = '' + i [MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object) |
AddEmptyString | 2 | 535 | [SRC]def h = '' + i [MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object) |
AddEmptyString | 2 | 557 | [SRC]def m = '' + i [MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object) |
AbcComplexity | 2 | 396 | [SRC]def datePicker = { attrs -> [MSG]The ABC score for method [datePicker] is [103.8] |
AbcComplexity | 2 | 665 | [SRC]def select = { attrs -> [MSG]The ABC score for method [select] is [70.6] |
CyclomaticComplexity | 2 | 396 | [SRC]def datePicker = { attrs -> [MSG]The cyclomatic complexity for method [datePicker] is [39] |
CyclomaticComplexity | 2 | 665 | [SRC]def select = { attrs -> [MSG]The cyclomatic complexity for method [select] is [27] |
UnnecessaryObjectReferences | 2 | 94 | [SRC]attrs.tagName = "submitButton" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 94 | [SRC]attrs.tagName = "submitButton" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 269 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 404 | [SRC]xdefault = DateFormat.getInstance().parse(xdefault) [MSG]getInstance() can probably be rewritten as instance |
UnnecessaryGetter | 2 | 582 | [SRC]attrs.from = TimeZone.getAvailableIDs() [MSG]getAvailableIDs() can probably be rewritten as availableIDs |
UnnecessaryGetter | 2 | 583 | [SRC]attrs.value = (attrs.value ? attrs.value.ID : TimeZone.g..efault().ID) [MSG]getDefault() can probably be rewritten as default |
UnnecessaryGetter | 2 | 612 | [SRC]attrs.from = Locale.getAvailableLocales() [MSG]getAvailableLocales() can probably be rewritten as availableLocales |
UnnecessaryGetter | 2 | 666 | [SRC]def messageSource = grailsAttributes.getApplicationConte..sageSource") [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 269 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 404 | [SRC]xdefault = DateFormat.getInstance().parse(xdefault) [MSG]getInstance() can probably be rewritten as instance |
UnnecessaryGetter | 2 | 582 | [SRC]attrs.from = TimeZone.getAvailableIDs() [MSG]getAvailableIDs() can probably be rewritten as availableIDs |
UnnecessaryGetter | 2 | 583 | [SRC]attrs.value = (attrs.value ? attrs.value.ID : TimeZone.g..efault().ID) [MSG]getDefault() can probably be rewritten as default |
UnnecessaryGetter | 2 | 612 | [SRC]attrs.from = Locale.getAvailableLocales() [MSG]getAvailableLocales() can probably be rewritten as availableLocales |
UnnecessaryGetter | 2 | 666 | [SRC]def messageSource = grailsAttributes.getApplicationConte..sageSource") [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 230 | [SRC]def writer = getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessarySelfAssignment | 2 | 397 | [SRC]def out = out // let x = x ? [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 397 | [SRC]def out = out // let x = x ? [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 161 | [SRC]if (!type) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 248 | [SRC]if (!type) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 161 | [SRC]if (!type) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 248 | [SRC]if (!type) { [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | 220 | [SRC]def formatNumber = { attrs -> [MSG]The ABC score for method [formatNumber] is [69.0] |
CyclomaticComplexity | 2 | 220 | [SRC]def formatNumber = { attrs -> [MSG]The cyclomatic complexity for method [formatNumber] is [26] |
UnnecessaryObjectReferences | 2 | 298 | [SRC]decimalFormat.setMinimumFractionDigits(attrs.minFraction.. as Integer) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 298 | [SRC]decimalFormat.setMinimumFractionDigits(attrs.minFraction.. as Integer) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 157 | [SRC]timeZone = TimeZone.getDefault() [MSG]getDefault() can probably be rewritten as default |
UnnecessaryGetter | 2 | 274 | [SRC]dcfs = decimalFormat.getDecimalFormatSymbols() [MSG]getDecimalFormatSymbols() can probably be rewritten as decimalFormatSymbols |
UnnecessaryGetter | 2 | 157 | [SRC]timeZone = TimeZone.getDefault() [MSG]getDefault() can probably be rewritten as default |
UnnecessaryGetter | 2 | 274 | [SRC]dcfs = decimalFormat.getDecimalFormatSymbols() [MSG]getDecimalFormatSymbols() can probably be rewritten as decimalFormatSymbols |
UnnecessaryGetter | 2 | 331 | [SRC]locale = Locale.getDefault() [MSG]getDefault() can probably be rewritten as default |
UnnecessaryGroovyImport | 3 | 21 | [SRC]import java.util.Currency |
UnnecessaryGroovyImport | 3 | 22 | [SRC]import java.util.Locale |
UnnecessaryGroovyImport | 3 | 23 | [SRC]import java.util.TimeZone |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 122 | [SRC]if (!attrs.base) { [MSG]Testing the negative condition first can make an if statement confusing |
UnnecessaryGetter | 2 | 167 | [SRC]getProvider().doRemoteFunction(owner, attrs, out) [MSG]getProvider() can probably be rewritten as provider |
UnnecessaryGetter | 2 | 318 | [SRC]def p = getProvider() [MSG]getProvider() can probably be rewritten as provider |
UnnecessaryGetter | 2 | 349 | [SRC]def p = getProvider() [MSG]getProvider() can probably be rewritten as provider |
UnnecessaryGetter | 2 | 167 | [SRC]getProvider().doRemoteFunction(owner, attrs, out) [MSG]getProvider() can probably be rewritten as provider |
UnnecessaryGetter | 2 | 318 | [SRC]def p = getProvider() [MSG]getProvider() can probably be rewritten as provider |
UnnecessaryGetter | 2 | 349 | [SRC]def p = getProvider() [MSG]getProvider() can probably be rewritten as provider |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 316 | [SRC]def paginate = { attrs -> [MSG]The ABC score for method [paginate] is [87.6] |
AbcComplexity | 2 | 522 | [SRC]def render = { attrs, body -> [MSG]The ABC score for method [render] is [87.5] |
CyclomaticComplexity | 2 | 316 | [SRC]def paginate = { attrs -> [MSG]The cyclomatic complexity for method [paginate] is [29] |
CyclomaticComplexity | 2 | 522 | [SRC]def render = { attrs, body -> [MSG]The cyclomatic complexity for method [render] is [34] |
NestedBlockDepth | 2 | 582 | [SRC]if (templateName.toLowerCase().endsWith('.gsp')) { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 114 | [SRC]def oldPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 153 | [SRC]def parser = getFactory().getPageParser(contentType) [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryGetter | 2 | 160 | [SRC]def decoratorMapper = getFactory().getDecoratorMapper() [MSG]getDecoratorMapper() can probably be rewritten as decoratorMapper |
UnnecessaryGetter | 2 | 160 | [SRC]def decoratorMapper = getFactory().getDecoratorMapper() [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryGetter | 2 | 167 | [SRC]def t = groovyPagesTemplateEngine.createTemplate(d.getPage()) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 197 | [SRC]def htmlPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 244 | [SRC]def htmlPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 287 | [SRC]getPage().writeBody(out) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 296 | [SRC]getPage().writeHead(out) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 114 | [SRC]def oldPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 153 | [SRC]def parser = getFactory().getPageParser(contentType) [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryGetter | 2 | 160 | [SRC]def decoratorMapper = getFactory().getDecoratorMapper() [MSG]getDecoratorMapper() can probably be rewritten as decoratorMapper |
UnnecessaryGetter | 2 | 160 | [SRC]def decoratorMapper = getFactory().getDecoratorMapper() [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryGetter | 2 | 167 | [SRC]def t = groovyPagesTemplateEngine.createTemplate(d.getPage()) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 197 | [SRC]def htmlPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 244 | [SRC]def htmlPage = getPage() [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 287 | [SRC]getPage().writeBody(out) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 296 | [SRC]getPage().writeHead(out) [MSG]getPage() can probably be rewritten as page |
UnnecessaryGetter | 2 | 179 | [SRC]return FactoryHolder.getFactory() [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryNullCheck | 2 | 149 | [SRC]if (gspSiteMeshPage != null && gspSiteMeshPage.isUsed()) { [MSG]The expression ((gspSiteMeshPage != null) && gspSiteMeshPage.isUsed()) can be simplified to (gspSiteMeshPage?.isUsed()) |
UnnecessaryNullCheck | 2 | 149 | [SRC]if (gspSiteMeshPage != null && gspSiteMeshPage.isUsed()) { [MSG]The expression ((gspSiteMeshPage != null) && gspSiteMeshPage.isUsed()) can be simplified to (gspSiteMeshPage?.isUsed()) |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 156 | [SRC]def content = captureTagContent(out, 'meta', attrs, body) [MSG]The variable [content] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryCollectCall | 2 | 343 | [SRC]appliedConstraints += it.collect{ it.appliedConstraints } [MSG]The call to collect could probably be rewritten as a spread expression: it*.appliedConstraints |
UnnecessaryCollectCall | 2 | 343 | [SRC]appliedConstraints += it.collect{ it.appliedConstraints } [MSG]The call to collect could probably be rewritten as a spread expression: it*.appliedConstraints |
UnnecessaryCollectCall | 2 | 114 | [SRC]checkList = model.findAll {it.value?.errors instanceof E..t {it.value} [MSG]The call to collect could probably be rewritten as a spread expression: model.findAll(<not implemented yet for class: org.codehaus.groovy.ast.expr.ClosureExpression>)*.value |
UnnecessaryGetter | 2 | 413 | [SRC]PropertyEditorRegistry registry = RequestContextHolder.c..orRegistry() [MSG]getPropertyEditorRegistry() can probably be rewritten as propertyEditorRegistry |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 70 | [SRC]confList = getModuleConfigurations().toList() [MSG]getModuleConfigurations() can probably be rewritten as moduleConfigurations |
UnnecessaryGetter | 2 | 113 | [SRC]Field field = getClass().getSuperclass().getDeclaredFiel..Transitive") [MSG]getSuperclass() can probably be rewritten as superclass |
UnnecessaryGetter | 2 | 120 | [SRC]Field field = getClass().getSuperclass().getDeclaredFiel..isChanging") [MSG]getSuperclass() can probably be rewritten as superclass |
UnusedImport | 3 | 21 | [SRC]import org.apache.ivy.core.module.descriptor.ModuleDescriptor |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 1130 | [SRC]if (!pluginMode) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 1171 | [SRC]if (!pluginMode) { [MSG]Testing the negative condition first can make an if statement confusing |
AbcComplexity | 2 | 1101 | [SRC]private parseDependenciesInternal(dependencies, String s..onfigurer) { [MSG]The ABC score for method [parseDependenciesInternal] is [64.8] |
CyclomaticComplexity | 2 | 1101 | [SRC]private parseDependenciesInternal(dependencies, String s..onfigurer) { [MSG]The cyclomatic complexity for method [parseDependenciesInternal] is [29] |
MethodCount | 2 | 67 | [SRC]class IvyDependencyManager extends AbstractIvyDependency..itionParser{ [MSG]Class org.codehaus.groovy.grails.resolve.IvyDependencyManager has 32 methods |
MethodCount | 2 | 712 | [SRC]class IvyDomainSpecificLanguageEvaluator { [MSG]Class org.codehaus.groovy.grails.resolve.IvyDomainSpecificLanguageEvaluator has 31 methods |
NestedBlockDepth | 2 | 626 | [SRC]for (ExcludeRule excludeRule in dependencyDescriptor.get..deRules()) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 1176 | [SRC]if (dependency.classifier == 'plugin') { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 1179 | [SRC]else { [MSG]The nested block depth is 6 |
UnusedVariable | 2 | 619 | [SRC]String groupId = moduleRevisionId.getOrganisation() [MSG]The variable [groupId] is not used |
UnusedVariable | 2 | 620 | [SRC]String artifactId = moduleRevisionId.getName() [MSG]The variable [artifactId] is not used |
UnusedVariable | 2 | 621 | [SRC]String version = moduleRevisionId.getRevision() [MSG]The variable [version] is not used |
UnnecessaryGetter | 2 | 410 | [SRC]if (dependencyDescriptor.getModuleConfigurations().length == 0){ [MSG]getModuleConfigurations() can probably be rewritten as moduleConfigurations |
UnnecessaryGetter | 2 | 616 | [SRC]ModuleRevisionId moduleRevisionId = dependencyDescriptor..RevisionId() [MSG]getDependencyRevisionId() can probably be rewritten as dependencyRevisionId |
UnnecessaryGetter | 2 | 617 | [SRC]ModuleId moduleId = moduleRevisionId.getModuleId() [MSG]getModuleId() can probably be rewritten as moduleId |
UnnecessaryGetter | 2 | 619 | [SRC]String groupId = moduleRevisionId.getOrganisation() [MSG]getOrganisation() can probably be rewritten as organisation |
UnnecessaryGetter | 2 | 620 | [SRC]String artifactId = moduleRevisionId.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 621 | [SRC]String version = moduleRevisionId.getRevision() [MSG]getRevision() can probably be rewritten as revision |
UnnecessaryGetter | 2 | 622 | [SRC]String scope = Arrays.asList(dependencyDescriptor.getMod..ns()).get(0) [MSG]getModuleConfigurations() can probably be rewritten as moduleConfigurations |
UnnecessaryGetter | 2 | 626 | [SRC]for (ExcludeRule excludeRule in dependencyDescriptor.get..deRules()) { [MSG]getAllExcludeRules() can probably be rewritten as allExcludeRules |
UnnecessaryGetter | 2 | 627 | [SRC]ModuleId excludedModule = excludeRule.getId().getModuleId() [MSG]getModuleId() can probably be rewritten as moduleId |
UnnecessaryGetter | 2 | 627 | [SRC]ModuleId excludedModule = excludeRule.getId().getModuleId() [MSG]getId() can probably be rewritten as id |
UnnecessaryGetter | 2 | 637 | [SRC]def installedPlugins = metadata?.getInstalledPlugins() [MSG]getInstalledPlugins() can probably be rewritten as installedPlugins |
UnnecessaryGetter | 2 | 660 | [SRC]PomModuleDescriptorParser parser = PomModuleDescriptorPa..etInstance() [MSG]getInstance() can probably be rewritten as instance |
UnnecessaryGetter | 2 | 663 | [SRC]fixedDependencies = md.getDependencies() [MSG]getDependencies() can probably be rewritten as dependencies |
UnnecessaryGetter | 2 | 699 | [SRC]def candidates = getPluginDependencyDescriptors().findAl..pplication } [MSG]getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors |
MethodSize | 3 | 202 | [MSG]Method "getDefaultDependencies" is 134 lines |
MethodSize | 3 | 1101 | [MSG]Method "parseDependenciesInternal" is 102 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
InvertedIfElse | 2 | 402 | [SRC]if (!depPluginDir?.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 2 | 419 | [SRC]if (!GrailsPluginUtils.isValidVersion(dependencyVersion,..pVersion)) { [MSG]Testing the negative condition first can make an if statement confusing |
UnnecessaryCollectCall | 2 | 107 | [SRC]checkPluginsToUninstall(pluginDescriptors.collect { it.d..evisionId }) [MSG]The call to collect could probably be rewritten as a spread expression: pluginDescriptors*.dependencyRevisionId |
UnnecessaryGetter | 2 | 85 | [SRC]applicationPluginsLocation = settings.getProjectPluginsDir() [MSG]getProjectPluginsDir() can probably be rewritten as projectPluginsDir |
UnnecessaryGetter | 2 | 387 | [SRC]def grailsVersion = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 408 | [SRC]installVersion = settings.defaultPluginSet.contains(depD..ion() : null [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 489 | [SRC]IvyDependencyManager dependencyManager = settings.getDep..ncyManager() [MSG]getDependencyManager() can probably be rewritten as dependencyManager |
UnnecessarySelfAssignment | 2 | 303 | [SRC]PluginBuildSettings pluginSettings = pluginSettings [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 155 | [SRC]catch(e) { [MSG]The catch block is empty |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedPrivateMethod | 2 | 133 | [SRC]private generateListView(domainClass, destDir) { [MSG]The method generateListView is not used within DefaultGrailsTemplateGenerator.groovy |
UnusedPrivateMethod | 2 | 143 | [SRC]private generateShowView(domainClass, destDir) { [MSG]The method generateShowView is not used within DefaultGrailsTemplateGenerator.groovy |
UnusedPrivateMethod | 2 | 153 | [SRC]private generateEditView(domainClass, destDir) { [MSG]The method generateEditView is not used within DefaultGrailsTemplateGenerator.groovy |
UnusedPrivateMethod | 2 | 163 | [SRC]private generateCreateView(domainClass, destDir) { [MSG]The method generateCreateView is not used within DefaultGrailsTemplateGenerator.groovy |
UnnecessaryGetter | 2 | 102 | [SRC]for (t in getTemplateNames()) { [MSG]getTemplateNames() can probably be rewritten as templateNames |
UnnecessaryGetter | 2 | 234 | [SRC]def application = ApplicationHolder.getApplication() [MSG]getApplication() can probably be rewritten as application |
UnnecessaryGetter | 2 | 252 | [SRC]return templateFile.inputStream.getText() [MSG]getText() can probably be rewritten as text |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 19 | [SRC]import org.apache.commons.logging.Log |
UnusedImport | 3 | 20 | [SRC]import org.apache.commons.logging.LogFactory |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ConfusingTernary | 2 | 110 | [SRC](pattern.indexOf('.') != -1) ? pattern.replace('.', '/')../" + pattern [MSG](pattern.indexOf(.) != -1) is a confusing negation in a ternary expression. Rewrite as (pattern.indexOf(.) == -1) and invert the conditions. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 57 | [SRC]def testClasses = getTestClasses() [MSG]getTestClasses() can probably be rewritten as testClasses |
UnnecessaryGetter | 2 | 80 | [SRC]new GrailsTestCaseRunnerBuilder(mode, getApplicationCont..getPatterns) [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnusedImport | 3 | 23 | [SRC]import org.codehaus.groovy.grails.test.GrailsTestTargetPattern |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 46 | [SRC]void testRunStarted(Description description) { [MSG]The method testRunStarted is both empty and not marked with @Override |
EmptyMethod | 2 | 72 | [SRC]void testIgnored(Description description) { [MSG]The method testIgnored is both empty and not marked with @Override |
UnnecessaryGetter | 2 | 69 | [SRC]getPerTestRunListener().finish() [MSG]getPerTestRunListener() can probably be rewritten as perTestRunListener |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 24 | [SRC]import org.junit.runner.notification.RunNotifier |
UnusedImport | 3 | 34 | [SRC]import org.codehaus.groovy.grails.test.support.GrailsTestInterceptor |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 84 | [SRC]def controllerName = getControllerName() [MSG]getControllerName() can probably be rewritten as controllerName |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 19 | [SRC]import org.springframework.web.context.request.RequestContextHolder |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 117 | [SRC]Thread.currentThread().contextClassLoader = getTestClassLoader() [MSG]getTestClassLoader() can probably be rewritten as testClassLoader |
UnnecessaryGetter | 2 | 157 | [SRC]def classPathAdditions = [getSourceDir()] [MSG]getSourceDir() can probably be rewritten as sourceDir |
UnnecessaryGetter | 2 | 210 | [SRC]def basePath = getSourceDir().canonicalPath [MSG]getSourceDir() can probably be rewritten as sourceDir |
UnnecessaryGetter | 2 | 250 | [SRC]getTestClassLoader().loadClass(className) [MSG]getTestClassLoader() can probably be rewritten as testClassLoader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 36 | [SRC]def request = params.getRequest() [MSG]getRequest() can probably be rewritten as request |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 35 | [SRC]def request = params.getRequest() [MSG]getRequest() can probably be rewritten as request |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ImportFromSamePackage | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.converters.configu..nInitializer |
ImportFromSamePackage | 3 | 4 | [SRC]import org.codehaus.groovy.grails.web.converters.configu..rationHolder |
ImportFromSamePackage | 3 | 6 | [SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration |
ImportFromSamePackage | 3 | 7 | [SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashMapInstantiation | 2 | 32 | [SRC]Map parameters = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
UnusedImport | 3 | 17 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 46 | [SRC]def flash = webRequest.getFlashScope() [MSG]getFlashScope() can probably be rewritten as flashScope |
UnnecessaryGetter | 2 | 69 | [SRC]def appCtx = webRequest.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 78 | [SRC]def response = webRequest.getCurrentResponse() [MSG]getCurrentResponse() can probably be rewritten as currentResponse |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
SynchronizedMethod | 2 | 66 | [SRC]protected synchronized boolean isTokenValid(HttpServletR..t request) { [MSG]The method isTokenValid is synchronized at the method level |
SynchronizedMethod | 2 | 84 | [SRC]protected synchronized resetToken(HttpServletRequest request) { [MSG]The method resetToken is synchronized at the method level |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 35 | [SRC]def qualifiedMimes = [] [MSG]The variable [qualifiedMimes] is not used |
UnnecessaryGetter | 2 | 33 | [SRC]def config = ConfigurationHolder.getConfig() [MSG]getConfig() can probably be rewritten as config |
UnnecessaryGetter | 2 | 43 | [SRC]return MimeType.getConfiguredMimeTypes() [MSG]getConfiguredMimeTypes() can probably be rewritten as configuredMimeTypes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 39 | [SRC]boolean equals(Object o) { o instanceof MimeType && name..ls(o.name) } [MSG]Explicit call to name.equals(o.name) method can be rewritten as name == (o.name) |
UnnecessaryGetter | 2 | 49 | [SRC]def config = ConfigurationHolder.getConfig() [MSG]getConfig() can probably be rewritten as config |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 73 | [SRC]protected void compileGSP(File viewsDir, File gspfile, S..agePrefix) { [MSG]The ABC score for method [compileGSP] is [64.8] |
UnnecessaryGetter | 2 | 84 | [SRC]def relPackagePath = relativePath(viewsDir, gspfile.getParentFile()) [MSG]getParentFile() can probably be rewritten as parentFile |
UnnecessaryGetter | 2 | 116 | [SRC]gspgroovyfile.getParentFile().mkdirs() [MSG]getParentFile() can probably be rewritten as parentFile |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 58 | [SRC]classpath = new Path(getProject()) [MSG]getProject() can probably be rewritten as project |
UnnecessaryGetter | 2 | 81 | [SRC]throw new BuildException("destination [${destdir}] direc..tLocation()) [MSG]getLocation() can probably be rewritten as location |
UnnecessaryGetter | 2 | 87 | [SRC]throw new BuildException("source [${srcdir}] directory d..tLocation()) [MSG]getLocation() can probably be rewritten as location |
ImportFromSamePackage | 3 | 23 | [SRC]import org.codehaus.groovy.grails.web.pages.GroovyPageCompiler |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 26 | [SRC]return { getSpecificationVersion() } as JspEngineInfo [MSG]getSpecificationVersion() can probably be rewritten as specificationVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CyclomaticComplexity | 2 | 60 | [SRC]void doTag(Writer targetWriter, Map attributes, Closure body) { [MSG]The cyclomatic complexity for method [doTag] is [23] |
NestedBlockDepth | 2 | 111 | [SRC]while (state != IterationTag.SKIP_BODY) { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 62 | [SRC]GroovyPagesPageContext pageContext = PageContextFactory.getCurrent(); [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 99 | [SRC]def out = pageContext.getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 121 | [SRC]LOG.warn "Tag ${tag.getClass().getName()} returned SKIP_..rted in GSP" [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 38 | [SRC]def classLoader = Thread.currentThread().getContextClassLoader() [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
UnnecessaryGetter | 2 | 51 | [SRC]def request = webRequest.getCurrentRequest() [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 56 | [SRC]ServletContext servletContext = webRequest.getServletContext() [MSG]getServletContext() can probably be rewritten as servletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 169 | [SRC]if ("taglib".equals(pullParser.getName())) { [MSG]Explicit call to taglib.equals(pullParser.getName()) method can be rewritten as taglib == (pullParser.getName()) |
ExplicitCallToEqualsMethod | 2 | 175 | [SRC]if (token == XmlPullParser.START_TAG && "uri".equals(pul..etName())) { [MSG]Explicit call to uri.equals(pullParser.getName()) method can be rewritten as uri == (pullParser.getName()) |
NestedBlockDepth | 2 | 175 | [SRC]if (token == XmlPullParser.START_TAG && "uri".equals(pul..etName())) { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 184 | [SRC]if (tagLibURI == uri) { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 64 | [SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs() [MSG]getJarsFromServletContext() can probably be rewritten as jarsFromServletContext |
UnnecessaryGetter | 2 | 64 | [SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs() [MSG]getURLs() can probably be rewritten as URLs |
UnnecessaryGetter | 2 | 70 | [SRC]ZipEntry entry = zipInput.getNextEntry() [MSG]getNextEntry() can probably be rewritten as nextEntry |
UnnecessaryGetter | 2 | 76 | [SRC]entry = zipInput.getNextEntry() [MSG]getNextEntry() can probably be rewritten as nextEntry |
UnnecessaryGetter | 2 | 86 | [SRC]Resource webXml = getWebXmlFromServletContext() [MSG]getWebXmlFromServletContext() can probably be rewritten as webXmlFromServletContext |
UnnecessaryGetter | 2 | 98 | [SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs() [MSG]getJarsFromServletContext() can probably be rewritten as jarsFromServletContext |
UnnecessaryGetter | 2 | 98 | [SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs() [MSG]getURLs() can probably be rewritten as URLs |
UnnecessaryGetter | 2 | 115 | [SRC]def source = new InputSource(webXml.getInputStream()) [MSG]getInputStream() can probably be rewritten as inputStream |
UnnecessaryGetter | 2 | 120 | [SRC]def reader = factory.newSAXParser().getXMLReader() [MSG]getXMLReader() can probably be rewritten as XMLReader |
UnnecessaryGetter | 2 | 126 | [SRC]for (entry in webXmlReader.getTagLocations()) { [MSG]getTagLocations() can probably be rewritten as tagLocations |
UnnecessaryGetter | 2 | 157 | [SRC]ZipEntry entry = zipInput.getNextEntry() [MSG]getNextEntry() can probably be rewritten as nextEntry |
UnnecessaryGetter | 2 | 159 | [SRC]def name = entry.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 169 | [SRC]if ("taglib".equals(pullParser.getName())) { [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 175 | [SRC]if (token == XmlPullParser.START_TAG && "uri".equals(pul..etName())) { [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 177 | [SRC]tagLibURI = pullParser.getText()?.trim() [MSG]getText() can probably be rewritten as text |
UnnecessaryGetter | 2 | 191 | [SRC]entry = zipInput.getNextEntry() [MSG]getNextEntry() can probably be rewritten as nextEntry |
UnnecessaryGetter | 2 | 216 | [SRC]def reader = factory.newSAXParser().getXMLReader() [MSG]getXMLReader() can probably be rewritten as XMLReader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
NestedBlockDepth | 2 | 97 | [SRC]if (paramType.isInstance(commandObjects[counter])) { [MSG]The nested block depth is 6 |
UnnecessaryObjectReferences | 2 | 228 | [SRC]mc.getResponse = responseObject [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 230 | [SRC]mc.getGrailsAttributes = grailsAttrsObject [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 232 | [SRC]mc.getGrailsApplication = { -> RCH.currentRequestAttribu..pplication } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 234 | [SRC]mc.getActionName = { -> RCH.currentRequestAttributes..actionName } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 235 | [SRC]mc.getControllerName = { -> RCH.currentRequestAttributes..rollerName } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 236 | [SRC]mc.getWebRequest = { -> RCH.currentRequestAttributes() } [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 85 | [SRC]def paramTypes = originalAction.getParameterTypes() [MSG]getParameterTypes() can probably be rewritten as parameterTypes |
UnnecessaryGetter | 2 | 121 | [SRC]constrainedProperty.getPropertyName()), errors) [MSG]getPropertyName() can probably be rewritten as propertyName |
UnnecessaryGetter | 2 | 175 | [SRC]errors = new BeanPropertyBindingResult(delegate, delega..).getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 198 | [SRC]delegate.setErrors (new BeanPropertyBindingResult(delega...getName())) [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 180 | [SRC]if ("date.struct".equals(returnValue)) { [MSG]Explicit call to date.struct.equals(returnValue) method can be rewritten as date.struct == (returnValue) |
ExplicitHashMapInstantiation | 2 | 118 | [SRC]prefixValue = new GrailsParameterMap(new HashMap(), request) [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
UnusedPrivateMethod | 2 | 266 | [SRC]private Byte 'byte'(String name) { getByte(name) } [MSG]The method byte is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 273 | [SRC]private Integer 'int'(String name) { getInt(name) } [MSG]The method int is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 280 | [SRC]private Long 'long'(String name) { getLong(name) } [MSG]The method long is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 287 | [SRC]private Short 'short'(String name) { getShort(name) } [MSG]The method short is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 294 | [SRC]private Double 'double'(String name) { getDouble(name) } [MSG]The method double is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 301 | [SRC]private Float 'float'(String name) { getFloat(name) } [MSG]The method float is not used within GrailsParameterMap.groovy |
UnusedPrivateMethod | 2 | 308 | [SRC]private Boolean 'boolean'(String name) { [MSG]The method boolean is not used within GrailsParameterMap.groovy |
UnnecessaryGetter | 2 | 63 | [SRC]final Map requestMap = new LinkedHashMap(request.getParameterMap()) [MSG]getParameterMap() can probably be rewritten as parameterMap |
UnnecessaryGetter | 2 | 196 | [SRC]dateParams.put(paramName.substring(prefix.length(), para...getValue()) [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 202 | [SRC]LocaleContextHolder.getLocale()) [MSG]getLocale() can probably be rewritten as locale |
UnnecessaryGetter | 2 | 253 | [SRC]"] to a query string: " + e.getMessage(), e) [MSG]getMessage() can probably be rewritten as message |
UnnecessaryGroovyImport | 3 | 28 | [SRC]import java.io.UnsupportedEncodingException |
UnusedImport | 3 | 22 | [SRC]import org.codehaus.groovy.grails.web.binding.StructuredPropertyEditor |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
SerializableClassMustDefineSerialVersionUID | 2 | 25 | [SRC]class SynchronizerToken implements Serializable { [MSG]The class org.codehaus.groovy.grails.web.servlet.mvc.SynchronizerToken implements Serializable but does not define a serialVersionUID |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CloneableWithoutClone | 2 | 28 | [SRC]class GroovyPageAttributes extends TypeConvertingMap imp.. Cloneable { [MSG]The class org.codehaus.groovy.grails.web.taglib.GroovyPageAttributes implements Cloneable but does not define a proper clone() method |
EqualsAndHashCode | 2 | 28 | [SRC]class GroovyPageAttributes extends TypeConvertingMap imp.. Cloneable { [MSG]The class org.codehaus.groovy.grails.web.taglib.GroovyPageAttributes defines hashCode() but not equals(Object) |
UnusedPrivateMethod | 2 | 55 | [SRC]private Byte 'byte'(String name) { getByte(name) } [MSG]The method byte is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 62 | [SRC]private Integer 'int'(String name) { getInt(name) } [MSG]The method int is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 69 | [SRC]private Long 'long'(String name) { getLong(name) } [MSG]The method long is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 76 | [SRC]private Short 'short'(String name) { getShort(name) } [MSG]The method short is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 83 | [SRC]private Double 'double'(String name) { getDouble(name) } [MSG]The method double is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 90 | [SRC]private Float 'float'(String name) { getFloat(name) } [MSG]The method float is not used within GroovyPageAttributes.groovy |
UnusedPrivateMethod | 2 | 97 | [SRC]private Boolean 'boolean'(String name) { [MSG]The method boolean is not used within GroovyPageAttributes.groovy |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 19 | [SRC]import org.codehaus.groovy.grails.commons.TagLibArtefactHandler |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CloneableWithoutClone | 2 | 29 | [SRC]class TypeConvertingMap implements Map, Cloneable { [MSG]The class org.codehaus.groovy.grails.web.util.TypeConvertingMap implements Cloneable but does not define a proper clone() method |
EmptyCatchBlock | 2 | 92 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 114 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 133 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 155 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 177 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 199 | [SRC]catch (NumberFormatException e) {} [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 221 | [SRC]catch (e) {} [MSG]The catch block is empty |
UnnecessaryObjectReferences | 2 | 268 | [SRC]wrappedMap.containsValue(v) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 272 | [SRC]wrappedMap.get(k) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 276 | [SRC]wrappedMap.putAll(m) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 280 | [SRC]wrappedMap.clear() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 284 | [SRC]wrappedMap.keySet() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 288 | [SRC]wrappedMap.values() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 292 | [SRC]wrappedMap.entrySet() [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 160 | [SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass) [MSG]getWrappedInstance() can probably be rewritten as wrappedInstance |
UnnecessaryGetter | 2 | 160 | [SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass) [MSG]getReference() can probably be rewritten as reference |
UnnecessaryGetter | 2 | 166 | [SRC]FlowAssembler flowAssembler = new FlowAssembler(builder,..erContext()) [MSG]getFlowBuilderContext() can probably be rewritten as flowBuilderContext |
UnnecessaryGetter | 2 | 172 | [SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass [MSG]getWrappedInstance() can probably be rewritten as wrappedInstance |
UnnecessaryGetter | 2 | 172 | [SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass [MSG]getReference() can probably be rewritten as reference |
UnnecessaryGetter | 2 | 160 | [SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass) [MSG]getWrappedInstance() can probably be rewritten as wrappedInstance |
UnnecessaryGetter | 2 | 160 | [SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass) [MSG]getReference() can probably be rewritten as reference |
UnnecessaryGetter | 2 | 166 | [SRC]FlowAssembler flowAssembler = new FlowAssembler(builder,..erContext()) [MSG]getFlowBuilderContext() can probably be rewritten as flowBuilderContext |
UnnecessaryGetter | 2 | 172 | [SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass [MSG]getWrappedInstance() can probably be rewritten as wrappedInstance |
UnnecessaryGetter | 2 | 172 | [SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass [MSG]getReference() can probably be rewritten as reference |
UnnecessarySelfAssignment | 2 | 71 | [SRC]viewFactoryCreator = viewFactoryCreator [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 76 | [SRC]flowBuilderServices = flowBuilderServices [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 106 | [SRC]flowExecutor = flowExecutor [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 71 | [SRC]viewFactoryCreator = viewFactoryCreator [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 76 | [SRC]flowBuilderServices = flowBuilderServices [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 106 | [SRC]flowExecutor = flowExecutor [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnusedImport | 3 | 25 | [SRC]import org.codehaus.groovy.grails.webflow.persistence.Fl..ssionContext |
UnusedImport | 3 | 40 | [SRC]import org.springframework.webflow.execution.factory.Sta..stenerLoader |
UnusedImport | 3 | 26 | [SRC]import org.codehaus.groovy.grails.webflow.persistence.Se..tionListener |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 26 | [SRC]import org.springframework.webflow.execution.repository...onRepository |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 61 | [SRC]def ctx = getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 41 | [SRC]void setValue(Object context, Object value) { [MSG]The method setValue is both empty and not marked with @Override |
UnusedVariable | 2 | 35 | [SRC]def attrs = context?.attributes ? context.attributes : [:] [MSG]The variable [attrs] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 157 | [SRC]catch (MissingPropertyException e) { [MSG]The catch block is empty |
UnusedPrivateField | 2 | 43 | [SRC]private static final String RESULT = "result" [MSG]The field RESULT is not used within ClosureInvokingAction.groovy |
UnnecessaryGetter | 2 | 75 | [SRC]prop.validate(delegate, delegate.getProperty( prop.getPr..localErrors) [MSG]getPropertyName() can probably be rewritten as propertyName |
UnusedImport | 3 | 19 | [SRC]import org.codehaus.groovy.runtime.InvokerHelper |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 60 | [SRC]FlowAssembler assembler = new FlowAssembler(builder, bui..erContext()) [MSG]getFlowBuilderContext() can probably be rewritten as flowBuilderContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 255 | [SRC]catch (MissingPropertyException mpe) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 265 | [SRC]catch (MissingPropertyException mpe) { [MSG]The catch block is empty |
ExplicitCallToEqualsMethod | 2 | 400 | [SRC]return (name.equals(FLOW_METHOD) && argArray.length == 1..eof Closure) [MSG]Explicit call to name.equals(FLOW_METHOD) method can be rewritten as name == (FLOW_METHOD) |
AbcComplexity | 2 | 115 | [SRC]def invokeMethod(String name, args) { [MSG]The ABC score for method [invokeMethod] is [83.9] |
NestedBlockDepth | 2 | 262 | [SRC]try { [MSG]The nested block depth is 6 |
NestedBlockDepth | 2 | 265 | [SRC]catch (MissingPropertyException mpe) { [MSG]The nested block depth is 6 |
UnnecessaryGetter | 2 | 99 | [SRC]this.metaClass = GroovySystem.getMetaClassRegistry().get..ilder.class) [MSG]getMetaClassRegistry() can probably be rewritten as metaClassRegistry |
UnnecessaryGetter | 2 | 112 | [SRC]super.getContext() [MSG]getContext() can probably be rewritten as context |
UnnecessaryGetter | 2 | 124 | [SRC]Flow flow = super.getFlow() [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 130 | [SRC]FlowArtifactFactory flowFactory = getContext().getFlowAr..actFactory() [MSG]getFlowArtifactFactory() can probably be rewritten as flowArtifactFactory |
UnnecessaryGetter | 2 | 130 | [SRC]FlowArtifactFactory flowFactory = getContext().getFlowAr..actFactory() [MSG]getContext() can probably be rewritten as context |
UnnecessaryGetter | 2 | 169 | [SRC]state = flowFactory.createEndState(name, getFlow(), null..redirectUrl, [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 198 | [SRC]state.getExceptionHandlerSet().add(eh) [MSG]getExceptionHandlerSet() can probably be rewritten as exceptionHandlerSet |
UnnecessaryGetter | 2 | 204 | [SRC]getFlow().setStartState(startFlow) [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 279 | [SRC]getFlow(), [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 297 | [SRC]def controllerClass = flowInfo.subflow.getThisObject().getClass() [MSG]getThisObject() can probably be rewritten as thisObject |
UnnecessaryGetter | 2 | 309 | [SRC]Class controllerClass = flowClosure.getThisObject().getClass() [MSG]getThisObject() can probably be rewritten as thisObject |
UnnecessaryGetter | 2 | 316 | [SRC]return flowFactory.createSubflowState(stateId, getFlow()..on(subflow), [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 324 | [SRC]getFlow(), [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 334 | [SRC]return flowFactory.createEndState(stateId, getFlow(), ge..ntryAction), [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 341 | [SRC]return flowFactory.createEndState(stateId, getFlow(), [MSG]getFlow() can probably be rewritten as flow |
UnnecessaryGetter | 2 | 354 | [SRC]ViewFactory viewFactory = flowBuilderServices.getViewFac..ViewFactory( [MSG]getViewFactoryCreator() can probably be rewritten as viewFactoryCreator |
UnnecessaryGetter | 2 | 356 | [SRC]flowBuilderServices.getExpressionParser(), [MSG]getExpressionParser() can probably be rewritten as expressionParser |
UnnecessaryGetter | 2 | 357 | [SRC]flowBuilderServices.getConversionService(), [MSG]getConversionService() can probably be rewritten as conversionService |
UnnecessaryGetter | 2 | 455 | [SRC]throw new FlowDefinitionException("Event handler in flow..etFlowId() + [MSG]getFlowId() can probably be rewritten as flowId |
UnusedImport | 3 | 33 | [SRC]import org.springframework.webflow.definition.registry.F..tionRegistry |
MethodSize | 3 | 115 | [MSG]Method "invokeMethod" is 112 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 52 | [SRC]return new GroovyShell(new BeanBinding(delegate)).evalua...getValue()) [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 69 | [SRC]context.getExternalContext().requestExternalRedirect("co..ative:$url") [MSG]getExternalContext() can probably be rewritten as externalContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 19 | [SRC]def jspCtx = servletContext.getAttribute(GroovyPagesJspA..t.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 23 | [SRC]if(!servletContext.getAttribute(GroovyPagesJspApplicatio..etName())) { [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 25 | [SRC]servletContext.setAttribute(GroovyPagesJspApplicationCon..e(), jspCtx) [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 32 | [SRC]if(JspFactory.getDefaultFactory() == null) { [MSG]getDefaultFactory() can probably be rewritten as defaultFactory |
UnnecessaryGetter | 2 | 41 | [SRC]def jspContext = JspFactory.getDefaultFactory().getJspAp..etContext()) [MSG]getDefaultFactory() can probably be rewritten as defaultFactory |
UnnecessaryGetter | 2 | 41 | [SRC]def jspContext = JspFactory.getDefaultFactory().getJspAp..etContext()) [MSG]getServletContext() can probably be rewritten as servletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 10 | [SRC]void testWithClasspath() { [MSG]The method testWithClasspath is both empty and not marked with @Override |
JUnitTestMethodWithoutAssert | 2 | 10 | [SRC]void testWithClasspath() { [MSG]Test method 'testWithClasspath' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
BooleanGetBoolean | 2 | 21 | [SRC]if (Boolean.getBoolean("groovy.grails.joint")) return [MSG]Boolean.getBoolean(String) is a confusing API for reading System properties. Prefer the System.getProperty(String) API. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashSetInstantiation | 2 | 58 | [SRC]entity.many = new HashSet() [MSG]HashSet objects are better instantiated using the form "[] as HashSet" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 799 | [SRC]Object remove(String name) { [MSG]The method remove is both empty and not marked with @Override |
EmptyMethod | 2 | 803 | [SRC]void registerDestructionCallback(String name, Runnable callback) {} [MSG]The method registerDestructionCallback is both empty and not marked with @Override |
JUnitTestMethodWithoutAssert | 2 | 638 | [SRC]void testHolyGrailWiring() { [MSG]Test method 'testHolyGrailWiring' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 692 | [SRC]void testBeanBuilderWithScript() { [MSG]Test method 'testBeanBuilderWithScript' makes no assertions |
UnusedVariable | 2 | 635 | [SRC]def dataSource = ctx.getBean("dataSource") [MSG]The variable [dataSource] is not used |
UnnecessaryGetter | 2 | 145 | [SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext() [MSG]getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext |
UnnecessaryGetter | 2 | 145 | [SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext() [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 146 | [SRC]appCtx.getBeanFactory().registerScope("test", scope) [MSG]getBeanFactory() can probably be rewritten as beanFactory |
UnnecessaryGetter | 2 | 172 | [SRC]appCtx = bb.getSpringConfig().getUnrefreshedApplicationContext() [MSG]getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext |
UnnecessaryGetter | 2 | 172 | [SRC]appCtx = bb.getSpringConfig().getUnrefreshedApplicationContext() [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 173 | [SRC]appCtx.getBeanFactory().registerScope("test", scope) [MSG]getBeanFactory() can probably be rewritten as beanFactory |
UnnecessaryGetter | 2 | 236 | [SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext() [MSG]getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext |
UnnecessaryGetter | 2 | 236 | [SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext() [MSG]getSpringConfig() can probably be rewritten as springConfig |
UnnecessaryGetter | 2 | 238 | [SRC]appCtx.getBeanFactory().registerScope("test", scope) [MSG]getBeanFactory() can probably be rewritten as beanFactory |
UnnecessaryGetter | 2 | 809 | [SRC]objectFactory.getObject() [MSG]getObject() can probably be rewritten as object |
UnnecessarySelfAssignment | 2 | 308 | [SRC]quest = quest [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UnnecessarySelfAssignment | 2 | 331 | [SRC]quest = quest [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
UseAssertTrueInsteadOfAssertEquals | 3 | 382 | [SRC]assertEquals true, bean1.props?.overweight [MSG]assertEquals can be simplified using assertTrue or assertFalse |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 10 | [SRC]void testControllerClass() { [MSG]Test method 'testControllerClass' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 17 | [SRC]void testExplicitControllerClass() { [MSG]Test method 'testExplicitControllerClass' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 25 | [SRC]void testMockCommandObject() { [MSG]Test method 'testMockCommandObject' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 32 | [SRC]void testGetSetModelAndView() { [MSG]Test method 'testGetSetModelAndView' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 42 | [SRC]void testModelAndView() { [MSG]Test method 'testModelAndView' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 35 | [SRC]protected void tearDown() throws Exception { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTestMethodWithoutAssert | 2 | 38 | [SRC]void testMockConfig() { [MSG]Test method 'testMockConfig' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 50 | [SRC]void testMockLogging() { [MSG]Test method 'testMockLogging' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 60 | [SRC]void testMockLoggingWithDebugEnabled() { [MSG]Test method 'testMockLoggingWithDebugEnabled' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 70 | [SRC]void testMockDomainErrors() { [MSG]Test method 'testMockDomainErrors' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 84 | [SRC]void testMockForConstraintsTests() { [MSG]Test method 'testMockForConstraintsTests' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 96 | [SRC]void testMockFor() { [MSG]Test method 'testMockFor' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 119 | [SRC]void testCascadingValidation() { [MSG]Test method 'testCascadingValidation' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 126 | [SRC]void testMockDynamicMethodsWithInstanceList() { [MSG]Test method 'testMockDynamicMethodsWithInstanceList' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 140 | [SRC]void testLoadCodec() { [MSG]Test method 'testLoadCodec' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 147 | [SRC]void testConverters() { [MSG]Test method 'testConverters' makes no assertions |
UnnecessaryObjectReferences | 2 | 104 | [SRC]testCase.tearDown() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 106 | [SRC]testCase.setUp() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 107 | [SRC]testCase.testMockInterface1() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 108 | [SRC]testCase.tearDown() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 110 | [SRC]testCase.setUp() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 111 | [SRC]testCase.testMockInterface2() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 112 | [SRC]testCase.tearDown() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 155 | [SRC]testCase.tearDown() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 334 | [SRC]log.warn "Test warning with exception", new Exception("s..ent wrong!") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 335 | [SRC]log.info "Test info message" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 336 | [SRC]log.info "Test info message with exception", new Excepti..ent wrong!") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 337 | [SRC]log.debug "Test debug" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 338 | [SRC]log.debug "Test debug with exception", new Exception("so..ent wrong!") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 339 | [SRC]log.trace "Test trace" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 340 | [SRC]log.trace "Test trace with exception", new Exception("so..ent wrong!") [MSG]The code could be more concise by using a with() or identity() block |
UnusedImport | 3 | 20 | [SRC]import junit.framework.AssertionFailedError |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EqualsAndHashCode | 2 | 370 | [SRC]class MockUrlMapping implements UrlMapping { [MSG]The class grails.test.MockUrlMapping defines equals(Object) but not hashCode() |
EmptyCatchBlock | 2 | 205 | [SRC]catch (e) {} [MSG]The catch block is empty |
CompareToWithoutComparable | 2 | 370 | [SRC]class MockUrlMapping implements UrlMapping { [MSG]compareTo method at line 388 would implement Comparable.compareTo(Object) but the enclosing class does not implement Comparable. |
EmptyMethod | 2 | 410 | [SRC]void setParameterValues(Map parameterValues) {} [MSG]The method setParameterValues is both empty and not marked with @Override |
EmptyMethod | 2 | 412 | [SRC]void setParseRequest(boolean shouldParse) { [MSG]The method setParseRequest is both empty and not marked with @Override |
EmptyMethod | 2 | 418 | [SRC]void setMappingName(String name) {} [MSG]The method setMappingName is both empty and not marked with @Override |
JUnitPublicNonTestMethod | 2 | 342 | [SRC]def assertView(controller, view, url) { [MSG]The method assertView is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 59 | [SRC]void testSetup() { [MSG]Test method 'testSetup' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 69 | [SRC]void testSetupExplicitMappingClass() { [MSG]Test method 'testSetupExplicitMappingClass' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 172 | [SRC]void test_GRAILS_3571_Bug() { [MSG]Test method 'test_GRAILS_3571_Bug' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 261 | [SRC]void testGrails5786() { [MSG]Test method 'testGrails5786' makes no assertions |
UnnecessaryObjectReferences | 2 | 220 | [SRC]test.assertUrlMapping(500, controller: "grailsUrlMapping..: "action1") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 222 | [SRC]test.assertForwardUrlMapping("/controllerView", controll..iew: "view") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 231 | [SRC]test.assertUrlMapping("/absoluteView", view: "view") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 232 | [SRC]test.assertUrlMapping("/absoluteView", view: "/view") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 233 | [SRC]test.assertUrlMapping("/absoluteViewWithSlash", view: "view") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 234 | [SRC]test.assertUrlMapping("/absoluteViewWithSlash", view: "/view") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 236 | [SRC]test.assertUrlMapping("/params/value1/value2", controlle.."action3") { [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 256 | [SRC]test.assertUrlMapping("/params/value1", controller: "gra.."action3") { [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 186 | [SRC]test.assertUrlMapping("/nonexistent", controller: "grail..stCaseFake") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 190 | [SRC]test.assertUrlMapping("/action1", controller: "blah") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 194 | [SRC]test.assertUrlMapping("/action1", controller: "grailsUrl..tion: "xxx") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 198 | [SRC]test.assertUrlMapping("/action1", action: "action1") [MSG]The code could be more concise by using a with() or identity() block |
UnusedImport | 3 | 16 | [SRC]import org.codehaus.groovy.grails.web.mapping.RegexUrlMapping |
UnusedImport | 3 | 19 | [SRC]import org.codehaus.groovy.grails.web.mapping.AbstractUrlMapping |
UnusedImport | 3 | 13 | [SRC]import org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingsHolder |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 14 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTearDownCallsSuper | 2 | 34 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTestMethodWithoutAssert | 2 | 18 | [SRC]void testMockDomainWithInheritance() { [MSG]Test method 'testMockDomainWithInheritance' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 11 | [SRC]void testUnregisteredMockedStaticMethods() { [MSG]Test method 'testUnregisteredMockedStaticMethods' makes no assertions |
UnnecessaryObjectReferences | 2 | 19 | [SRC]testcase.tearDown() [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 14 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 19 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTearDownCallsSuper | 2 | 33 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTestMethodWithoutAssert | 2 | 23 | [SRC]void testMockDomainWithHasMany() { [MSG]Test method 'testMockDomainWithHasMany' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 30 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 35 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 34 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 41 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnusedVariable | 2 | 78 | [SRC]def domain1 = new TestDomainWithUUID(name: "Alice Doe", ..: 35).save() [MSG]The variable [domain1] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
BooleanMethodReturnsNull | 2 | 1569 | [SRC]if (!(obj instanceof TestDomain)) return null [MSG]Returning null from a method that might return a Boolean |
BooleanMethodReturnsNull | 2 | 1625 | [SRC]if (!(obj instanceof TestDomainWithUUID)) return null [MSG]Returning null from a method that might return a Boolean |
BooleanMethodReturnsNull | 2 | 1655 | [SRC]if (!(obj instanceof TestDomainWithAssignedId)) return null [MSG]Returning null from a method that might return a Boolean |
EqualsAndHashCode | 2 | 1516 | [SRC]class TestDomain { [MSG]The class grails.test.TestDomain defines equals(Object) but not hashCode() |
EqualsAndHashCode | 2 | 1612 | [SRC]class TestDomainWithUUID { [MSG]The class grails.test.TestDomainWithUUID defines equals(Object) but not hashCode() |
UseAssertFalseInsteadOfNegation | 2 | 1078 | [SRC]assertTrue !model [MSG]assertTrue(!model) can be simplified to assertFalse(model) |
AbcComplexity | 2 | 119 | [SRC]void testDynamicFinders() { [MSG]The ABC score for method [testDynamicFinders] is [82.3] |
AbcComplexity | 2 | 578 | [SRC]void testConstraintValidation() { [MSG]The ABC score for method [testConstraintValidation] is [96.4] |
MethodCount | 2 | 33 | [SRC]class MockUtilsTests extends GroovyTestCase { [MSG]Class grails.test.MockUtilsTests has 56 methods |
UnnecessaryObjectReferences | 2 | 843 | [SRC]controller.render(template: "fragment", collection: [], model: [:]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 1145 | [SRC]cmd.validate() [MSG]The code could be more concise by using a with() or identity() block |
ClassSize | 3 | 33 | [MSG]Class "MockUtilsTests" is 1389 lines |
MethodSize | 3 | 119 | [MSG]Method "testDynamicFinders" is 111 lines |
MethodSize | 3 | 578 | [MSG]Method "testConstraintValidation" is 108 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 8 | [SRC]void testTagThatPopulatesPageScope() { [MSG]Test method 'testTagThatPopulatesPageScope' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 16 | [SRC]void testTagThatAccessesPageScope() { [MSG]Test method 'testTagThatAccessesPageScope' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 9 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 14 | [SRC]assertEquals BuildScope.ALL, BuildScope.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 18 | [SRC]assertEquals BuildScope.WAR, BuildScope.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashMapInstantiation | 2 | 24 | [SRC]savedSystemProps = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
EmptyMethod | 2 | 284 | [SRC]void receiveGrailsBuildEvent(String name, Object[] args) {} [MSG]The method receiveGrailsBuildEvent is both empty and not marked with @Override |
JUnitSetUpCallsSuper | 2 | 14 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 27 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
AbcComplexity | 2 | 145 | [SRC]void testExplicitValues() { [MSG]The ABC score for method [testExplicitValues] is [65.3] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 9 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryObjectReferences | 2 | 201 | [SRC]System.setProperty(Environment.RELOAD_LOCATION, ".") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 14 | [SRC]Metadata.getCurrent().clear() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 20 | [SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 51 | [SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 68 | [SRC]assertEquals Environment.CUSTOM, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 88 | [SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 107 | [SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 126 | [SRC]assertEquals Environment.CUSTOM, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 148 | [SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 151 | [SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 154 | [SRC]assertEquals Environment.CUSTOM, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 169 | [SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 172 | [SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 175 | [SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 178 | [SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 186 | [SRC]assertFalse "reload should be disabled by default in pro..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 189 | [SRC]assertFalse "reload should be disabled by default in dev..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 192 | [SRC]assertTrue "reload should be enabled by default in devel..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 196 | [SRC]assertFalse "reload should be disabled by default in pro..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 199 | [SRC]assertFalse "reload should be disabled by default in pro..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 202 | [SRC]assertTrue "reload should be enabled by default in produ..oadEnabled() [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 8 | [SRC]void testMakeMockRequest() { [MSG]The method testMakeMockRequest is both empty and not marked with @Override |
JUnitTestMethodWithoutAssert | 2 | 8 | [SRC]void testMakeMockRequest() { [MSG]Test method 'testMakeMockRequest' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 15 | [SRC]assertEquals "1.1", m.getInstalledPlugins().tomcat [MSG]getInstalledPlugins() can probably be rewritten as installedPlugins |
UnnecessaryGetter | 2 | 16 | [SRC]assertEquals "1.2", m.getInstalledPlugins().hibernate [MSG]getInstalledPlugins() can probably be rewritten as installedPlugins |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 19 | [SRC]PluginBuildSettings createPluginBuildSettings(File proje.._PROJ_DIR) { [MSG]The method createPluginBuildSettings is public but not a test method |
UseAssertFalseInsteadOfNegation | 2 | 259 | [SRC]assertTrue("should not be a plugin-two dir in same dir a..pp.exists()) [MSG]assertTrue(!pluginTwoInSameDirAsRootApp.exists()) can be simplified to assertFalse(pluginTwoInSameDirAsRootApp.exists()) |
UnnecessaryGetter | 2 | 61 | [SRC]def sourceFiles = pluginSettings.getPluginSourceFiles() [MSG]getPluginSourceFiles() can probably be rewritten as pluginSourceFiles |
UnnecessaryGetter | 2 | 93 | [SRC]assertEquals 2, pluginSettings.getPluginLibDirectories().size() [MSG]getPluginLibDirectories() can probably be rewritten as pluginLibDirectories |
UnnecessaryGetter | 2 | 94 | [SRC]assertEquals 2, pluginSettings.getPluginLibDirectories().size() [MSG]getPluginLibDirectories() can probably be rewritten as pluginLibDirectories |
UnnecessaryGetter | 2 | 99 | [SRC]assertEquals 2, pluginSettings.getPluginDescriptors().size() [MSG]getPluginDescriptors() can probably be rewritten as pluginDescriptors |
UnnecessaryGetter | 2 | 100 | [SRC]assertEquals 2, pluginSettings.getPluginDescriptors().size() [MSG]getPluginDescriptors() can probably be rewritten as pluginDescriptors |
UnnecessaryGetter | 2 | 107 | [SRC]assertEquals 6, pluginSettings.getArtefactResources().size() [MSG]getArtefactResources() can probably be rewritten as artefactResources |
UnnecessaryGetter | 2 | 108 | [SRC]assertEquals 6, pluginSettings.getArtefactResources().size() [MSG]getArtefactResources() can probably be rewritten as artefactResources |
UnnecessaryGetter | 2 | 113 | [SRC]def scripts = pluginSettings.getAvailableScripts() [MSG]getAvailableScripts() can probably be rewritten as availableScripts |
UnnecessaryGetter | 2 | 125 | [SRC]def scripts = pluginSettings.getPluginScripts() [MSG]getPluginScripts() can probably be rewritten as pluginScripts |
UnnecessaryGetter | 2 | 133 | [SRC]assertEquals 2, pluginSettings.getPluginXmlMetadata().size() [MSG]getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata |
UnnecessaryGetter | 2 | 134 | [SRC]assertEquals 2, pluginSettings.getPluginXmlMetadata().size() [MSG]getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata |
UnnecessaryGetter | 2 | 140 | [SRC]def pluginInfos = pluginSettings.getPluginInfos() [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UnnecessaryGetter | 2 | 159 | [SRC]def pluginDirs = createPluginBuildSettings().getImplicit..irectories() [MSG]getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories |
UnnecessaryGetter | 2 | 181 | [SRC]def pluginDirs = pluginSettings.getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 264 | [SRC]def pluginInfos = pluginSettings.getPluginInfos() [MSG]getPluginInfos() can probably be rewritten as pluginInfos |
UseAssertEqualsInsteadOfAssertTrue | 3 | 64 | [SRC]assertFalse("There should be no .svn directory", it.file..e == '.svn') [MSG]Replace assertFalse with a call to assertEquals() |
UseAssertEqualsInsteadOfAssertTrue | 3 | 65 | [SRC]assertFalse("There should be no CVS directory", it.file.name == 'CVS') [MSG]Replace assertFalse with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 42 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 51 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
AbcComplexity | 2 | 86 | [SRC]protected void gantRun(String scriptName) { [MSG]The ABC score for method [gantRun] is [72.9] |
UnnecessaryObjectReferences | 2 | 100 | [SRC]settings.resourcesDir = new File("$projectDir/resources") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 101 | [SRC]settings.testClassesDir = new File("$projectDir/test-classes") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 102 | [SRC]settings.projectPluginsDir = new File("$projectDir/plugins") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 103 | [SRC]settings.globalPluginsDir = new File("$workDir/global-plugins") [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 13 | [SRC]void testSetDepedenciesExternallyConfigured() { [MSG]Test method 'testSetDepedenciesExternallyConfigured' makes no assertions |
AbcComplexity | 2 | 31 | [SRC]void testExecutionWithCustomSettings() { [MSG]The ABC score for method [testExecutionWithCustomSettings] is [60.9] |
UnnecessaryObjectReferences | 2 | 42 | [SRC]testHelper.projectPluginsDir = new File("plugins") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 43 | [SRC]testHelper.globalPluginsDir = new File("global-work/plugins") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 44 | [SRC]testHelper.testReportsDir = new File("target/test-reports") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 45 | [SRC]testHelper.compileDependencies = testCompileDeps [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 46 | [SRC]testHelper.testDependencies = testTestDeps [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 47 | [SRC]testHelper.runtimeDependencies = testRuntimeDeps [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import javax.naming.Context |
UnusedImport | 3 | 5 | [SRC]import javax.naming.spi.ObjectFactory |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 9 | [SRC]void testAddGrailsClass() { [MSG]The ABC score for method [testAddGrailsClass] is [76.4] |
AbcComplexity | 2 | 7 | [SRC]class DefaultArtefactInfoTests extends GroovyTestCase { [MSG]The ABC score for class [org.codehaus.groovy.grails.commons.DefaultArtefactInfoTests] is [76.4] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 9 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 13 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 19 | [SRC]assertEquals "encoded", codecClass.getEncodeMethod().call("stuff") [MSG]getEncodeMethod() can probably be rewritten as encodeMethod |
UnnecessaryGetter | 2 | 20 | [SRC]assertEquals "decoded", codecClass.getDecodeMethod().call("stuff") [MSG]getDecodeMethod() can probably be rewritten as decodeMethod |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 24 | [SRC]assertTrue(prop1Child.equals(prop1Child)) [MSG]Explicit call to prop1Child.equals(prop1Child) method can be rewritten as prop1Child == (prop1Child) |
ExplicitCallToEqualsMethod | 2 | 28 | [SRC]assertTrue(prop1Parent.equals(prop1Child)) [MSG]Explicit call to prop1Parent.equals(prop1Child) method can be rewritten as prop1Parent == (prop1Child) |
ExplicitCallToEqualsMethod | 2 | 29 | [SRC]assertTrue(prop1Child.equals(prop1Parent)) [MSG]Explicit call to prop1Child.equals(prop1Parent) method can be rewritten as prop1Child == (prop1Parent) |
ExplicitCallToEqualsMethod | 2 | 33 | [SRC]assertFalse(prop1Child.equals(prop2Child)) [MSG]Explicit call to prop1Child.equals(prop2Child) method can be rewritten as prop1Child == (prop2Child) |
ExplicitCallToEqualsMethod | 2 | 34 | [SRC]assertFalse(prop2Child.equals(prop1Child)) [MSG]Explicit call to prop2Child.equals(prop1Child) method can be rewritten as prop2Child == (prop1Child) |
ExplicitCallToEqualsMethod | 2 | 38 | [SRC]assertFalse(prop2Child.equals(prop1Parent)) [MSG]Explicit call to prop2Child.equals(prop1Parent) method can be rewritten as prop2Child == (prop1Parent) |
ExplicitCallToEqualsMethod | 2 | 39 | [SRC]assertFalse(prop1Parent.equals(prop2Child)) [MSG]Explicit call to prop1Parent.equals(prop2Child) method can be rewritten as prop1Parent == (prop2Child) |
ExplicitCallToEqualsMethod | 2 | 43 | [SRC]assertFalse(prop1Child.equals(null)) [MSG]Explicit call to prop1Child.equals(null) method can be rewritten as prop1Child == (null) |
ExplicitCallToEqualsMethod | 2 | 44 | [SRC]assertFalse(prop1Child.equals("Not a property")) [MSG]Explicit call to prop1Child.equals(Not a property) method can be rewritten as prop1Child == (Not a property) |
JUnitSetUpCallsSuper | 2 | 13 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
UnnecessaryGroovyImport | 3 | 3 | [SRC]import groovy.util.GroovyTestCase |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 336 | [SRC]catch(InvalidPropertyException ipe) { [MSG]The catch block is empty |
ExplicitCallToEqualsMethod | 2 | 193 | [SRC]assertTrue(dc.getPropertyByName("children").getOtherSide..("parent"))) [MSG]Explicit call to dc.getPropertyByName(children).getOtherSide().equals(dc.getPropertyByName(parent)) method can be rewritten as dc.getPropertyByName(children).getOtherSide() == (dc.getPropertyByName(parent)) |
ExplicitCallToEqualsMethod | 2 | 194 | [SRC]assertTrue(dc.getPropertyByName("parent").getOtherSide()..children"))) [MSG]Explicit call to dc.getPropertyByName(parent).getOtherSide().equals(dc.getPropertyByName(children)) method can be rewritten as dc.getPropertyByName(parent).getOtherSide() == (dc.getPropertyByName(children)) |
ExplicitHashMapInstantiation | 2 | 185 | [SRC]Map domainMap = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
UnnecessaryGetter | 2 | 51 | [SRC]assertEquals(GrailsDomainClassProperty.FETCH_EAGER, test..FetchMode()) [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 54 | [SRC]assertEquals(GrailsDomainClassProperty.FETCH_LAZY, other..FetchMode()) [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 186 | [SRC]domainMap.put(dc.getFullName(),dc) [MSG]getFullName() can probably be rewritten as fullName |
UnnecessaryGetter | 2 | 193 | [SRC]assertTrue(dc.getPropertyByName("children").getOtherSide..("parent"))) [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 194 | [SRC]assertTrue(dc.getPropertyByName("parent").getOtherSide()..children"))) [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 242 | [SRC]assertEquals(c1dc.getPropertyByName("ones").getOtherSide..me("other")) [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 249 | [SRC]assertEquals(c2dc.getPropertyByName("other").getOtherSid..ame("ones")) [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 284 | [SRC]assertEquals("bottom class had wrong number of persisten..es().length) [MSG]getPersistentProperties() can probably be rewritten as persistentProperties |
UnnecessaryGetter | 2 | 285 | [SRC]assertEquals("middle class had wrong number of persisten..es().length) [MSG]getPersistentProperties() can probably be rewritten as persistentProperties |
UnnecessaryGetter | 2 | 286 | [SRC]assertEquals("top class had wrong number of persistent p..es().length) [MSG]getPersistentProperties() can probably be rewritten as persistentProperties |
UnnecessaryGetter | 2 | 326 | [SRC]assertEquals("UserTest",domainClass.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 328 | [SRC]assertNotNull(domainClass.getIdentifier()) [MSG]getIdentifier() can probably be rewritten as identifier |
UnnecessaryGetter | 2 | 329 | [SRC]assertNotNull(domainClass.getVersion()) [MSG]getVersion() can probably be rewritten as version |
UnnecessaryGetter | 2 | 330 | [SRC]assertTrue(domainClass.getIdentifier().isIdentity()) [MSG]getIdentifier() can probably be rewritten as identifier |
UnnecessaryGetter | 2 | 354 | [SRC]GrailsDomainClassProperty[] persistantProperties = domai..Properties() [MSG]getPersistentProperties() can probably be rewritten as persistentProperties |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 15 | [SRC]assertNotNull(GrailsMetaClassUtils.getRegistry()) [MSG]getRegistry() can probably be rewritten as registry |
UnnecessaryGetter | 2 | 39 | [SRC]assertEquals "bar", d.getFoo() [MSG]getFoo() can probably be rewritten as foo |
UnnecessaryGetter | 2 | 48 | [SRC]assertEquals "bar", d.getFoo() [MSG]getFoo() can probably be rewritten as foo |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 8 | [SRC]void testDoWithWebDescriptor() { [MSG]Test method 'testDoWithWebDescriptor' makes no assertions |
UnusedVariable | 2 | 20 | [SRC]def xml = new XmlSlurper().parseText(text) [MSG]The variable [xml] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 135 | [SRC]catch (PluginException pe) { [MSG]The catch block is empty |
JUnitTestMethodWithoutAssert | 2 | 123 | [SRC]void testWithLoadLastPlugin() throws Exception { [MSG]Test method 'testWithLoadLastPlugin' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 140 | [SRC]void testDependencyResolutionSucces() throws Exception { [MSG]Test method 'testDependencyResolutionSucces' makes no assertions |
UnnecessaryGetter | 2 | 104 | [SRC]assertEquals(1, manager.getPluginResources().length) [MSG]getPluginResources() can probably be rewritten as pluginResources |
UnnecessaryGetter | 2 | 113 | [SRC]assertEquals("classEditor",plugin.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 114 | [SRC]assertEquals("1.1", plugin.getVersion()) [MSG]getVersion() can probably be rewritten as version |
UnnecessaryGetter | 2 | 159 | [SRC]def ctx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 177 | [SRC]def ctx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnusedImport | 3 | 9 | [SRC]import org.springframework.context.support.GenericApplicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 76 | [SRC]assertEquals "bar", b.getFoo() [MSG]getFoo() can probably be rewritten as foo |
UnusedImport | 3 | 18 | [SRC]import org.springframework.beans.BeanUtils |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CoupledTestCase | 2 | 11 | [SRC]def obj = new PropertyMapTest(name:"Homer", age:45) [MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 19 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..er:"stuff")) [MSG]new PropertyMapTest([name:Bart, age:11, other:stuff]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 28 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest()) [MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 33 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest()) [MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 38 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest()) [MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 46 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..r", age:45)) [MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 54 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..r", age:45)) [MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 70 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11)) [MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 85 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11)) [MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
CoupledTestCase | 2 | 95 | [SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11)) [MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 32 | [SRC]assert e == gcl.getCompilationError() : "should have sto..ation error" [MSG]getCompilationError() can probably be rewritten as compilationError |
UnnecessaryGetter | 2 | 38 | [SRC]assert !gcl.getCompilationError() : "shouldn't have any ..tion errors" [MSG]getCompilationError() can probably be rewritten as compilationError |
UnusedImport | 3 | 4 | [SRC]import org.codehaus.groovy.grails.compiler.support.Grail..sourceLoader |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.control.CompilerConfiguration |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 16 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 20 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 17 | [SRC]Metadata.getCurrent().put(Metadata.WAR_DEPLOYED, "true") [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 2 | 21 | [SRC]Metadata.getCurrent().put(Metadata.WAR_DEPLOYED, "") [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 13 | [SRC]void testGeneratedMetadata() { [MSG]The ABC score for method [testGeneratedMetadata] is [69.0] |
AbcComplexity | 2 | 11 | [SRC]class MetadataGeneratingExpandoMetaClassTests extends GroovyTestCase { [MSG]The ABC score for class [org.codehaus.groovy.grails.documentation.MetadataGeneratingExpandoMetaClassTests] is [69.0] |
UnusedImport | 3 | 3 | [SRC]import groovy.xml.StreamingMarkupBuilder |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.commons.ControllerArtefactHandler |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 158 | [SRC]catch(e) { [MSG]The catch block is empty |
EmptyCatchBlock | 2 | 164 | [SRC]catch(e) { [MSG]The catch block is empty |
UnnecessaryGetter | 2 | 78 | [SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl) [MSG]getLoadedClasses() can probably be rewritten as loadedClasses |
UnnecessaryGetter | 2 | 118 | [SRC]appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 150 | [SRC]GroovySystem.getMetaClassRegistry().removeMetaClass(meta..yMode.POJO)) [MSG]getMetaClassRegistry() can probably be rewritten as metaClassRegistry |
UnnecessaryGetter | 2 | 162 | [SRC]CacheManager.getInstance()?.shutdown() [MSG]getInstance() can probably be rewritten as instance |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 42 | [SRC]void testNoAssertionErrorInEvent() { [MSG]Test method 'testNoAssertionErrorInEvent' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UseAssertEqualsInsteadOfAssertTrue | 3 | 43 | [SRC]assertTrue models.size() == 1 [MSG]Replace assertTrue with a call to assertEquals() |
UseAssertEqualsInsteadOfAssertTrue | 3 | 46 | [SRC]assertTrue models.size() == 1 [MSG]Replace assertTrue with a call to assertEquals() |
UseAssertEqualsInsteadOfAssertTrue | 3 | 49 | [SRC]assertTrue models.size() == 1 [MSG]Replace assertTrue with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 27 | [SRC]void testRefreshHasOneAssociation() { [MSG]Test method 'testRefreshHasOneAssociation' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 38 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
AbcComplexity | 2 | 77 | [SRC]void testIndexBackrefMapping() { [MSG]The ABC score for method [testIndexBackrefMapping] is [62.1] |
AbcComplexity | 2 | 115 | [SRC]void testCollectionBackrefMapping() { [MSG]The ABC score for method [testCollectionBackrefMapping] is [89.1] |
AbcComplexity | 2 | 238 | [SRC]void testListMapping() { [MSG]The ABC score for method [testListMapping] is [148.2] |
UnusedVariable | 2 | 78 | [SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection") [MSG]The variable [faqSection] is not used |
UnusedVariable | 2 | 116 | [SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection") [MSG]The variable [faqSection] is not used |
UnusedVariable | 2 | 166 | [SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection") [MSG]The variable [faqSection] is not used |
UnusedVariable | 2 | 188 | [SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection") [MSG]The variable [faqSection] is not used |
UnusedVariable | 2 | 207 | [SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection") [MSG]The variable [faqSection] is not used |
UnusedVariable | 2 | 295 | [SRC]SimpleValue indexColumnValue = indexColumn.getValue() [MSG]The variable [indexColumnValue] is not used |
UnnecessaryGetter | 2 | 93 | [SRC]assertNull elementsIndexBackref.getCascade() [MSG]getCascade() can probably be rewritten as cascade |
UnnecessaryGetter | 2 | 94 | [SRC]assertEquals CascadeStyle.NONE, elementsIndexBackref.getCascadeStyle() [MSG]getCascadeStyle() can probably be rewritten as cascadeStyle |
UnnecessaryGetter | 2 | 95 | [SRC]assertEquals "TestFaqSection.elements", elementsIndexBa..ectionRole() [MSG]getCollectionRole() can probably be rewritten as collectionRole |
UnnecessaryGetter | 2 | 96 | [SRC]assertEquals 1, elementsIndexBackref.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 97 | [SRC]assertEquals "TestFaqSection", elementsIndexBackref.getEntityName() [MSG]getEntityName() can probably be rewritten as entityName |
UnnecessaryGetter | 2 | 98 | [SRC]assertEquals PropertyGeneration.NEVER, elementsIndexBack..Generation() [MSG]getGeneration() can probably be rewritten as generation |
UnnecessaryGetter | 2 | 99 | [SRC]assertEquals "_elementsIndexBackref", elementsIndexBackref.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 100 | [SRC]assertNull elementsIndexBackref.getNodeName() [MSG]getNodeName() can probably be rewritten as nodeName |
UnnecessaryGetter | 2 | 101 | [SRC]assertNull elementsIndexBackref.getPropertyAccessorName() [MSG]getPropertyAccessorName() can probably be rewritten as propertyAccessorName |
UnnecessaryGetter | 2 | 102 | [SRC]assertEquals IntegerType, elementsIndexBackref.getType().getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 103 | [SRC]assertEquals SimpleValue, elementsIndexBackref.getValue().getClass() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 105 | [SRC]SimpleValue value = elementsIndexBackref.getValue() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 131 | [SRC]assertNull elementsBackref.getCascade() [MSG]getCascade() can probably be rewritten as cascade |
UnnecessaryGetter | 2 | 132 | [SRC]assertEquals CascadeStyle.NONE, elementsBackref.getCascadeStyle() [MSG]getCascadeStyle() can probably be rewritten as cascadeStyle |
UnnecessaryGetter | 2 | 133 | [SRC]assertEquals "TestFaqSection.elements", elementsBackref...ectionRole() [MSG]getCollectionRole() can probably be rewritten as collectionRole |
UnnecessaryGetter | 2 | 134 | [SRC]assertEquals 1, elementsBackref.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 135 | [SRC]assertEquals "TestFaqSection", elementsBackref.getEntityName() [MSG]getEntityName() can probably be rewritten as entityName |
UnnecessaryGetter | 2 | 136 | [SRC]assertEquals PropertyGeneration.NEVER, elementsBackref.getGeneration() [MSG]getGeneration() can probably be rewritten as generation |
UnnecessaryGetter | 2 | 137 | [SRC]assertEquals "_TestFaqSection_elementsBackref", elements..ef.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 138 | [SRC]assertNull elementsBackref.getNodeName() [MSG]getNodeName() can probably be rewritten as nodeName |
UnnecessaryGetter | 2 | 139 | [SRC]assertEquals "TestFaqElement", elementsBackref.getPersis..tClassName() [MSG]getClassName() can probably be rewritten as className |
UnnecessaryGetter | 2 | 139 | [SRC]assertEquals "TestFaqElement", elementsBackref.getPersis..tClassName() [MSG]getPersistentClass() can probably be rewritten as persistentClass |
UnnecessaryGetter | 2 | 140 | [SRC]assertNull elementsBackref.getPropertyAccessorName() [MSG]getPropertyAccessorName() can probably be rewritten as propertyAccessorName |
UnnecessaryGetter | 2 | 141 | [SRC]assertEquals LongType, elementsBackref.getType().getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 142 | [SRC]assertEquals DependantValue, elementsBackref.getValue().getClass() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 144 | [SRC]DependantValue value = elementsBackref.getValue() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 152 | [SRC]assertEquals 1,value.getColumnInsertability().size() [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 153 | [SRC]assertTrue value.getColumnInsertability()[0] [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 154 | [SRC]assertEquals 1,value.getColumnUpdateability().size() [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 155 | [SRC]assertTrue value.getColumnUpdateability()[0] [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 157 | [SRC]assertEquals 1, value.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 158 | [SRC]assertEquals FetchMode.SELECT, value.getFetchMode() [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 159 | [SRC]assertNull value.getForeignKeyName() [MSG]getForeignKeyName() can probably be rewritten as foreignKeyName |
UnnecessaryGetter | 2 | 160 | [SRC]assertEquals "assigned", value.getIdentifierGeneratorStrategy() [MSG]getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy |
UnnecessaryGetter | 2 | 161 | [SRC]assertNull value.getNullValue() [MSG]getNullValue() can probably be rewritten as nullValue |
UnnecessaryGetter | 2 | 162 | [SRC]assertEquals LongType, value.getType().getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 180 | [SRC]assertEquals "none", section.getCascade() [MSG]getCascade() can probably be rewritten as cascade |
UnnecessaryGetter | 2 | 181 | [SRC]assertEquals CascadeStyle.NONE, section.getCascadeStyle() [MSG]getCascadeStyle() can probably be rewritten as cascadeStyle |
UnnecessaryGetter | 2 | 182 | [SRC]assertEquals 1, section.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 183 | [SRC]assertEquals PropertyGeneration.NEVER, section.getGeneration() [MSG]getGeneration() can probably be rewritten as generation |
UnnecessaryGetter | 2 | 184 | [SRC]assertEquals "section", section.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 191 | [SRC]Column sectionColumn = section.getColumnIterator().next() [MSG]getColumnIterator() can probably be rewritten as columnIterator |
UnnecessaryGetter | 2 | 193 | [SRC]assertEquals "section_id", sectionColumn.getCanonicalName() [MSG]getCanonicalName() can probably be rewritten as canonicalName |
UnnecessaryGetter | 2 | 194 | [SRC]assertNull sectionColumn.getCheckConstraint() [MSG]getCheckConstraint() can probably be rewritten as checkConstraint |
UnnecessaryGetter | 2 | 195 | [SRC]assertNull sectionColumn.getComment() [MSG]getComment() can probably be rewritten as comment |
UnnecessaryGetter | 2 | 196 | [SRC]assertNull sectionColumn.getDefaultValue() [MSG]getDefaultValue() can probably be rewritten as defaultValue |
UnnecessaryGetter | 2 | 197 | [SRC]assertEquals 255, sectionColumn.getLength() [MSG]getLength() can probably be rewritten as length |
UnnecessaryGetter | 2 | 198 | [SRC]assertEquals "section_id", sectionColumn.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 199 | [SRC]assertEquals 19, sectionColumn.getPrecision() [MSG]getPrecision() can probably be rewritten as precision |
UnnecessaryGetter | 2 | 200 | [SRC]assertEquals "section_id", sectionColumn.getQuotedName() [MSG]getQuotedName() can probably be rewritten as quotedName |
UnnecessaryGetter | 2 | 201 | [SRC]assertEquals 2, sectionColumn.getScale() [MSG]getScale() can probably be rewritten as scale |
UnnecessaryGetter | 2 | 202 | [SRC]assertEquals "section_id", sectionColumn.getText() [MSG]getText() can probably be rewritten as text |
UnnecessaryGetter | 2 | 203 | [SRC]assertEquals 0, sectionColumn.getTypeIndex() [MSG]getTypeIndex() can probably be rewritten as typeIndex |
UnnecessaryGetter | 2 | 211 | [SRC]ManyToOne manyToOne = section.getValue() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 212 | [SRC]assertEquals 1,manyToOne.getColumnInsertability().size() [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 213 | [SRC]assertTrue manyToOne.getColumnInsertability()[0] [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 214 | [SRC]assertEquals 1,manyToOne.getColumnUpdateability().size() [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 215 | [SRC]assertTrue manyToOne.getColumnUpdateability()[0] [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 227 | [SRC]assertEquals 1, manyToOne.getConstraintColumns().size() [MSG]getConstraintColumns() can probably be rewritten as constraintColumns |
UnnecessaryGetter | 2 | 228 | [SRC]assertEquals FetchMode.DEFAULT, manyToOne.getFetchMode() [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 229 | [SRC]assertNull manyToOne.getForeignKeyName() [MSG]getForeignKeyName() can probably be rewritten as foreignKeyName |
UnnecessaryGetter | 2 | 230 | [SRC]assertEquals "assigned", manyToOne.getIdentifierGeneratorStrategy() [MSG]getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy |
UnnecessaryGetter | 2 | 231 | [SRC]assertNull manyToOne.getNullValue() [MSG]getNullValue() can probably be rewritten as nullValue |
UnnecessaryGetter | 2 | 232 | [SRC]assertEquals "TestFaqSection", manyToOne.getReferencedEntityName() [MSG]getReferencedEntityName() can probably be rewritten as referencedEntityName |
UnnecessaryGetter | 2 | 233 | [SRC]assertNull manyToOne.getReferencedPropertyName() [MSG]getReferencedPropertyName() can probably be rewritten as referencedPropertyName |
UnnecessaryGetter | 2 | 234 | [SRC]assertEquals ManyToOneType, manyToOne.getType().getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 235 | [SRC]assertEquals "TestFaqSection", manyToOne.getTypeName() [MSG]getTypeName() can probably be rewritten as typeName |
UnnecessaryGetter | 2 | 265 | [SRC]assertEquals 0,list.getBaseIndex() [MSG]getBaseIndex() can probably be rewritten as baseIndex |
UnnecessaryGetter | 2 | 267 | [SRC]Table t = list.getCollectionTable() [MSG]getCollectionTable() can probably be rewritten as collectionTable |
UnnecessaryGetter | 2 | 269 | [SRC]assertEquals 0, list.getColumnInsertability().size() [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 270 | [SRC]assertNull list.getCacheConcurrencyStrategy() [MSG]getCacheConcurrencyStrategy() can probably be rewritten as cacheConcurrencyStrategy |
UnnecessaryGetter | 2 | 271 | [SRC]assertEquals "TestFaqSection.elements", list.getCacheRegionName() [MSG]getCacheRegionName() can probably be rewritten as cacheRegionName |
UnnecessaryGetter | 2 | 272 | [SRC]assertEquals 0,list.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 273 | [SRC]assertEquals 0, list.getColumnUpdateability().size() [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 274 | [SRC]assertNull list.getElementNodeName() [MSG]getElementNodeName() can probably be rewritten as elementNodeName |
UnnecessaryGetter | 2 | 275 | [SRC]SimpleValue index = list.getIndex() [MSG]getIndex() can probably be rewritten as index |
UnnecessaryGetter | 2 | 277 | [SRC]assertEquals 1,index.getColumnInsertability().size() [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 278 | [SRC]assertTrue index.getColumnInsertability()[0] [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 279 | [SRC]assertEquals 1,index.getColumnUpdateability().size() [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 280 | [SRC]assertTrue index.getColumnUpdateability()[0] [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 282 | [SRC]assertEquals 1, index.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 284 | [SRC]Column indexColumn = index.getColumnIterator().next() [MSG]getColumnIterator() can probably be rewritten as columnIterator |
UnnecessaryGetter | 2 | 285 | [SRC]assertEquals "elements_idx", indexColumn.getCanonicalName() [MSG]getCanonicalName() can probably be rewritten as canonicalName |
UnnecessaryGetter | 2 | 286 | [SRC]assertNull indexColumn.getCheckConstraint() [MSG]getCheckConstraint() can probably be rewritten as checkConstraint |
UnnecessaryGetter | 2 | 287 | [SRC]assertNull indexColumn.getComment() [MSG]getComment() can probably be rewritten as comment |
UnnecessaryGetter | 2 | 288 | [SRC]assertNull indexColumn.getDefaultValue() [MSG]getDefaultValue() can probably be rewritten as defaultValue |
UnnecessaryGetter | 2 | 289 | [SRC]assertEquals 255, indexColumn.getLength() [MSG]getLength() can probably be rewritten as length |
UnnecessaryGetter | 2 | 290 | [SRC]assertEquals "elements_idx", indexColumn.getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 291 | [SRC]assertEquals 19, indexColumn.getPrecision() [MSG]getPrecision() can probably be rewritten as precision |
UnnecessaryGetter | 2 | 292 | [SRC]assertEquals "elements_idx", indexColumn.getQuotedName() [MSG]getQuotedName() can probably be rewritten as quotedName |
UnnecessaryGetter | 2 | 293 | [SRC]assertEquals 2, indexColumn.getScale() [MSG]getScale() can probably be rewritten as scale |
UnnecessaryGetter | 2 | 294 | [SRC]assertEquals "elements_idx", indexColumn.getText() [MSG]getText() can probably be rewritten as text |
UnnecessaryGetter | 2 | 295 | [SRC]SimpleValue indexColumnValue = indexColumn.getValue() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 297 | [SRC]assertEquals FetchMode.SELECT, index.getFetchMode() [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 298 | [SRC]assertNull index.getForeignKeyName() [MSG]getForeignKeyName() can probably be rewritten as foreignKeyName |
UnnecessaryGetter | 2 | 299 | [SRC]assertEquals "assigned", index.getIdentifierGeneratorStrategy() [MSG]getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy |
UnnecessaryGetter | 2 | 300 | [SRC]assertNull index.getNullValue() [MSG]getNullValue() can probably be rewritten as nullValue |
UnnecessaryGetter | 2 | 301 | [SRC]assertEquals IntegerType, index.getType()?.getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 302 | [SRC]assertEquals "integer", index.getTypeName() [MSG]getTypeName() can probably be rewritten as typeName |
UnnecessaryGetter | 2 | 303 | [SRC]assertNull index.getTypeParameters() [MSG]getTypeParameters() can probably be rewritten as typeParameters |
UnnecessaryGetter | 2 | 305 | [SRC]KeyValue key = list.getKey() [MSG]getKey() can probably be rewritten as key |
UnnecessaryGetter | 2 | 307 | [SRC]assertEquals 1,key.getColumnInsertability().size() [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 308 | [SRC]assertTrue key.getColumnInsertability()[0] [MSG]getColumnInsertability() can probably be rewritten as columnInsertability |
UnnecessaryGetter | 2 | 309 | [SRC]assertEquals 1,key.getColumnUpdateability().size() [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 310 | [SRC]assertTrue key.getColumnUpdateability()[0] [MSG]getColumnUpdateability() can probably be rewritten as columnUpdateability |
UnnecessaryGetter | 2 | 312 | [SRC]assertEquals 1, key.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 313 | [SRC]assertEquals FetchMode.SELECT, key.getFetchMode() [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 314 | [SRC]assertNull key.getNullValue() [MSG]getNullValue() can probably be rewritten as nullValue |
UnnecessaryGetter | 2 | 315 | [SRC]assertEquals LongType, key.getType().getClass() [MSG]getType() can probably be rewritten as type |
UnnecessaryGetter | 2 | 317 | [SRC]OneToMany element = list.getElement() [MSG]getElement() can probably be rewritten as element |
UnnecessaryGetter | 2 | 319 | [SRC]assertEquals 1, element.getColumnSpan() [MSG]getColumnSpan() can probably be rewritten as columnSpan |
UnnecessaryGetter | 2 | 320 | [SRC]assertEquals FetchMode.JOIN, element.getFetchMode() [MSG]getFetchMode() can probably be rewritten as fetchMode |
UnnecessaryGetter | 2 | 321 | [SRC]PersistentClass associatedClass = element.getAssociatedClass() [MSG]getAssociatedClass() can probably be rewritten as associatedClass |
UnnecessaryGetter | 2 | 322 | [SRC]assertEquals "TestFaqElement", associatedClass.getClassName() [MSG]getClassName() can probably be rewritten as className |
UnnecessaryGetter | 2 | 323 | [SRC]assertEquals ManyToOneType, element.getType().getClass() [MSG]getType() can probably be rewritten as type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 45 | [SRC]section = session.get(sectionClass.getClazz(),1L) [MSG]getClazz() can probably be rewritten as clazz |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 67 | [SRC]assertEquals uploadsProperty.getOtherSide(), recipientProperty [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 68 | [SRC]assertEquals recipientProperty.getOtherSide(), uploadsProperty [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 80 | [SRC]assertEquals uploadLogsProperty.getOtherSide(), senderProperty [MSG]getOtherSide() can probably be rewritten as otherSide |
UnnecessaryGetter | 2 | 81 | [SRC]assertEquals senderProperty.getOtherSide(), uploadLogsProperty [MSG]getOtherSide() can probably be rewritten as otherSide |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 35 | [SRC]void testSaveAndLoad() { [MSG]Test method 'testSaveAndLoad' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 52 | [SRC]def configItemClass = ga.getDomainClass("ConfigurationItem").clazz [MSG]The variable [configItemClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 44 | [SRC]def otherSide = collection.getOtherSide() [MSG]getOtherSide() can probably be rewritten as otherSide |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 55 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 37 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 85 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 31 | [SRC]void testCascadingSaveAndUniqueConstraint() { [MSG]Test method 'testCascadingSaveAndUniqueConstraint' makes no assertions |
UnusedVariable | 2 | 34 | [SRC]def face = faceClass.newInstance(nose:noseClass.newInstance()).save() [MSG]The variable [face] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 18 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 28 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 33 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 32 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 28 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 26 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 27 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 137 | [SRC]def criteriaInstance = getInstance() [MSG]getInstance() can probably be rewritten as instance |
UnnecessaryGetter | 2 | 151 | [SRC]def criteriaInstance = getInstance() [MSG]getInstance() can probably be rewritten as instance |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 33 | [SRC]def Plant = ga.getDomainClass("Plant").clazz [MSG]The variable [Plant] is not used |
UnusedVariable | 2 | 67 | [SRC]def Plant = ga.getDomainClass("Plant").clazz [MSG]The variable [Plant] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 38 | [SRC]def twoClass = ga.getDomainClass("CustomCascadeMappingTwo").clazz [MSG]The variable [twoClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 47 | [SRC]void testCyclicManyToManyWithInheritance() { [MSG]Test method 'testCyclicManyToManyWithInheritance' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 11 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 27 | [SRC]sessionFactoryConnection = sessionFactoryConnection.getW..Connection() [MSG]getWrappedConnection() can probably be rewritten as wrappedConnection |
UnnecessaryGetter | 2 | 30 | [SRC]sessionFactoryConnection = sessionFactoryConnection.getT..Connection() [MSG]getTargetConnection() can probably be rewritten as targetConnection |
UnnecessaryGetter | 2 | 36 | [SRC]dataSourceConnection = dataSourceConnection.getTargetConnection() [MSG]getTargetConnection() can probably be rewritten as targetConnection |
UnnecessaryGetter | 2 | 39 | [SRC]dataSourceConnection = dataSourceConnection.getWrappedConnection() [MSG]getWrappedConnection() can probably be rewritten as wrappedConnection |
UnnecessaryGetter | 2 | 42 | [SRC]dataSourceConnection = dataSourceConnection.getTargetConnection() [MSG]getTargetConnection() can probably be rewritten as targetConnection |
UseAssertSameInsteadOfAssertTrue | 3 | 48 | [SRC]assertTrue sessionFactoryConnection.is(dataSourceConnection) [MSG]assert method can be simplified using the assertSame method |
UseAssertSameInsteadOfAssertTrue | 3 | 49 | [SRC]assertFalse unproxiedConnection.is(dataSourceConnection) [MSG]assert method can be simplified using the assertSame method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 80 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 30 | [SRC]def Book = ga.getDomainClass("DefaultSortOrderForCollect..Book").clazz [MSG]The variable [Book] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 32 | [SRC]def bookClass = ga.getDomainClass("DeleteBook").clazz [MSG]The variable [bookClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 25 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 4 | [SRC]import org.codehaus.groovy.grails.plugins.MockGrailsPluginManager |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.plugins.GrailsPlugin |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 45 | [SRC]def Child2 = ga.getDomainClass("Child2").clazz [MSG]The variable [Child2] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 116 | [SRC]def Root = ga.getDomainClass("Root").clazz [MSG]The variable [Root] is not used |
UnnecessaryObjectReferences | 2 | 111 | [SRC]rs.close() [MSG]The code could be more concise by using a with() or identity() block |
UseAssertNullInsteadOfAssertEquals | 3 | 101 | [SRC]assertEquals null, rs.getString("tree") [MSG]assertEquals can be simplified using assertNull |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 170 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 38 | [SRC]void testNoModifyVersion() { [MSG]Test method 'testNoModifyVersion' makes no assertions |
UnusedVariable | 2 | 152 | [SRC]def success = false [MSG]The variable [success] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 272 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 48 | [SRC]assertEquals FlushMode.AUTO, session.getFlushMode() [MSG]getFlushMode() can probably be rewritten as flushMode |
UnnecessaryGetter | 2 | 58 | [SRC]assertEquals FlushMode.MANUAL, session.getFlushMode() [MSG]getFlushMode() can probably be rewritten as flushMode |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 34 | [SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz [MSG]The variable [tagClass] is not used |
UnusedVariable | 2 | 51 | [SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz [MSG]The variable [tagClass] is not used |
UnusedVariable | 2 | 68 | [SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz [MSG]The variable [tagClass] is not used |
UnusedVariable | 2 | 84 | [SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz [MSG]The variable [tagClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 81 | [SRC]def con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 104 | [SRC]def con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 10 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 57 | [SRC]void testEvents() { [MSG]The ABC score for method [testEvents] is [95.2] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 26 | [SRC]def init() { [MSG]The method init is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ImportFromSamePackage | 3 | 3 | [SRC]import org.codehaus.groovy.grails.orm.hibernate.Abstract..bernateTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 26 | [SRC]void testUsingHibernateCache() { [MSG]The ABC score for method [testUsingHibernateCache] is [68.1] |
AbcComplexity | 2 | 79 | [SRC]void testUsingHibernateCacheWithNamedParams() { [MSG]The ABC score for method [testUsingHibernateCacheWithNamedParams] is [68.1] |
UnnecessaryObjectReferences | 2 | 63 | [SRC]theClass.findAll("from FindAllTest where name = 'Angus'"..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 68 | [SRC]theClass.findAll("from FindAllTest where name = 'Malcolm..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 73 | [SRC]theClass.findAll("from FindAllTest where name = 'Malcolm..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 116 | [SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 121 | [SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 126 | [SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 86 | [SRC]void testBooleanPropertyQuery() { [MSG]The ABC score for method [testBooleanPropertyQuery] is [123.6] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 5 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
AbcComplexity | 2 | 27 | [SRC]void testUsingHibernateCache() { [MSG]The ABC score for method [testUsingHibernateCache] is [103.1] |
UnnecessaryObjectReferences | 2 | 64 | [SRC]theClass.find("from FindMethodTestClass where one = 'Ang..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 69 | [SRC]theClass.find("from FindMethodTestClass where one = 'Mal..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 74 | [SRC]theClass.find("from FindMethodTestClass where one = 'Mal..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 79 | [SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 84 | [SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 89 | [SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 94 | [SRC]theClass.find("from FindMethodTestClass where one = :nam..che: false]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 99 | [SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true]) [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 40 | [SRC]List retrieveListOfNames() { ['bart'] } [MSG]The method retrieveListOfNames is public but not a test method |
MethodCount | 2 | 11 | [SRC]class HibernateCriteriaBuilderTests extends AbstractGrai..rnateTests { [MSG]Class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests has 49 methods |
UnusedVariable | 2 | 868 | [SRC]List results = parse( "{ " + [MSG]The variable [results] is not used |
UnusedVariable | 2 | 896 | [SRC]List results = parse("{ " + [MSG]The variable [results] is not used |
UnnecessaryGetter | 2 | 301 | [SRC]assertEquals clazzName , result.getClass().getName() [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 2 | 1475 | [SRC]GroovyClassLoader cl = grailsApplication.getClassLoader() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 1492 | [SRC]Class tc = grailsApplication.getArtefact(DomainClassArte..).getClazz() [MSG]getClazz() can probably be rewritten as clazz |
UnusedImport | 3 | 4 | [SRC]import org.codehaus.groovy.runtime.InvokerInvocationException |
ClassSize | 3 | 11 | [MSG]Class "HibernateCriteriaBuilderTests" is 1494 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 49 | [SRC]void onPostInsert(PostInsertEvent event) {} [MSG]The method onPostInsert is both empty and not marked with @Override |
EmptyMethod | 2 | 50 | [SRC]void onPostDelete(PostDeleteEvent event) {} [MSG]The method onPostDelete is both empty and not marked with @Override |
UnusedImport | 3 | 8 | [SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodCount | 2 | 15 | [SRC]class HibernateMappingBuilderTests extends GroovyTestCase { [MSG]Class org.codehaus.groovy.grails.orm.hibernate.HibernateMappingBuilderTests has 47 methods |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 35 | [SRC]Class AttributeA = ga.getDomainClass("AttributeA").clazz [MSG]The variable [AttributeA] is not used |
UnusedVariable | 2 | 64 | [SRC]Class A = ga.getDomainClass("A").clazz [MSG]The variable [A] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 23 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 9 | [SRC]def authorClass = ga.getDomainClass("Author") [MSG]The variable [authorClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 43 | [SRC]def Category = ga.getDomainClass("Category").clazz [MSG]The variable [Category] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 54 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 45 | [SRC]def ids = [a1.id, a2.id, a2.id] [MSG]The variable [ids] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 95 | [SRC]assertTrue 'should not be a proxy', loadInstance.getClas..s(className) [MSG]Explicit call to loadInstance.getClass().name.equals(className) method can be rewritten as loadInstance.getClass().name == (className) |
ExplicitCallToEqualsMethod | 2 | 113 | [SRC]assertTrue 'should not be a proxy', getInstance.getClass..s(className) [MSG]Explicit call to getInstance.getClass().name.equals(className) method can be rewritten as getInstance.getClass().name == (className) |
ExplicitCallToEqualsMethod | 2 | 166 | [SRC]assertFalse 'should be a proxy', instance.getClass().nam..s(className) [MSG]Explicit call to instance.getClass().name.equals(className) method can be rewritten as instance.getClass().name == (className) |
UnusedVariable | 2 | 122 | [SRC]def o = clazz.newInstance() [MSG]The variable [o] is not used |
UnnecessaryGetter | 2 | 44 | [SRC]assertEquals "id is accessible even if object doesn't ex..ance.getId() [MSG]getId() can probably be rewritten as id |
UnnecessaryGetter | 2 | 66 | [SRC]assertEquals "id is accessible even if object doesn't ex..ance.getId() [MSG]getId() can probably be rewritten as id |
UnusedImport | 3 | 7 | [SRC]import org.springframework.orm.hibernate3.HibernateObjec..ureException |
UseAssertSameInsteadOfAssertTrue | 3 | 92 | [SRC]assertTrue getInstance.is(loadInstance) [MSG]assert method can be simplified using the assertSame method |
UseAssertSameInsteadOfAssertTrue | 3 | 111 | [SRC]assertFalse getInstance.is(loadInstance) [MSG]assert method can be simplified using the assertSame method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 72 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
AbcComplexity | 2 | 20 | [SRC]void testManyToManyMapping() { [MSG]The ABC score for method [testManyToManyMapping] is [62.1] |
UnusedImport | 3 | 3 | [SRC]import junit.framework.TestCase |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 28 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 114 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 32 | [SRC]def ShapeAttribute = ga.getDomainClass("ShapeAttribute").clazz [MSG]The variable [ShapeAttribute] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 28 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 30 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 90 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UseAssertFalseInsteadOfNegation | 2 | 26 | [SRC]assertTrue !book.hasErrors() [MSG]assertTrue(!book.hasErrors()) can be simplified to assertFalse(book.hasErrors()) |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 26 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 42 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UseAssertFalseInsteadOfNegation | 2 | 77 | [SRC]assertTrue "should have inherited blank from shared cons..", !cp.blank [MSG]assertTrue(!cp.blank) can be simplified to assertFalse(cp.blank) |
UseAssertFalseInsteadOfNegation | 2 | 79 | [SRC]assertTrue "should not have inherited matches from [anot..", !cp.email [MSG]assertTrue(!cp.email) can be simplified to assertFalse(cp.email) |
ChainedTest | 2 | 83 | [SRC]testMappingDefaults() [MSG]The test method testMappingDefaults() is being invoked explicitly from within a unit test. Tests should be isolated and not dependent on one another |
UseAssertEqualsInsteadOfAssertTrue | 3 | 78 | [SRC]assertTrue "size should have been in the specified range..0 == cp.size [MSG]Replace assertTrue with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 12 | [SRC]void testTableMapping() { [MSG]Test method 'testTableMapping' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 291 | [SRC]void testCompositeIdAssignedGenerator_GRAILS_6289() { [MSG]Test method 'testCompositeIdAssignedGenerator_GRAILS_6289' makes no assertions |
UnusedVariable | 2 | 211 | [SRC]def personClass = ga.getDomainClass("MappedPerson").clazz [MSG]The variable [personClass] is not used |
UnnecessaryGetter | 2 | 17 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 35 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 82 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 122 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 126 | [SRC]def metadata = result.getMetaData() [MSG]getMetaData() can probably be rewritten as metaData |
UnnecessaryGetter | 2 | 161 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 200 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 228 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 256 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 281 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
UnnecessaryGetter | 2 | 311 | [SRC]connection = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
MethodSize | 3 | 324 | [MSG]Method "onSetUp" is 183 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 158 | [SRC]void testSorting() { [MSG]The ABC score for method [testSorting] is [106.2] |
AbcComplexity | 2 | 539 | [SRC]void testChainingNamedQueries() { [MSG]The ABC score for method [testChainingNamedQueries] is [64.0] |
MethodCount | 2 | 9 | [SRC]class NamedCriteriaTests extends AbstractGrailsHibernateTests { [MSG]Class org.codehaus.groovy.grails.orm.hibernate.NamedCriteriaTests has 43 methods |
UnusedVariable | 2 | 692 | [SRC]def titles = publications.title [MSG]The variable [titles] is not used |
UnnecessaryIntegerInstantiation | 2 | 967 | [SRC]def pubs = publicationClass.recentPublications.list(max:.. Integer(5)) [MSG]Can be rewritten as 5 or 5i |
ClassSize | 3 | 9 | [MSG]Class "NamedCriteriaTests" is 1095 lines |
MethodSize | 3 | 11 | [MSG]Method "onSetUp" is 122 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 9 | [SRC]import org.hibernate.type.YesNoType |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass |
UnusedImport | 3 | 10 | [SRC]import org.codehaus.groovy.grails.commons.ConfigurationHolder |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder |
UnusedImport | 3 | 7 | [SRC]import org.codehaus.groovy.grails.plugins.GrailsPlugin |
UnusedImport | 3 | 6 | [SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty |
UnusedImport | 3 | 4 | [SRC]import org.codehaus.groovy.grails.orm.hibernate.cfg.Mapping |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 33 | [SRC]def Root = ga.getDomainClass("OrgRoot").clazz [MSG]The variable [Root] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 47 | [SRC]void testPersistAssociationWithCompositeId() { [MSG]Test method 'testPersistAssociationWithCompositeId' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 57 | [SRC]void testUpdateInverseSide() { [MSG]Test method 'testUpdateInverseSide' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.springframework.util.Log4jConfigurer |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 37 | [SRC]def orgB = Organization.newInstance(name:'Org B', descri..org1).save() [MSG]The variable [orgB] is not used |
UnusedVariable | 2 | 38 | [SRC]def orgaa = Organization.newInstance(name:'Org aa', desc..orgA).save() [MSG]The variable [orgaa] is not used |
UnusedVariable | 2 | 42 | [SRC]def xorgB = ExtOrganization.newInstance(name:'ExtOrg B',..org1).save() [MSG]The variable [xorgB] is not used |
UnusedVariable | 2 | 43 | [SRC]def xorgaa = ExtOrganization.newInstance(name:'ExtOrg aa..orgA).save() [MSG]The variable [xorgaa] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToEqualsMethod | 2 | 290 | [SRC]assertFalse "fred".equals(obj.getProperty("firstName")) [MSG]Explicit call to fred.equals(obj.getProperty(firstName)) method can be rewritten as fred == (obj.getProperty(firstName)) |
ExplicitCallToEqualsMethod | 2 | 291 | [SRC]assertFalse "fred".equals(obj2.getProperty("firstName")) [MSG]Explicit call to fred.equals(obj2.getProperty(firstName)) method can be rewritten as fred == (obj2.getProperty(firstName)) |
AbcComplexity | 2 | 133 | [SRC]void testFindPersistentMethods() { [MSG]The ABC score for method [testFindPersistentMethods] is [71.9] |
AbcComplexity | 2 | 240 | [SRC]void testFindByPersistentMethods() { [MSG]The ABC score for method [testFindByPersistentMethods] is [111.0] |
AbcComplexity | 2 | 480 | [SRC]void testFindAllPersistentMethod() { [MSG]The ABC score for method [testFindAllPersistentMethod] is [182.6] |
AbcComplexity | 2 | 745 | [SRC]void testExecuteQueryMethod() { [MSG]The ABC score for method [testExecuteQueryMethod] is [88.2] |
UnusedVariable | 2 | 760 | [SRC]MetaClass domain = obj.getMetaClass() [MSG]The variable [domain] is not used |
UnnecessaryGetter | 2 | 448 | [SRC]returnValue = domainClass.getAll() [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 2 | 760 | [SRC]MetaClass domain = obj.getMetaClass() [MSG]getMetaClass() can probably be rewritten as metaClass |
UnusedImport | 3 | 7 | [SRC]import org.codehaus.groovy.runtime.InvokerInvocationException |
MethodSize | 3 | 133 | [MSG]Method "testFindPersistentMethods" is 106 lines |
MethodSize | 3 | 240 | [MSG]Method "testFindByPersistentMethods" is 134 lines |
MethodSize | 3 | 480 | [MSG]Method "testFindAllPersistentMethod" is 210 lines |
MethodSize | 3 | 745 | [MSG]Method "testExecuteQueryMethod" is 103 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 43 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 11 | [SRC]void testLockMethod() { [MSG]Test method 'testLockMethod' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 293 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
JUnitPublicNonTestMethod | 2 | 353 | [SRC]void onTearDown() { [MSG]The method onTearDown is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 15 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 10 | [SRC]def bookClass = ga.getDomainClass("Book") [MSG]The variable [bookClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 35 | [SRC]def sub1Class = ga.getDomainClass("TablePerHierarchSub1").clazz [MSG]The variable [sub1Class] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 37 | [SRC]void testMappedIdentityForSubclass() { [MSG]Test method 'testMappedIdentityForSubclass' makes no assertions |
UnnecessaryGetter | 2 | 42 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 37 | [SRC]void testGeneratedTables() { [MSG]Test method 'testGeneratedTables' makes no assertions |
UnnecessaryGetter | 2 | 42 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 41 | [SRC]void testAssociation() { [MSG]The ABC score for method [testAssociation] is [83.9] |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 100 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
AbcComplexity | 2 | 11 | [SRC]void testManyToManyMapping() { [MSG]The ABC score for method [testManyToManyMapping] is [103.3] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 23 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 7 | [SRC]void testTwoUniOneToManys() { [MSG]Test method 'testTwoUniOneToManys' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 22 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnnecessaryObjectReferences | 2 | 16 | [SRC]b.discard() [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 26 | [SRC]void testAnnotatedOneToManyDomain() { [MSG]Test method 'testAnnotatedOneToManyDomain' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 26 | [SRC]void testUnidirectionalOneToManyWithExplicityJoinTable() { [MSG]Test method 'testUnidirectionalOneToManyWithExplicityJoinTable' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 33 | [SRC]def Child = ga.getDomainClass("Child").clazz [MSG]The variable [Child] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 148 | [SRC]con = ds.getConnection() [MSG]getConnection() can probably be rewritten as connection |
MethodSize | 3 | 10 | [MSG]Method "onSetUp" is 112 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 133 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 5 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 40 | [SRC]void testVersionColumnMapping() { [MSG]Test method 'testVersionColumnMapping' makes no assertions |
UnusedImport | 3 | 3 | [SRC]import java.sql.Connection |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 24 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 33 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 221 | [SRC]void testOneToManyBindingWithSubscriptOperatorAndExistingInstance() { [MSG]The ABC score for method [testOneToManyBindingWithSubscriptOperatorAndExistingInstance] is [75.0] |
AbcComplexity | 2 | 276 | [SRC]void testOneToManyBindingWithSubscriptOperatorAndNewInstance() { [MSG]The ABC score for method [testOneToManyBindingWithSubscriptOperatorAndNewInstance] is [72.6] |
UnusedVariable | 2 | 157 | [SRC]def book = Book.newInstance(title: "Pattern Recognition"..Error: true) [MSG]The variable [book] is not used |
UnnecessaryObjectReferences | 2 | 287 | [SRC]request.addParameter("books[0].reviewers['bob'].name", "Bob Bloggs") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 288 | [SRC]request.addParameter("books[0].reviewers['chuck'].name",..uck Bloggs") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 289 | [SRC]request.addParameter("books[1].title", "The Stand") [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 11 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
SerializableClassMustDefineSerialVersionUID | 2 | 6 | [SRC]class MonetaryAmount implements Serializable { [MSG]The class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmount implements Serializable but does not define a serialVersionUID |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
SerializableClassMustDefineSerialVersionUID | 2 | 6 | [SRC]class MyType implements Serializable { [MSG]The class org.codehaus.groovy.grails.orm.hibernate.cfg.MyType implements Serializable but does not define a serialVersionUID |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ImportFromSamePackage | 3 | 4 | [SRC]import org.codehaus.groovy.grails.orm.hibernate.metaclas..idateHelper; |
UnusedImport | 3 | 3 | [SRC]import groovy.mock.interceptor.MockFor |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 6 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 55 | [SRC]interceptor.destroy() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 28 | [SRC]def interceptor = getInterceptor() [MSG]getInterceptor() can probably be rewritten as interceptor |
UnnecessaryGetter | 2 | 41 | [SRC]def interceptor = getInterceptor() [MSG]getInterceptor() can probably be rewritten as interceptor |
UnnecessaryGetter | 2 | 60 | [SRC]def interceptor = getInterceptor() [MSG]getInterceptor() can probably be rewritten as interceptor |
UnnecessaryGetter | 2 | 81 | [SRC]def interceptor = getInterceptor() [MSG]getInterceptor() can probably be rewritten as interceptor |
UnusedImport | 3 | 6 | [SRC]import org.springframework.orm.hibernate3.SessionHolder |
UseAssertTrueInsteadOfAssertEquals | 3 | 29 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 31 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 33 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 35 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 37 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 42 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 45 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 47 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 49 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 51 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 54 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 56 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 70 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 72 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 74 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 93 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 95 | [SRC]assertEquals("interceptor open", true, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 97 | [SRC]assertEquals("interceptor open", false, interceptor.open) [MSG]assertEquals can be simplified using assertTrue or assertFalse |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 265 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
AbcComplexity | 2 | 40 | [SRC]void testValidation() { [MSG]The ABC score for method [testValidation] is [72.9] |
UnusedVariable | 2 | 15 | [SRC]def userClass = ga.getDomainClass("User") [MSG]The variable [userClass] is not used |
UnnecessaryObjectReferences | 2 | 50 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 52 | [SRC]user.save(true) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 63 | [SRC]user.organization = "organization1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 64 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 68 | [SRC]user.id = 123L [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 69 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 79 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 83 | [SRC]user.code = "321" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 84 | [SRC]user.login = "login1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 85 | [SRC]user.grp = "group1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 86 | [SRC]user.department = "department1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 87 | [SRC]user.organization = "organization2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 88 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 92 | [SRC]user.grp = "group2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 93 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 97 | [SRC]user.grp = "group1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 98 | [SRC]user.department = "department2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 99 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 103 | [SRC]user.login = "login2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 104 | [SRC]user.grp = "group2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 105 | [SRC]user.department = "department1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 106 | [SRC]user.organization = "organization1" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 107 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 111 | [SRC]user.organization = "organization2" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 112 | [SRC]user.validate() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 228 | [SRC]user1.save(true) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 236 | [SRC]user2.save(true) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 244 | [SRC]user3.save(true) [MSG]The code could be more concise by using a with() or identity() block |
MethodSize | 3 | 116 | [MSG]Method "testWrongUniqueParams" is 101 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessarySelfAssignment | 2 | 30 | [SRC]dataSource = dataSource [MSG]Assignment a variable to itself should be unnecessary. Remove this dead code |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 5 | [SRC]def withSpring() {} [MSG]The method withSpring is both empty and not marked with @Override |
EmptyMethod | 2 | 7 | [SRC]def withApplicationContext(ctx) {} [MSG]The method withApplicationContext is both empty and not marked with @Override |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 21 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 38 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 102 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 12 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnnecessaryObjectReferences | 2 | 45 | [SRC]gcl.parseClass("""class Child3 extends grails.test.Parent2 { [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 181 | [SRC]System.setProperty(Environment.KEY, Environment.PRODUCTION.getName()) [MSG]getName() can probably be rewritten as name |
UnusedImport | 3 | 4 | [SRC]import grails.util.BuildSettings |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 17 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 37 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 146 | [SRC]def pluginDirs = GrailsPluginUtils.getPluginDirectories() [MSG]getPluginDirectories() can probably be rewritten as pluginDirectories |
UnnecessaryGetter | 2 | 155 | [SRC]def pluginDirs = GrailsPluginUtils.getImplicitPluginDirectories() [MSG]getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories |
UnusedImport | 3 | 6 | [SRC]import org.apache.commons.io.FileUtils |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 134 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 51 | [SRC]def addressClass = ga.getDomainClass("Address") [MSG]The variable [addressClass] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 12 | [SRC]def registry = GroovySystem.getMetaClassRegistry() [MSG]getMetaClassRegistry() can probably be rewritten as metaClassRegistry |
ImportFromSamePackage | 3 | 3 | [SRC]import org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 37 | [SRC]def appCtx = configurator.configure(ctx.getServletContext()) [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 64 | [SRC]def appCtx = configurator.configure(ctx.getServletContext()) [MSG]getServletContext() can probably be rewritten as servletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 20 | [SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/sub/di..properties") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 21 | [SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 22 | [SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle.txt") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 23 | [SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle.xml") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 34 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 35 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnusedVariable | 2 | 185 | [SRC]def consoleAppender [MSG]The variable [consoleAppender] is not used |
UnnecessaryGetter | 2 | 97 | [SRC]def r = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 116 | [SRC]r = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 135 | [SRC]r = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 158 | [SRC]def root = Logger.getRootLogger() [MSG]getRootLogger() can probably be rewritten as rootLogger |
UnnecessaryGetter | 2 | 161 | [SRC]def appenders = root.getAllAppenders() [MSG]getAllAppenders() can probably be rewritten as allAppenders |
UnusedImport | 3 | 23 | [SRC]import org.apache.log4j.net.SMTPAppender |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 75 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 86 | [SRC]gcl.getLoadedClasses().find { it.name.endsWith("TagLib") }) [MSG]getLoadedClasses() can probably be rewritten as loadedClasses |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 5 | [SRC]import org.springframework.web.context.support.WebApplic..ContextUtils |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 12 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnnecessaryGetter | 2 | 113 | [SRC]springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 79 | [SRC]protected final void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 49 | [SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(),gcl) [MSG]getLoadedClasses() can probably be rewritten as loadedClasses |
UnnecessaryGetter | 2 | 72 | [SRC]appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnusedImport | 3 | 14 | [SRC]import org.codehaus.groovy.grails.plugins.PluginMetaManager |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 186 | [SRC]Class parseTestBean() { [MSG]The method parseTestBean is public but not a test method |
UnnecessaryGetter | 2 | 135 | [SRC]assertNotNull beanDef.getPropertyValues().getPropertyVal..seResource') [MSG]getPropertyValues() can probably be rewritten as propertyValues |
UnnecessaryGetter | 2 | 137 | [SRC]assertEquals "file:.", beanDef.getPropertyValues().getPr..).getValue() [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 137 | [SRC]assertEquals "file:.", beanDef.getPropertyValues().getPr..).getValue() [MSG]getPropertyValues() can probably be rewritten as propertyValues |
UnnecessaryGetter | 2 | 140 | [SRC]assertEquals "groovyPageResourceLoader", beanDef.getProp..()?.beanName [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 140 | [SRC]assertEquals "groovyPageResourceLoader", beanDef.getProp..()?.beanName [MSG]getPropertyValues() can probably be rewritten as propertyValues |
UnnecessaryGetter | 2 | 143 | [SRC]assertEquals "groovyPageResourceLoader", beanDef.getProp..()?.beanName [MSG]getValue() can probably be rewritten as value |
UnnecessaryGetter | 2 | 143 | [SRC]assertEquals "groovyPageResourceLoader", beanDef.getProp..()?.beanName [MSG]getPropertyValues() can probably be rewritten as propertyValues |
UnusedImport | 3 | 8 | [SRC]import org.springframework.core.io.FileSystemResource |
UseAssertEqualsInsteadOfAssertTrue | 3 | 119 | [SRC]assertTrue ga.config.grails.disableCommonsMultipart.size() == 0 [MSG]Replace assertTrue with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 36 | [SRC]def registry = GroovySystem.metaClassRegistry [MSG]The variable [registry] is not used |
UnusedVariable | 2 | 42 | [SRC]def registry = GroovySystem.metaClassRegistry [MSG]The variable [registry] is not used |
UnusedVariable | 2 | 48 | [SRC]def registry = GroovySystem.metaClassRegistry [MSG]The variable [registry] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 27 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 135 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UseAssertTrueInsteadOfAssertEquals | 3 | 80 | [SRC]assert mockDefinition.generateNumberCalled == true [MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled' |
UseAssertTrueInsteadOfAssertEquals | 3 | 85 | [SRC]assert mockDefinition.generateNumberCalled == true [MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled' |
UseAssertTrueInsteadOfAssertEquals | 3 | 90 | [SRC]assert mockDefinition.generateNumberCalled == true [MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled' |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 227 | [SRC]void testFilterMatching() { [MSG]The ABC score for method [testFilterMatching] is [137.4] |
MethodSize | 3 | 15 | [MSG]Method "onSetUp" is 200 lines |
MethodSize | 3 | 227 | [MSG]Method "testFilterMatching" is 127 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 87 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 29 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 29 | [SRC]def version = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 46 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 45 | [SRC]void onInit() { [MSG]The method onInit is public but not a test method |
UnusedVariable | 2 | 18 | [SRC]Class oldClass = ga.getTagLibClass("TestTagLib").getClazz() [MSG]The variable [oldClass] is not used |
UnusedVariable | 2 | 19 | [SRC]def result [MSG]The variable [result] is not used |
UnnecessaryGetter | 2 | 18 | [SRC]Class oldClass = ga.getTagLibClass("TestTagLib").getClazz() [MSG]getClazz() can probably be rewritten as clazz |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 558 | [SRC]def getCurrentGrailsVersion() { [MSG]The method getCurrentGrailsVersion is public but not a test method |
JUnitSetUpCallsSuper | 2 | 25 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 29 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTestMethodWithoutAssert | 2 | 97 | [SRC]void testPluginResolve() { [MSG]Test method 'testPluginResolve' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 348 | [SRC]void testResolveApplicationDependencies() { [MSG]Test method 'testResolveApplicationDependencies' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 671 | [SRC]void testResolve() { [MSG]Test method 'testResolve' makes no assertions |
AbcComplexity | 2 | 131 | [SRC]void testDeclarePluginDependencies() { [MSG]The ABC score for method [testDeclarePluginDependencies] is [60.4] |
MethodCount | 2 | 23 | [SRC]class IvyDependencyManagerTests extends GroovyTestCase { [MSG]Class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests has 37 methods |
UnusedVariable | 2 | 110 | [SRC]def report = manager.resolvePluginDependencies() [MSG]The variable [report] is not used |
UnusedVariable | 2 | 711 | [SRC]ModuleRevisionId junit = manager.dependencies.find { Mo.. == 'junit'} [MSG]The variable [junit] is not used |
UnnecessaryGetter | 2 | 152 | [SRC]assertEquals "1.5", dd.getDependencyRevisionId().revision [MSG]getDependencyRevisionId() can probably be rewritten as dependencyRevisionId |
UnnecessaryGetter | 2 | 159 | [SRC]assertEquals "0.5.5", dd.getDependencyRevisionId().revision [MSG]getDependencyRevisionId() can probably be rewritten as dependencyRevisionId |
UnnecessaryGetter | 2 | 166 | [SRC]assertEquals "0.5.6", dd.getDependencyRevisionId().revision [MSG]getDependencyRevisionId() can probably be rewritten as dependencyRevisionId |
UnnecessaryGetter | 2 | 227 | [SRC]assertEquals 1, dep.getModuleConfigurations().length [MSG]getModuleConfigurations() can probably be rewritten as moduleConfigurations |
UnnecessaryGetter | 2 | 377 | [SRC]assertEquals 2, manager.getApplicationDependencyDescriptors().size() [MSG]getApplicationDependencyDescriptors() can probably be rewritten as applicationDependencyDescriptors |
UnnecessaryGetter | 2 | 508 | [SRC]def grailsVersion = getCurrentGrailsVersion() [MSG]getCurrentGrailsVersion() can probably be rewritten as currentGrailsVersion |
UnnecessaryGetter | 2 | 527 | [SRC]def grailsVersion = getCurrentGrailsVersion() [MSG]getCurrentGrailsVersion() can probably be rewritten as currentGrailsVersion |
UnnecessaryGetter | 2 | 615 | [SRC]DefaultDependencyDescriptor dd = manager.getDependencyDe..tor().next() [MSG]getDependencyDescriptors() can probably be rewritten as dependencyDescriptors |
UnnecessaryGetter | 2 | 629 | [SRC]dd = manager.getDependencyDescriptors().iterator().next() [MSG]getDependencyDescriptors() can probably be rewritten as dependencyDescriptors |
UnnecessaryGetter | 2 | 644 | [SRC]DefaultDependencyDescriptor dd = manager.getPluginDepend..tor().next() [MSG]getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors |
UnnecessaryGetter | 2 | 658 | [SRC]DefaultDependencyDescriptor dd = manager.getPluginDepend..tor().next() [MSG]getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 21 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 28 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
DuplicateImport | 3 | 7 | [SRC]import org.springframework.web.context.request.* |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 32 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 38 | [SRC]viewResolver.servletContext = webRequest.getServletContext() [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 47 | [SRC]def view = viewResolver.loadView("/foo/list", Locale.getDefault()) [MSG]getDefault() can probably be rewritten as default |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 39 | [SRC]'test'] as String[], errors.getFieldError().getCodes()) [MSG]getCodes() can probably be rewritten as codes |
UnnecessaryGetter | 2 | 39 | [SRC]'test'] as String[], errors.getFieldError().getCodes()) [MSG]getFieldError() can probably be rewritten as fieldError |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 78 | [SRC]Errors validateInstance(instance, validator) { [MSG]The method validateInstance is public but not a test method |
JUnitPublicNonTestMethod | 2 | 84 | [SRC]GrailsDomainClassValidator configureValidator(theClass, instance) { [MSG]The method configureValidator is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 12 | [SRC]void testCascadingValidation() { [MSG]The ABC score for method [testCascadingValidation] is [85.4] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UseAssertEqualsInsteadOfAssertTrue | 3 | 100 | [SRC]assertTrue("Error not found for field ${field}, errors w..ld) == null) [MSG]Replace assertTrue with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 47 | [SRC]def model = controller.update() [MSG]The variable [model] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CoupledTestCase | 2 | 24 | [SRC]def map = new DataBindingLazyMetaPropertyMap(new Propert..er:"stuff")) [MSG]new PropertyMapTest([name:Bart, age:11, other:stuff]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 178 | [SRC]def error = b.errors.getFieldError('site') [MSG]The variable [error] is not used |
UnnecessaryGetter | 2 | 239 | [SRC]def authorClass = ga.getDomainClass("Author").getClazz() [MSG]getClazz() can probably be rewritten as clazz |
UnusedImport | 3 | 3 | [SRC]import java.text.SimpleDateFormat |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 75 | [SRC]def Book = ga.getDomainClass("Book").clazz [MSG]The variable [Book] is not used |
UnusedVariable | 2 | 102 | [SRC]def Book = ga.getDomainClass("Book").clazz [MSG]The variable [Book] is not used |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 14 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 10 | [SRC]void testEncode() { [MSG]The method testEncode is both empty and not marked with @Override |
EmptyMethod | 2 | 25 | [SRC]void testDecode() { [MSG]The method testDecode is both empty and not marked with @Override |
EmptyMethod | 2 | 34 | [SRC]void testRoundtrip() { [MSG]The method testRoundtrip is both empty and not marked with @Override |
JUnitTestMethodWithoutAssert | 2 | 10 | [SRC]void testEncode() { [MSG]Test method 'testEncode' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 25 | [SRC]void testDecode() { [MSG]Test method 'testDecode' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 34 | [SRC]void testRoundtrip() { [MSG]Test method 'testRoundtrip' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 14 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 19 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 79 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnusedVariable | 2 | 64 | [SRC]def configurator = GrailsConfigUtils.determineGrailsRunt..ontext, ctx) [MSG]The variable [configurator] is not used |
UnnecessaryObjectReferences | 2 | 95 | [SRC]ctx.setAttribute("env", "dev") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 48 | [SRC]servletContext.addInitParameter("grailsConfiguratorClass..s.getName()) [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 55 | [SRC]def converter = parent as JSON [MSG]The variable [converter] is not used |
UnusedVariable | 2 | 74 | [SRC]def converter = parent as XML [MSG]The variable [converter] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 89 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 90 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 76 | [SRC]def proxy = [getHibernateLazyInitializer:{hibernateIniti..bernateProxy [MSG]The variable [proxy] is not used |
UnusedImport | 3 | 4 | [SRC]import java.lang.reflect.Method |
UnusedImport | 3 | 8 | [SRC]import org.codehaus.groovy.grails.web.converters.marshal..rsMarshaller |
UnusedImport | 3 | 11 | [SRC]import org.hibernate.repackage.cglib.proxy.MethodProxy |
UnusedImport | 3 | 10 | [SRC]import org.hibernate.repackage.cglib.proxy.Enhancer |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 29 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
AbcComplexity | 2 | 168 | [SRC]void testDisablingRequestParameterLogging() { [MSG]The ABC score for method [testDisablingRequestParameterLogging] is [73.5] |
UnnecessaryGetter | 2 | 106 | [SRC]assertEquals "/grails/foo/bar.dispatch",response.getForwardedUrl() [MSG]getForwardedUrl() can probably be rewritten as forwardedUrl |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.springframework.mock.web.MockServletContext; |
UnusedImport | 3 | 6 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest; |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..nAttributes; |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 16 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 24 | [SRC]def request = webRequest.getCurrentRequest() [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 25 | [SRC]def response = webRequest.getCurrentResponse() [MSG]getCurrentResponse() can probably be rewritten as currentResponse |
UnnecessaryGetter | 2 | 47 | [SRC]assertEquals "de", locale.getLanguage() [MSG]getLanguage() can probably be rewritten as language |
UnnecessaryGetter | 2 | 48 | [SRC]assertEquals "DE", locale.getCountry() [MSG]getCountry() can probably be rewritten as country |
UnnecessaryGetter | 2 | 55 | [SRC]def request = webRequest.getCurrentRequest() [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 56 | [SRC]def response = webRequest.getCurrentResponse() [MSG]getCurrentResponse() can probably be rewritten as currentResponse |
UnnecessaryGetter | 2 | 78 | [SRC]assertEquals "de", locale.getLanguage() [MSG]getLanguage() can probably be rewritten as language |
UnnecessaryGetter | 2 | 79 | [SRC]assertEquals "DE", locale.getCountry() [MSG]getCountry() can probably be rewritten as country |
UnnecessaryGetter | 2 | 86 | [SRC]MockHttpServletRequest request = webRequest.getCurrentRequest() [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 87 | [SRC]def response = webRequest.getCurrentResponse() [MSG]getCurrentResponse() can probably be rewritten as currentResponse |
UnnecessaryGetter | 2 | 109 | [SRC]assertEquals "de", locale.getLanguage() [MSG]getLanguage() can probably be rewritten as language |
UnnecessaryGetter | 2 | 110 | [SRC]assertEquals "DE", locale.getCountry() [MSG]getCountry() can probably be rewritten as country |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 34 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 72 | [SRC]assertEquals 'wrong controller name', 'someOther', info...rollerName() [MSG]getControllerName() can probably be rewritten as controllerName |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
UnusedImport | 3 | 5 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
UnusedImport | 3 | 5 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 26 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
UnusedImport | 3 | 5 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitCallToCompareToMethod | 2 | 169 | [SRC]assertTrue m1.compareTo(m2) > 0 [MSG]Explicit call to m1.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 170 | [SRC]assertTrue m1.compareTo(m3) > 0 [MSG]Explicit call to m1.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 171 | [SRC]assertTrue m1.compareTo(m4) > 0 [MSG]Explicit call to m1.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 172 | [SRC]assertTrue m1.compareTo(m5) > 0 [MSG]Explicit call to m1.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 173 | [SRC]assertTrue m1.compareTo(m6) > 0 [MSG]Explicit call to m1.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 174 | [SRC]assertTrue m1.compareTo(m7) > 0 [MSG]Explicit call to m1.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 175 | [SRC]assertTrue m1.compareTo(m8) > 0 [MSG]Explicit call to m1.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 176 | [SRC]assertTrue m1.compareTo(m9) > 0 [MSG]Explicit call to m1.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 177 | [SRC]assertTrue m1.compareTo(m10) > 0 [MSG]Explicit call to m1.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 179 | [SRC]assertTrue m2.compareTo(m1) < 0 [MSG]Explicit call to m2.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 180 | [SRC]assertTrue m2.compareTo(m3) > 0 [MSG]Explicit call to m2.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 181 | [SRC]assertTrue m2.compareTo(m4) > 0 [MSG]Explicit call to m2.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 182 | [SRC]assertTrue m2.compareTo(m5) > 0 [MSG]Explicit call to m2.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 183 | [SRC]assertTrue m2.compareTo(m6) > 0 [MSG]Explicit call to m2.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 184 | [SRC]assertTrue m2.compareTo(m7) > 0 [MSG]Explicit call to m2.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 185 | [SRC]assertTrue m2.compareTo(m8) > 0 [MSG]Explicit call to m2.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 186 | [SRC]assertTrue m2.compareTo(m9) > 0 [MSG]Explicit call to m2.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 187 | [SRC]assertTrue m2.compareTo(m10) > 0 [MSG]Explicit call to m2.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 189 | [SRC]assertTrue m3.compareTo(m1) < 0 [MSG]Explicit call to m3.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 190 | [SRC]assertTrue m3.compareTo(m2) < 0 [MSG]Explicit call to m3.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 191 | [SRC]assertTrue m3.compareTo(m4) > 0 [MSG]Explicit call to m3.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 192 | [SRC]assertTrue m3.compareTo(m5) > 0 [MSG]Explicit call to m3.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 193 | [SRC]assertTrue m3.compareTo(m6) > 0 [MSG]Explicit call to m3.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 194 | [SRC]assertTrue m3.compareTo(m7) > 0 [MSG]Explicit call to m3.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 195 | [SRC]assertTrue m3.compareTo(m8) > 0 [MSG]Explicit call to m3.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 196 | [SRC]assertTrue m3.compareTo(m9) > 0 [MSG]Explicit call to m3.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 197 | [SRC]assertTrue m3.compareTo(m10) > 0 [MSG]Explicit call to m3.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 199 | [SRC]assertTrue m4.compareTo(m1) < 0 [MSG]Explicit call to m4.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 200 | [SRC]assertTrue m4.compareTo(m2) < 0 [MSG]Explicit call to m4.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 201 | [SRC]assertTrue m4.compareTo(m3) < 0 [MSG]Explicit call to m4.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 202 | [SRC]assertTrue m4.compareTo(m5) > 0 [MSG]Explicit call to m4.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 203 | [SRC]assertTrue m4.compareTo(m6) > 0 [MSG]Explicit call to m4.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 204 | [SRC]assertTrue m4.compareTo(m7) > 0 [MSG]Explicit call to m4.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 205 | [SRC]assertTrue m4.compareTo(m8) > 0 [MSG]Explicit call to m4.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 206 | [SRC]assertTrue m4.compareTo(m9) > 0 [MSG]Explicit call to m4.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 207 | [SRC]assertTrue m4.compareTo(m10) > 0 [MSG]Explicit call to m4.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 209 | [SRC]assertTrue m5.compareTo(m1) < 0 [MSG]Explicit call to m5.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 210 | [SRC]assertTrue m5.compareTo(m2) < 0 [MSG]Explicit call to m5.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 211 | [SRC]assertTrue m5.compareTo(m3) < 0 [MSG]Explicit call to m5.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 212 | [SRC]assertTrue m5.compareTo(m4) < 0 [MSG]Explicit call to m5.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 213 | [SRC]assertTrue m5.compareTo(m6) > 0 [MSG]Explicit call to m5.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 214 | [SRC]assertTrue m5.compareTo(m7) > 0 [MSG]Explicit call to m5.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 215 | [SRC]assertTrue m5.compareTo(m8) > 0 [MSG]Explicit call to m5.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 216 | [SRC]assertTrue m5.compareTo(m9) > 0 [MSG]Explicit call to m5.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 217 | [SRC]assertTrue m5.compareTo(m10) > 0 [MSG]Explicit call to m5.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 219 | [SRC]assertTrue m6.compareTo(m1) < 0 [MSG]Explicit call to m6.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 220 | [SRC]assertTrue m6.compareTo(m2) < 0 [MSG]Explicit call to m6.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 221 | [SRC]assertTrue m6.compareTo(m3) < 0 [MSG]Explicit call to m6.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 222 | [SRC]assertTrue m6.compareTo(m4) < 0 [MSG]Explicit call to m6.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 223 | [SRC]assertTrue m6.compareTo(m5) < 0 [MSG]Explicit call to m6.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 224 | [SRC]assertTrue m6.compareTo(m7) > 0 [MSG]Explicit call to m6.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 225 | [SRC]assertTrue m6.compareTo(m8) > 0 [MSG]Explicit call to m6.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 226 | [SRC]assertTrue m6.compareTo(m9) > 0 [MSG]Explicit call to m6.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 227 | [SRC]assertTrue m6.compareTo(m10) > 0 [MSG]Explicit call to m6.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 229 | [SRC]assertTrue m7.compareTo(m1) < 0 [MSG]Explicit call to m7.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 230 | [SRC]assertTrue m7.compareTo(m2) < 0 [MSG]Explicit call to m7.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 231 | [SRC]assertTrue m7.compareTo(m3) < 0 [MSG]Explicit call to m7.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 232 | [SRC]assertTrue m7.compareTo(m4) < 0 [MSG]Explicit call to m7.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 233 | [SRC]assertTrue m7.compareTo(m5) < 0 [MSG]Explicit call to m7.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 234 | [SRC]assertTrue m7.compareTo(m6) < 0 [MSG]Explicit call to m7.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 235 | [SRC]assertTrue m7.compareTo(m8) > 0 [MSG]Explicit call to m7.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 236 | [SRC]assertTrue m7.compareTo(m9) > 0 [MSG]Explicit call to m7.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 237 | [SRC]assertTrue m7.compareTo(m10) > 0 [MSG]Explicit call to m7.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 239 | [SRC]assertTrue m8.compareTo(m1) < 0 [MSG]Explicit call to m8.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 240 | [SRC]assertTrue m8.compareTo(m2) < 0 [MSG]Explicit call to m8.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 241 | [SRC]assertTrue m8.compareTo(m3) < 0 [MSG]Explicit call to m8.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 242 | [SRC]assertTrue m8.compareTo(m4) < 0 [MSG]Explicit call to m8.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 243 | [SRC]assertTrue m8.compareTo(m5) < 0 [MSG]Explicit call to m8.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 244 | [SRC]assertTrue m8.compareTo(m6) < 0 [MSG]Explicit call to m8.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 245 | [SRC]assertTrue m8.compareTo(m7) < 0 [MSG]Explicit call to m8.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 246 | [SRC]assertTrue m8.compareTo(m9) > 0 [MSG]Explicit call to m8.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 247 | [SRC]assertTrue m8.compareTo(m10) > 0 [MSG]Explicit call to m8.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 249 | [SRC]assertTrue m9.compareTo(m1) < 0 [MSG]Explicit call to m9.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 250 | [SRC]assertTrue m9.compareTo(m2) < 0 [MSG]Explicit call to m9.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 251 | [SRC]assertTrue m9.compareTo(m3) < 0 [MSG]Explicit call to m9.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 252 | [SRC]assertTrue m9.compareTo(m4) < 0 [MSG]Explicit call to m9.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 253 | [SRC]assertTrue m9.compareTo(m5) < 0 [MSG]Explicit call to m9.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 254 | [SRC]assertTrue m9.compareTo(m6) < 0 [MSG]Explicit call to m9.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 255 | [SRC]assertTrue m9.compareTo(m7) < 0 [MSG]Explicit call to m9.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 256 | [SRC]assertTrue m9.compareTo(m8) < 0 [MSG]Explicit call to m9.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 257 | [SRC]assertTrue m9.compareTo(m10) > 0 [MSG]Explicit call to m9.compareTo(m10) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 259 | [SRC]assertTrue m10.compareTo(m1) < 0 [MSG]Explicit call to m10.compareTo(m1) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 260 | [SRC]assertTrue m10.compareTo(m2) < 0 [MSG]Explicit call to m10.compareTo(m2) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 261 | [SRC]assertTrue m10.compareTo(m3) < 0 [MSG]Explicit call to m10.compareTo(m3) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 262 | [SRC]assertTrue m10.compareTo(m4) < 0 [MSG]Explicit call to m10.compareTo(m4) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 263 | [SRC]assertTrue m10.compareTo(m5) < 0 [MSG]Explicit call to m10.compareTo(m5) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 264 | [SRC]assertTrue m10.compareTo(m6) < 0 [MSG]Explicit call to m10.compareTo(m6) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 265 | [SRC]assertTrue m10.compareTo(m7) < 0 [MSG]Explicit call to m10.compareTo(m7) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 266 | [SRC]assertTrue m10.compareTo(m8) < 0 [MSG]Explicit call to m10.compareTo(m8) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
ExplicitCallToCompareToMethod | 2 | 267 | [SRC]assertTrue m10.compareTo(m9) < 0 [MSG]Explicit call to m10.compareTo(m9) method can be rewritten using the compareTo operators such as >, <, <=, >=, and <=> |
JUnitTestMethodWithoutAssert | 2 | 335 | [SRC]void testInit() { [MSG]Test method 'testInit' makes no assertions |
AbcComplexity | 2 | 154 | [SRC]void testComparable() { [MSG]The ABC score for method [testComparable] is [226.2] |
UnusedVariable | 2 | 337 | [SRC]def m = new RegexUrlMapping(parser.parse("/(*)/hello"), ..vletContext) [MSG]The variable [m] is not used |
UnnecessaryGetter | 2 | 58 | [SRC]assertEquals "/x/y", info.getURI() [MSG]getURI() can probably be rewritten as URI |
UnusedImport | 3 | 6 | [SRC]import org.springframework.mock.web.MockServletContext |
MethodSize | 3 | 154 | [MSG]Method "testComparable" is 129 lines |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 59 | [SRC]assertEquals("errors", info.getControllerName()); [MSG]getControllerName() can probably be rewritten as controllerName |
UnnecessaryGetter | 2 | 60 | [SRC]assertEquals("error404", info.getActionName()); [MSG]getActionName() can probably be rewritten as actionName |
UnnecessaryGetter | 2 | 66 | [SRC]assertEquals("errors", info.getControllerName()); [MSG]getControllerName() can probably be rewritten as controllerName |
UnnecessaryGetter | 2 | 67 | [SRC]assertEquals("error500", info.getActionName()); [MSG]getActionName() can probably be rewritten as actionName |
UnusedImport | 3 | 6 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
UnusedImport | 3 | 8 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty; |
UnusedImport | 3 | 6 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 11 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
AbcComplexity | 2 | 43 | [SRC]void testEvaluateMappings() { [MSG]The ABC score for method [testEvaluateMappings] is [81.1] |
AbcComplexity | 2 | 5 | [SRC]class UrlMappingEvaluatorTests extends GroovyTestCase { [MSG]The ABC score for class [org.codehaus.groovy.grails.web.mapping.UrlMappingEvaluatorTests] is [81.1] |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 4 | [SRC]import org.springframework.core.io.ByteArrayResource |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests |
UnusedImport | 3 | 5 | [SRC]import org.springframework.mock.web.MockServletContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty; |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty; |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 40 | [SRC]assertEquals "book.gsp", info.getViewName() [MSG]getViewName() can probably be rewritten as viewName |
UnnecessaryGetter | 2 | 47 | [SRC]assertEquals "book.gsp", info.getViewName() [MSG]getViewName() can probably be rewritten as viewName |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 50 | [SRC]def mappings = evaluator.evaluateMappings(new ByteArrayR..getBytes())) [MSG]getBytes() can probably be rewritten as bytes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UseAssertEqualsInsteadOfAssertTrue | 3 | 326 | [SRC]assertFalse "/book.gsp" == response.forwardedUrl [MSG]Replace assertFalse with a call to assertEquals() |
UseAssertEqualsInsteadOfAssertTrue | 3 | 327 | [SRC]assertFalse "joel" == webRequest.params.name [MSG]Replace assertFalse with a call to assertEquals() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 11 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 29 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 15 | [SRC]assertEquals binding.getMetaClass(), binding.metaClass [MSG]getMetaClass() can probably be rewritten as metaClass |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 13 | [SRC]void testSpanningMultipleLines() { [MSG]Test method 'testSpanningMultipleLines' makes no assertions |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.web.taglib.exceptions...TagException |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 8 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 66 | [SRC]def runPageCode(pageCode) { [MSG]The method runPageCode is public but not a test method |
JUnitPublicNonTestMethod | 2 | 144 | [SRC]def getBinding(out) { [MSG]The method getBinding is public but not a test method |
UnnecessaryObjectReferences | 2 | 158 | [SRC]binding.setVariable(GroovyPage.OUT, out) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 155 | [SRC]binding.setVariable(GroovyPage.SESSION, request.getSession()) [MSG]getSession() can probably be rewritten as session |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 55 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 51 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
JUnitTestMethodWithoutAssert | 2 | 30 | [SRC]void testHandleException() { [MSG]Test method 'testHandleException' makes no assertions |
UnusedVariable | 2 | 18 | [SRC]def writer = gps.createResponseWriter(new MockHttpServletResponse()) [MSG]The variable [writer] is not used |
UnnecessaryGetter | 2 | 48 | [SRC]gps.handleException(request, response,e,response.getWriter(),gpte) [MSG]getWriter() can probably be rewritten as writer |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 192 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 188 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 5 | [SRC]import junit.framework.TestCase |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 4 | [SRC]import org.codehaus.groovy.grails.commons.ConfigurationHolder |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 22 | [SRC]void onTearDown() { [MSG]The method onTearDown is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 22 | [SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader()) [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
UnnecessaryGetter | 2 | 24 | [SRC]rootLoader.addURL res.getURL() [MSG]getURL() can probably be rewritten as URL |
UnnecessaryGetter | 2 | 26 | [SRC]rootLoader.addURL it.getURL() [MSG]getURL() can probably be rewritten as URL |
UnnecessaryGetter | 2 | 30 | [SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet()) [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 13 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 17 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 25 | [SRC]assert pageContext.getServletConfig() [MSG]getServletConfig() can probably be rewritten as servletConfig |
UnnecessaryGetter | 2 | 26 | [SRC]assert pageContext.getServletContext() [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 27 | [SRC]assert pageContext.getRequest() [MSG]getRequest() can probably be rewritten as request |
UnnecessaryGetter | 2 | 28 | [SRC]assert pageContext.getResponse() [MSG]getResponse() can probably be rewritten as response |
UnnecessaryGetter | 2 | 29 | [SRC]assert pageContext.getPage() [MSG]getPage() can probably be rewritten as page |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 21 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 26 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 23 | [SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet()) [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 34 | [SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader()) [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
UnnecessaryGetter | 2 | 36 | [SRC]rootLoader.addURL res.getURL() [MSG]getURL() can probably be rewritten as URL |
UnnecessaryGetter | 2 | 52 | [SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null [MSG]getRequest() can probably be rewritten as request |
UnnecessaryGetter | 2 | 55 | [SRC]def pageContext = PageContextFactory.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 17 | [SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader()) [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
UnnecessaryGetter | 2 | 19 | [SRC]rootLoader.addURL res.getURL() [MSG]getURL() can probably be rewritten as URL |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 20 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 25 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 22 | [SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet()) [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 45 | [SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null [MSG]getRequest() can probably be rewritten as request |
UnusedImport | 3 | 8 | [SRC]import javax.servlet.jsp.jstl.core.Config |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 21 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 26 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 23 | [SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet()) [MSG]getCurrentRequest() can probably be rewritten as currentRequest |
UnnecessaryGetter | 2 | 61 | [SRC]getJspContext().getOut().println("extendsSimpleTagSupport:output"); [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 61 | [SRC]getJspContext().getOut().println("extendsSimpleTagSupport:output"); [MSG]getJspContext() can probably be rewritten as jspContext |
UnnecessaryGetter | 2 | 68 | [SRC]JspWriter out = getJspContext().getOut() [MSG]getOut() can probably be rewritten as out |
UnnecessaryGetter | 2 | 68 | [SRC]JspWriter out = getJspContext().getOut() [MSG]getJspContext() can probably be rewritten as jspContext |
UnnecessaryGetter | 2 | 70 | [SRC]super.getJspBody().invoke(out) [MSG]getJspBody() can probably be rewritten as jspBody |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 65 | [SRC]new RootLoader([] as URL[], Thread.currentThread().getCo..assLoader()) [MSG]getContextClassLoader() can probably be rewritten as contextClassLoader |
UnnecessaryGetter | 2 | 72 | [SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?> [MSG]getInputStream() can probably be rewritten as inputStream |
UnnecessaryGetter | 2 | 72 | [SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?> [MSG]getBytes() can probably be rewritten as bytes |
UnnecessaryGetter | 2 | 118 | [SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?> [MSG]getBytes() can probably be rewritten as bytes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 28 | [SRC]def is = new InputSource(res.getInputStream()) [MSG]getInputStream() can probably be rewritten as inputStream |
UnnecessaryGetter | 2 | 33 | [SRC]def reader = factory.newSAXParser().getXMLReader() [MSG]getXMLReader() can probably be rewritten as XMLReader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 31 | [SRC]def reader = factory.newSAXParser().getXMLReader() [MSG]getXMLReader() can probably be rewritten as XMLReader |
ImportFromSamePackage | 3 | 20 | [SRC]import org.codehaus.groovy.grails.web.pages.ext.jsp.WebX..ibraryReader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 160 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 12 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 27 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedImport | 3 | 19 | [SRC]import org.springframework.mock.web.MockHttpServletRequest |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 30 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
UnusedVariable | 2 | 42 | [SRC]def mock = new MockHttpSession() [MSG]The variable [mock] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 149 | [SRC]def resopnse = mockController.response [MSG]The variable [resopnse] is not used |
UnusedVariable | 2 | 163 | [SRC]def resopnse = mockController.response [MSG]The variable [resopnse] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 57 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 112 | [SRC]void runTest(Closure callable) { [MSG]The method runTest is public but not a test method |
AbcComplexity | 2 | 40 | [SRC]protected void setUp() { [MSG]The ABC score for method [setUp] is [63.6] |
UnnecessaryGetter | 2 | 49 | [SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl) [MSG]getLoadedClasses() can probably be rewritten as loadedClasses |
UnnecessaryGetter | 2 | 81 | [SRC]servletContext = ctx.getServletContext() [MSG]getServletContext() can probably be rewritten as servletContext |
UnnecessaryGetter | 2 | 88 | [SRC]appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnusedImport | 3 | 22 | [SRC]import org.codehaus.groovy.grails.commons.spring.GrailsA..ationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 47 | [SRC]void testInvokeControllerMethodWithCommandObjectAndRenderMethod() { [MSG]Test method 'testInvokeControllerMethodWithCommandObjectAndRenderMethod' makes no assertions |
UnusedVariable | 2 | 36 | [SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance() [MSG]The variable [cmd] is not used |
UnusedVariable | 2 | 48 | [SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance() [MSG]The variable [cmd] is not used |
UnusedVariable | 2 | 53 | [SRC]def model = ctrl.renderWithCmd() [MSG]The variable [model] is not used |
UnnecessaryGetter | 2 | 36 | [SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 48 | [SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 57 | [SRC]def cmd1 = ga.getClassLoader().loadClass("SampleCommand"..ewInstance() [MSG]getClassLoader() can probably be rewritten as classLoader |
UnnecessaryGetter | 2 | 58 | [SRC]def cmd2 = ga.getClassLoader().loadClass("SecondCommand"..ewInstance() [MSG]getClassLoader() can probably be rewritten as classLoader |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UseAssertTrueInsteadOfAssertEquals | 3 | 19 | [SRC]assert WebMetaUtils.isCommandObjectAction(action) == true [MSG]The expression '(WebMetaUtils.isCommandObjectAction(action) == true)' can be simplified to 'WebMetaUtils.isCommandObjectAction(action)' |
UseAssertTrueInsteadOfAssertEquals | 3 | 23 | [SRC]assert WebMetaUtils.isCommandObjectAction(fresh.index) == false [MSG]The expression '(WebMetaUtils.isCommandObjectAction(fresh.index) == false)' can be simplified to '!WebMetaUtils.isCommandObjectAction(fresh.index)' |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedVariable | 2 | 63 | [SRC]def error [MSG]The variable [error] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 7 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 33 | [SRC]void testCallSuperMethod() { [MSG]Test method 'testCallSuperMethod' makes no assertions |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 17 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
JUnitPublicNonTestMethod | 2 | 28 | [SRC]void runTest(Closure callable) { [MSG]The method runTest is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 134 | [SRC]void testRenderMethod() { [MSG]Test method 'testRenderMethod' makes no assertions |
UnnecessaryGetter | 2 | 53 | [SRC]def appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 111 | [SRC]void testIterateOverMapContainingDate() { [MSG]Test method 'testIterateOverMapContainingDate' makes no assertions |
AbcComplexity | 2 | 35 | [SRC]void testConversionHelperMethods() { [MSG]The ABC score for method [testConversionHelperMethods] is [72.4] |
UnnecessaryObjectReferences | 2 | 43 | [SRC]map.array = ["one", "two" ] as String[] [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 44 | [SRC]map.longNumber = 1234567890 [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 133 | [SRC]mockRequest.addParameter("a.e.g", "gValue") [MSG]The code could be more concise by using a with() or identity() block |
UseAssertTrueInsteadOfAssertEquals | 3 | 82 | [SRC]assertEquals false, map.boolean('one') [MSG]assertEquals can be simplified using assertTrue or assertFalse |
UseAssertTrueInsteadOfAssertEquals | 3 | 83 | [SRC]assertEquals true, map.boolean('bool') [MSG]assertEquals can be simplified using assertTrue or assertFalse |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 24 | [SRC]request.addParameter("book.id", "10") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 25 | [SRC]request.addParameter("publisher.name", "Apress") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 26 | [SRC]request.addParameter("publisher.authors[0].name", "Fred") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 27 | [SRC]request.addParameter("publisher.authors[1].name", "Joe") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 28 | [SRC]request.addParameter("test..foo..bar", "Stuff") [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 106 | [SRC]testCtrl.renderXml() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 112 | [SRC]testCtrl.renderJSON() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 118 | [SRC]testCtrl.renderStatusAndText() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 124 | [SRC]testCtrl.renderStatusOnly() [MSG]The code could be more concise by using a with() or identity() block |
ConsecutiveStringConcatenation | 3 | 30 | [SRC]render "${'te' + 'xt'}" [MSG]String concatenation can be joined into the literal 'text' |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTestMethodWithoutAssert | 2 | 51 | [SRC]void testConstructHelper() { [MSG]Test method 'testConstructHelper' makes no assertions |
UnusedVariable | 2 | 53 | [SRC]def webRequest = RequestContextHolder.currentRequestAttributes() [MSG]The variable [webRequest] is not used |
UnusedVariable | 2 | 54 | [SRC]def helper = new SimpleGrailsControllerHelper(ga, ctx, servletContext) [MSG]The variable [helper] is not used |
UnnecessaryGetter | 2 | 62 | [SRC]assert mv.getModel()["after"] == "value" [MSG]getModel() can probably be rewritten as model |
UnnecessaryGetter | 2 | 70 | [SRC]assert mv.getModel()["after"] == "value" [MSG]getModel() can probably be rewritten as model |
UnnecessaryGetter | 2 | 78 | [SRC]assert mv.getModel()["after"] == "/test3/list" [MSG]getModel() can probably be rewritten as model |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 17 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 42 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
DuplicateImport | 3 | 7 | [SRC]import org.springframework.web.context.request.* |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 39 | [SRC]void refresh() {} [MSG]The method refresh is both empty and not marked with @Override |
UnnecessaryGetter | 2 | 12 | [SRC]assertSame factory, FactoryHolder.getFactory() [MSG]getFactory() can probably be rewritten as factory |
UnnecessaryGetter | 2 | 18 | [SRC]FactoryHolder.getFactory() [MSG]getFactory() can probably be rewritten as factory |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitTearDownCallsSuper | 2 | 108 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnusedVariable | 2 | 15 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 23 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 31 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 39 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 52 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 61 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 79 | [SRC]def result = applyTemplate(template, [:], target1) [MSG]The variable [result] is not used |
UnusedVariable | 2 | 96 | [SRC]def result = applyTemplate(template, [:]) [MSG]The variable [result] is not used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 67 | [SRC]def withConfig(String text, Closure callable) { [MSG]The method withConfig is public but not a test method |
JUnitPublicNonTestMethod | 2 | 78 | [SRC]def profile(String name, Closure callable) { [MSG]The method profile is public but not a test method |
JUnitPublicNonTestMethod | 2 | 88 | [SRC]def withTag(String tagName, Writer out, Closure callable) { [MSG]The method withTag is public but not a test method |
JUnitPublicNonTestMethod | 2 | 242 | [SRC]void runTest(Closure callable) { [MSG]The method runTest is public but not a test method |
JUnitPublicNonTestMethod | 2 | 246 | [SRC]void printCompiledSource(template, params = [:]) { [MSG]The method printCompiledSource is public but not a test method |
JUnitPublicNonTestMethod | 2 | 252 | [SRC]def getCompiledSource(template, params = [:]) { [MSG]The method getCompiledSource is public but not a test method |
JUnitPublicNonTestMethod | 2 | 269 | [SRC]def assertCompiledSourceContains(expected, template, params = [:]) { [MSG]The method assertCompiledSourceContains is public but not a test method |
JUnitPublicNonTestMethod | 2 | 274 | [SRC]void assertOutputContains(expected, template, params = [:]) { [MSG]The method assertOutputContains is public but not a test method |
JUnitPublicNonTestMethod | 2 | 279 | [SRC]void assertOutputNotContains(expected, template, params = [:]) { [MSG]The method assertOutputNotContains is public but not a test method |
JUnitPublicNonTestMethod | 2 | 297 | [SRC]void assertOutputEquals(expected, template, params = [:]..tring() }) { [MSG]The method assertOutputEquals is public but not a test method |
JUnitPublicNonTestMethod | 2 | 323 | [SRC]def applyTemplate(template, params = [:], target = null,..e = null ) { [MSG]The method applyTemplate is public but not a test method |
JUnitPublicNonTestMethod | 2 | 348 | [SRC]String sitemeshPreprocess(String template) { [MSG]The method sitemeshPreprocess is public but not a test method |
JUnitPublicNonTestMethod | 2 | 353 | [SRC]String applyLayout(String layout, String template, Map params=[:]) { [MSG]The method applyLayout is public but not a test method |
JUnitSetUpCallsSuper | 2 | 139 | [SRC]protected void setUp() throws Exception { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 218 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
AbcComplexity | 2 | 139 | [SRC]protected void setUp() throws Exception { [MSG]The ABC score for method [setUp] is [80.7] |
UnusedVariable | 2 | 111 | [SRC]GroovyPageOutputStack stack=GroovyPageOutputStack.createNew(out) [MSG]The variable [stack] is not used |
UnusedVariable | 2 | 266 | [SRC]String text = sw.toString() [MSG]The variable [text] is not used |
UnnecessaryGetter | 2 | 188 | [SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null [MSG]getRequest() can probably be rewritten as request |
UnnecessaryGetter | 2 | 199 | [SRC]appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnusedImport | 3 | 13 | [SRC]import org.codehaus.groovy.grails.plugins.PluginMetaManager |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodCount | 2 | 15 | [SRC]class ApplicationTagLibTests extends AbstractGrailsTagTests { [MSG]Class org.codehaus.groovy.grails.web.taglib.ApplicationTagLibTests has 45 methods |
UnnecessaryGetter | 2 | 20 | [SRC]assertOutputEquals "/test/plugins/controllers-${GrailsUt..g", template [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import grails.util.GrailsUtil |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 88 | [SRC]void assertResultContains(result, expectedSubstring) { [MSG]The method assertResultContains is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 26 | [SRC]void assertOutputEquals(expected, template, params = [:]) { [MSG]The method assertOutputEquals is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashMapInstantiation | 2 | 251 | [SRC]Map attrs = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
JUnitTestMethodWithoutAssert | 2 | 23 | [SRC]void testDatePickerTagWithDefaultDateAndPrecision() { [MSG]Test method 'testDatePickerTagWithDefaultDateAndPrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 27 | [SRC]void testDatePickerTagWithYearPrecision() { [MSG]Test method 'testDatePickerTagWithYearPrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 31 | [SRC]void testDatePickerTagWithMonthPrecision() { [MSG]Test method 'testDatePickerTagWithMonthPrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 35 | [SRC]void testDatePickerTagWithDayPrecision() { [MSG]Test method 'testDatePickerTagWithDayPrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 39 | [SRC]void testDatePickerTagWithHourPrecision() { [MSG]Test method 'testDatePickerTagWithHourPrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 43 | [SRC]void testDatePickerTagWithMinutePrecision() { [MSG]Test method 'testDatePickerTagWithMinutePrecision' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 47 | [SRC]void testDatePickerTagWithCustomDate() { [MSG]Test method 'testDatePickerTagWithCustomDate' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 74 | [SRC]void testDatePickerTagWithCustomDateAndPrecision() { [MSG]Test method 'testDatePickerTagWithCustomDateAndPrecision' makes no assertions |
UnusedPrivateField | 2 | 16 | [SRC]private static final def SELECT_TAG_NAME = "testSelect" [MSG]The field SELECT_TAG_NAME is not used within FormTagLib2Tests.groovy |
UnusedPrivateMethod | 2 | 225 | [SRC]private void assertSelectFieldPresentWithValue(Document ..ing value) { [MSG]The method assertSelectFieldPresentWithValue is not used within FormTagLib2Tests.groovy |
UnusedPrivateMethod | 2 | 231 | [SRC]private void assertSelectFieldPresentWithValueAndText(Do..ing label) { [MSG]The method assertSelectFieldPresentWithValueAndText is not used within FormTagLib2Tests.groovy |
UnusedVariable | 2 | 121 | [SRC]String xp [MSG]The variable [xp] is not used |
UnnecessaryGetter | 2 | 52 | [SRC]def defaultDate = Calendar.getInstance() [MSG]getInstance() can probably be rewritten as instance |
UnnecessaryGetter | 2 | 54 | [SRC]Document document = getDatePickerOutput(null, 'day', def..e.getTime()) [MSG]getTime() can probably be rewritten as time |
UnnecessaryGetter | 2 | 69 | [SRC]DateFormat defaultFormat = DateFormat.getInstance() [MSG]getInstance() can probably be rewritten as instance |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
ExplicitHashMapInstantiation | 2 | 173 | [SRC]final Map attrs = new HashMap() [MSG]HashMap objects are better instantiated using the form "[] as HashMap" |
UnusedPrivateField | 2 | 16 | [SRC]private static final String DATE_PICKER_TAG_NAME = "testDatePicker" [MSG]The field DATE_PICKER_TAG_NAME is not used within FormTagLib3Tests.groovy |
UnusedPrivateField | 2 | 18 | [SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] )) [MSG]The field DATE_PRECISIONS_INCLUDING_MINUTE is not used within FormTagLib3Tests.groovy |
UnusedPrivateField | 2 | 19 | [SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] )) [MSG]The field DATE_PRECISIONS_INCLUDING_HOUR is not used within FormTagLib3Tests.groovy |
UnusedPrivateField | 2 | 20 | [SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] )) [MSG]The field DATE_PRECISIONS_INCLUDING_DAY is not used within FormTagLib3Tests.groovy |
UnusedPrivateField | 2 | 21 | [SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] )) [MSG]The field DATE_PRECISIONS_INCLUDING_MONTH is not used within FormTagLib3Tests.groovy |
UnnecessaryGetter | 2 | 188 | [SRC]final Element inputElement = document.getDocumentElement() [MSG]getDocumentElement() can probably be rewritten as documentElement |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 32 | [SRC]assertOutputEquals("1980-02-03", template, [date:calender.getTime()]) [MSG]getTime() can probably be rewritten as time |
UnnecessaryGetter | 2 | 38 | [SRC]assertOutputEquals("February 3, 1980", template, [date:c...getTime()]) [MSG]getTime() can probably be rewritten as time |
UnnecessaryGetter | 2 | 44 | [SRC]assertOutputEquals("February 3, 1980 12:00 AM", template...getTime()]) [MSG]getTime() can probably be rewritten as time |
UnnecessaryGetter | 2 | 79 | [SRC]assertOutputEquals("1980-02-03", template, [date:calender.getTime()]) [MSG]getTime() can probably be rewritten as time |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryObjectReferences | 2 | 41 | [SRC]tag.attributes = ['"expr"': " \${it.age > 19}", '"in"': "myObj"] [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 42 | [SRC]tag.doStartTag() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 48 | [SRC]tag.doEndTag() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGetter | 2 | 53 | [SRC]assertEquals("findAll", tag.getName()) [MSG]getName() can probably be rewritten as name |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyCatchBlock | 2 | 15 | [SRC]catch(Exception e) { [MSG]The catch block is empty |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 56 | [SRC]void doEndTag() {} [MSG]The method doEndTag is both empty and not marked with @Override |
EmptyMethod | 2 | 58 | [SRC]void doStartTag() {} [MSG]The method doStartTag is both empty and not marked with @Override |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 5 | [SRC]void onSetUp() { [MSG]The method onSetUp is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyMethod | 2 | 381 | [SRC]def prepareAjaxForm(Object attrs) {} [MSG]The method prepareAjaxForm is both empty and not marked with @Override |
JUnitPublicNonTestMethod | 2 | 352 | [SRC]def setRequestContext() { [MSG]The method setRequestContext is public but not a test method |
JUnitPublicNonTestMethod | 2 | 356 | [SRC]def setRequestContext(path) { [MSG]The method setRequestContext is public but not a test method |
JUnitPublicNonTestMethod | 2 | 360 | [SRC]def setupPluginController(tag) { [MSG]The method setupPluginController is public but not a test method |
MethodCount | 2 | 14 | [SRC]class JavascriptTagLibTests extends AbstractGrailsTagTests { [MSG]Class org.codehaus.groovy.grails.web.taglib.JavascriptTagLibTests has 39 methods |
UnusedVariable | 2 | 45 | [SRC]String newLine = EOL [MSG]The variable [newLine] is not used |
UnusedVariable | 2 | 217 | [SRC]def retval = tag.call(attrs) {"body"} [MSG]The variable [retval] is not used |
UnnecessaryGetter | 2 | 51 | [SRC]def grailsVersion = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
UnnecessaryGetter | 2 | 184 | [SRC]GroovyObject tagLibrary = (GroovyObject) tag.getOwner() [MSG]getOwner() can probably be rewritten as owner |
UnnecessaryGetter | 2 | 193 | [SRC]sw.getBuffer().delete(0, sw.getBuffer().length()) [MSG]getBuffer() can probably be rewritten as buffer |
UnnecessaryGetter | 2 | 193 | [SRC]sw.getBuffer().delete(0, sw.getBuffer().length()) [MSG]getBuffer() can probably be rewritten as buffer |
UnnecessaryGetter | 2 | 198 | [SRC]sw.getBuffer().delete(0, sw.getBuffer().length()) [MSG]getBuffer() can probably be rewritten as buffer |
UnnecessaryGetter | 2 | 198 | [SRC]sw.getBuffer().delete(0, sw.getBuffer().length()) [MSG]getBuffer() can probably be rewritten as buffer |
UnnecessaryGetter | 2 | 211 | [SRC]GroovyObject tagLibrary = (GroovyObject) tag.getOwner() [MSG]getOwner() can probably be rewritten as owner |
UnnecessaryDefInMethodDeclaration | 3 | 377 | [SRC]def doRemoteFunction(Object taglib, Object attrs, Object out) { [MSG]The def keyword is unneeded when a method returns the Object type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 38 | [SRC]void assertOutputEquals(expected, template, params = [:]) { [MSG]The method assertOutputEquals is public but not a test method |
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.runtime.InvokerHelper |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 3 | [SRC]import org.codehaus.groovy.runtime.InvokerHelper |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnusedImport | 3 | 4 | [SRC]import org.springframework.validation.MapBindingResult |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 13 | [SRC]def grailsVersion = GrailsUtil.getGrailsVersion() [MSG]getGrailsVersion() can probably be rewritten as grailsVersion |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryCollectCall | 2 | 95 | [SRC]assertEquals(["grails", "groovy"], obj.tags.collect {it.name}) [MSG]The call to collect could probably be rewritten as a spread expression: obj.tags*.name |
UnnecessaryGetter | 2 | 130 | [SRC]Object v = getValue() [MSG]getValue() can probably be rewritten as value |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 367 | [SRC]void checkTagOutput(output, expectedClassValue, expected..edContent) { [MSG]The method checkTagOutput is public but not a test method |
JUnitPublicNonTestMethod | 2 | 408 | [SRC]void checkTagOutput(output, expectedClassValue, expected..therAttrs) { [MSG]The method checkTagOutput is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 39 | [SRC]void testPaginateTag() { [MSG]Test method 'testPaginateTag' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 150 | [SRC]void testSortableColumnTag() { [MSG]Test method 'testSortableColumnTag' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 164 | [SRC]void testSortableColumnTagWithTitleKey() { [MSG]Test method 'testSortableColumnTagWithTitleKey' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 210 | [SRC]void testSortableColumnTagWithAction() { [MSG]Test method 'testSortableColumnTagWithAction' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 224 | [SRC]void testSortableColumnTagWithDefaultOrder() { [MSG]Test method 'testSortableColumnTagWithDefaultOrder' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 268 | [SRC]void testSortableColumnTagWithAdditionalAttributes() { [MSG]Test method 'testSortableColumnTagWithAdditionalAttributes' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 283 | [SRC]void testSortableColumnTagSorted() { [MSG]Test method 'testSortableColumnTagSorted' makes no assertions |
UnusedVariable | 2 | 48 | [SRC]def head = "" [MSG]The variable [head] is not used |
UnnecessaryGetter | 2 | 292 | [SRC]webRequest.getParams().put("sort", "title") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 293 | [SRC]webRequest.getParams().put("order", "asc") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 309 | [SRC]webRequest.getParams().put("sort", "title") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 310 | [SRC]webRequest.getParams().put("order", "desc") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 326 | [SRC]webRequest.getParams().put("sort", "price") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 327 | [SRC]webRequest.getParams().put("order", "desc") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 343 | [SRC]webRequest.getParams().put("sort", "price") [MSG]getParams() can probably be rewritten as params |
UnnecessaryGetter | 2 | 344 | [SRC]webRequest.getParams().put("order", "desc") [MSG]getParams() can probably be rewritten as params |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 244 | [SRC]void checkMultiSelect(List categories, List selected, Cl..sSelected) { [MSG]The method checkMultiSelect is public but not a test method |
JUnitTestMethodWithoutAssert | 2 | 218 | [SRC]void testMultipleSelect() { [MSG]Test method 'testMultipleSelect' makes no assertions |
JUnitTestMethodWithoutAssert | 2 | 230 | [SRC]void testMultipleSelectWithObjectValues() { [MSG]Test method 'testMultipleSelectWithObjectValues' makes no assertions |
UnusedPrivateMethod | 2 | 333 | [SRC]private void assertSelectFieldNotPresent(Document docume..fieldName) { [MSG]The method assertSelectFieldNotPresent is not used within SelectTagTests.groovy |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodCount | 2 | 14 | [SRC]class ValidationTagLibTests extends AbstractGrailsTagTests { [MSG]Class org.codehaus.groovy.grails.web.taglib.ValidationTagLibTests has 32 methods |
UnnecessaryObjectReferences | 2 | 215 | [SRC]b.publisherURL = new URL("http://canoo.com/gia") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 216 | [SRC]b.releaseDate = new Date() [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 217 | [SRC]b.usPrice = 10.99 [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 506 | [SRC]gcl.parseClass(''' [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 517 | [SRC]gcl.parseClass(''' [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 618 | [SRC]gcl.parseClass(''' [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 2 | 629 | [SRC]gcl.parseClass(''' [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 7 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 116 | [SRC]void clearGrailsWebRequest() { [MSG]The method clearGrailsWebRequest is public but not a test method |
JUnitSetUpCallsSuper | 2 | 17 | [SRC]protected void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 37 | [SRC]protected void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 78 | [SRC]assertNull RequestContextHolder.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 98 | [SRC]assertNull RequestContextHolder.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 112 | [SRC]assertEquals mockWebRequest, RequestContextHolder.getReq..Attributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 129 | [SRC]assertNull RequestContextHolder.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
UnnecessaryGetter | 2 | 135 | [SRC]assertNull RequestContextHolder.getRequestAttributes() [MSG]getRequestAttributes() can probably be rewritten as requestAttributes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 87 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnnecessaryGetter | 2 | 23 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
UnnecessaryGetter | 2 | 51 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
UnnecessaryGetter | 2 | 74 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
UnusedImport | 3 | 6 | [SRC]import org.springframework.webflow.context.servlet.Servl..ernalContext |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder |
UnusedImport | 3 | 4 | [SRC]import org.springframework.webflow.definition.FlowDefinition |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 52 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnnecessaryGetter | 2 | 23 | [SRC]assertEquals "contextRelative:/test/foo",context.getExte..edirectUrl() [MSG]getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl |
UnnecessaryGetter | 2 | 32 | [SRC]assertEquals "contextRelative:/test/foo/1",context.getEx..edirectUrl() [MSG]getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl |
UnnecessaryGetter | 2 | 44 | [SRC]assertEquals "contextRelative:/mycontroller/foo",context..edirectUrl() [MSG]getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl |
UnusedImport | 3 | 10 | [SRC]import org.springframework.webflow.definition.FlowDefinition |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 33 | [SRC]void onInit() { [MSG]The method onInit is public but not a test method |
JUnitPublicNonTestMethod | 2 | 42 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnnecessaryGetter | 2 | 20 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
UnnecessaryGetter | 2 | 29 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder |
UnusedImport | 3 | 4 | [SRC]import org.springframework.webflow.definition.FlowDefinition |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 29 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 21 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnusedImport | 3 | 3 | [SRC]import junit.framework.TestCase |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 22 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
UnnecessaryGetter | 2 | 73 | [SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser() [MSG]getExpressionParser() can probably be rewritten as expressionParser |
UnnecessaryGetter | 2 | 78 | [SRC]FlowDefinitionRegistry registry = factoryBean.getObject() [MSG]getObject() can probably be rewritten as object |
UnnecessaryGetter | 2 | 81 | [SRC]assertEquals 1,registry.getFlowDefinitionCount() [MSG]getFlowDefinitionCount() can probably be rewritten as flowDefinitionCount |
UnusedImport | 3 | 5 | [SRC]import org.codehaus.groovy.grails.support.MockApplicationContext |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 10 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 33 | [SRC]String getFlowId() { "myFlow" } [MSG]The method getFlowId is public but not a test method |
JUnitPublicNonTestMethod | 2 | 35 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnnecessaryGetter | 2 | 12 | [SRC]def startState = flowDefinition.getStartState() [MSG]getStartState() can probably be rewritten as startState |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 10 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
UnnecessaryGetter | 2 | 41 | [SRC]def model = getFlowScope() [MSG]getFlowScope() can probably be rewritten as flowScope |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 29 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
JUnitPublicNonTestMethod | 2 | 59 | [SRC]def foo() { "bar" } [MSG]The method foo is public but not a test method |
UnnecessaryGetter | 2 | 73 | [SRC]def theFlow = getFlowDefinition() [MSG]getFlowDefinition() can probably be rewritten as flowDefinition |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitSetUpCallsSuper | 2 | 16 | [SRC]void setUp() { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 26 | [SRC]void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
UnnecessaryGetter | 2 | 23 | [SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser() [MSG]getExpressionParser() can probably be rewritten as expressionParser |
UnnecessaryGetter | 2 | 154 | [SRC]def flow = new FlowBuilder("myFlow",getFlowBuilderServic..pl()).flow { [MSG]getFlowBuilderServices() can probably be rewritten as flowBuilderServices |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 7 | [SRC]Closure getFlowClosure() { [MSG]The method getFlowClosure is public but not a test method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
UnnecessaryGetter | 2 | 27 | [SRC]context.getFlowScope().put("id", "1") [MSG]getFlowScope() can probably be rewritten as flowScope |
UnnecessaryGetter | 2 | 29 | [SRC]assert "contextRelative:/book/show/1" == ext.getExternalRedirectUrl() [MSG]getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl |
UnnecessaryGetter | 2 | 31 | [SRC]context.getFlowScope().put("id", "2") [MSG]getFlowScope() can probably be rewritten as flowScope |
UnnecessaryGetter | 2 | 33 | [SRC]assert "contextRelative:/book/show/2" == ext.getExternalRedirectUrl() [MSG]getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
JUnitPublicNonTestMethod | 2 | 156 | [SRC]FlowDefinition registerFlow(String flowId, Closure flowClosure) { [MSG]The method registerFlow is public but not a test method |
JUnitPublicNonTestMethod | 2 | 165 | [SRC]FlowDefinition getFlowDefinition() { [MSG]The method getFlowDefinition is public but not a test method |
JUnitPublicNonTestMethod | 2 | 173 | [SRC]String getFlowId() { 'testFlow' } [MSG]The method getFlowId is public but not a test method |
JUnitPublicNonTestMethod | 2 | 175 | [SRC]abstract Closure getFlowClosure() [MSG]The method getFlowClosure is public but not a test method |
JUnitSetUpCallsSuper | 2 | 63 | [SRC]final void setUp() throws Exception { [MSG]The method setUp() does not call super.setUp() |
JUnitTearDownCallsSuper | 2 | 136 | [SRC]final void tearDown() { [MSG]The method tearDown() does not call super.tearDown() |
AbcComplexity | 2 | 63 | [SRC]final void setUp() throws Exception { [MSG]The ABC score for method [setUp] is [75.0] |
UnnecessaryGetter | 2 | 110 | [SRC]appCtx = springConfig.getApplicationContext() [MSG]getApplicationContext() can probably be rewritten as applicationContext |
UnnecessaryGetter | 2 | 118 | [SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser() [MSG]getExpressionParser() can probably be rewritten as expressionParser |
UnnecessaryGetter | 2 | 157 | [SRC]FlowBuilder builder = new FlowBuilder(flowId, flowClosur..nRegistry()) [MSG]getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry |
UnnecessaryGetter | 2 | 160 | [SRC]FlowAssembler assembler = new FlowAssembler(builder, bui..erContext()) [MSG]getFlowBuilderContext() can probably be rewritten as flowBuilderContext |
UnnecessaryGetter | 2 | 161 | [SRC]getFlowDefinitionRegistry().registerFlowDefinition(new D..(assembler)) [MSG]getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry |
UnnecessaryGetter | 2 | 162 | [SRC]return getFlowDefinitionRegistry().getFlowDefinition(flowId) [MSG]getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry |
UnnecessaryGetter | 2 | 166 | [SRC]return registerFlow(getFlowId(), getFlowClosure()) [MSG]getFlowId() can probably be rewritten as flowId |
UnnecessaryGetter | 2 | 166 | [SRC]return registerFlow(getFlowId(), getFlowClosure()) [MSG]getFlowClosure() can probably be rewritten as flowClosure |
UnusedImport | 3 | 15 | [SRC]import org.codehaus.groovy.runtime.InvokerHelper |