Package | Total Files | Files with Violations | Priority 1 | Priority 2 | Priority 3 |
---|---|---|---|---|---|
All Packages | 66 | 65 | - | 354 | 1522 |
tech/muyan | 23 | 22 | - | 142 | 672 |
tech/muyan/customise | 1 | 1 | - | 1 | 5 |
tech/muyan/dynamic | 1 | 1 | - | 6 | 13 |
tech/muyan/dynamic/field | 3 | 3 | - | 28 | 72 |
tech/muyan/dynamic/form | 3 | 3 | - | 17 | 57 |
tech/muyan/enums | 11 | 11 | - | 45 | 127 |
tech/muyan/helper | 6 | 6 | - | 33 | 267 |
tech/muyan/importexport | 5 | 5 | - | 33 | 113 |
tech/muyan/importexport/converter | 2 | 2 | - | 4 | 14 |
tech/muyan/security | 11 | 11 | - | 45 | 182 |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 14 | [SRC]class ActionMetaController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
DuplicateStringLiteral | 2 | 42 | [SRC]updateRoles, 'update', 'PUT', "/${domainName}/**", [MSG]Duplicate String Literal: update |
DuplicateStringLiteral | 2 | 46 | [SRC]result = buildErrorMsg(deleteRoles, 'delete', 'DELETE', ..inName}/**", [MSG]Duplicate String Literal: delete |
DuplicateStringLiteral | 2 | 50 | [SRC]result.put("update", canUpdateFromRole) [MSG]Duplicate String Literal: update |
DuplicateStringLiteral | 2 | 51 | [SRC]result.put("delete", canDeleteFromRole) [MSG]Duplicate String Literal: delete |
DuplicateNumberLiteral | 2 | 68 | [SRC]Map<String, Object> params = new HashMap<>(8) [MSG]Duplicate Number Literal: 8 |
DuplicateStringLiteral | 2 | 69 | [SRC]params.put("objectType", clazz) [MSG]Duplicate String Literal: objectType |
DuplicateStringLiteral | 2 | 70 | [SRC]params.put("userContext", auth) [MSG]Duplicate String Literal: userContext |
DuplicateStringLiteral | 2 | 71 | [SRC]params.put("application", grailsApplication) [MSG]Duplicate String Literal: application |
DuplicateStringLiteral | 2 | 75 | [SRC]createRoles, 'create', 'POST', "/${domainName}", [MSG]Duplicate String Literal: create |
DuplicateStringLiteral | 2 | 79 | [SRC]result.put("create", canCreateBasedOnRole) [MSG]Duplicate String Literal: create |
FactoryMethodName | 2 | 84 | [SRC]static Map<String, Object> buildErrorMsg( [MSG]Violation in class ActionMetaController. The method 'buildErrorMsg' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
FieldTypeRequired | 3 | 15 | [SRC]static responseFormats = ['json', 'xml'] [MSG]The type is not specified for field "responseFormats" |
MethodReturnTypeRequired | 3 | 20 | [SRC]def canUpdateAndDelete(String domainName, Long id) { [MSG]Method "canUpdateAndDelete" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def canUpdateAndDelete(String domainName, Long id) { [MSG]def for method return type should not be used |
NoDef | 3 | 21 | [SRC]def auth = springSecurityService.authentication [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 21 | [SRC]def auth = springSecurityService.authentication [MSG]The type is not specified for variable "auth" |
NoDef | 3 | 22 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]The type is not specified for variable "clazz" |
NoDef | 3 | 23 | [SRC]def clazzName = clazz.getName() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 23 | [SRC]def clazzName = clazz.getName() [MSG]The type is not specified for variable "clazzName" |
UnnecessaryGetter | 3 | 23 | [SRC]def clazzName = clazz.getName() [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 24 | [SRC]def actionLogic = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 24 | [SRC]def actionLogic = DynamicLogic.where { [MSG]The type is not specified for variable "actionLogic" |
NoDef | 3 | 30 | [SRC]def canUpdateFromRole = AuthorityHelper.checkAuthority(a..updateRoles) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 30 | [SRC]def canUpdateFromRole = AuthorityHelper.checkAuthority(a..updateRoles) [MSG]The type is not specified for variable "canUpdateFromRole" |
NoDef | 3 | 31 | [SRC]def canDeleteFromRole = AuthorityHelper.checkAuthority(a..deleteRoles) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 31 | [SRC]def canDeleteFromRole = AuthorityHelper.checkAuthority(a..deleteRoles) [MSG]The type is not specified for variable "canDeleteFromRole" |
NoDef | 3 | 34 | [SRC]def object = clazz.get(id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 34 | [SRC]def object = clazz.get(id) [MSG]The type is not specified for variable "object" |
UnnecessaryGString | 3 | 35 | [SRC]params.put("objectType", clazz) [MSG]The String 'objectType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]params.put("objectValue", object) [MSG]The String 'objectValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]params.put("userContext", auth) [MSG]The String 'userContext' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]params.put("application", grailsApplication) [MSG]The String 'application' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]if (result.get("update") == true && !canUpdateFromRole) { [MSG]The String 'update' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 45 | [SRC]if (result.get("delete") == true && !canDeleteFromRole) { [MSG]The String 'delete' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]result.put("update", canUpdateFromRole) [MSG]The String 'update' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]result.put("delete", canDeleteFromRole) [MSG]The String 'delete' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 57 | [SRC]def canCreate(String domainName) { [MSG]Method "canCreate" has a dynamic return type |
NoDef | 3 | 57 | [SRC]def canCreate(String domainName) { [MSG]def for method return type should not be used |
NoDef | 3 | 58 | [SRC]def auth = springSecurityService.authentication [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 58 | [SRC]def auth = springSecurityService.authentication [MSG]The type is not specified for variable "auth" |
NoDef | 3 | 59 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 59 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]The type is not specified for variable "clazz" |
NoDef | 3 | 60 | [SRC]def clazzName = clazz.getName() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 60 | [SRC]def clazzName = clazz.getName() [MSG]The type is not specified for variable "clazzName" |
UnnecessaryGetter | 3 | 60 | [SRC]def clazzName = clazz.getName() [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 61 | [SRC]def actionLogic = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 61 | [SRC]def actionLogic = DynamicLogic.where { [MSG]The type is not specified for variable "actionLogic" |
NoDef | 3 | 64 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 64 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
NoDef | 3 | 66 | [SRC]def canCreateBasedOnRole = AuthorityHelper.checkAuthorit..createRoles) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 66 | [SRC]def canCreateBasedOnRole = AuthorityHelper.checkAuthorit..createRoles) [MSG]The type is not specified for variable "canCreateBasedOnRole" |
UnnecessaryGString | 3 | 69 | [SRC]params.put("objectType", clazz) [MSG]The String 'objectType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]params.put("userContext", auth) [MSG]The String 'userContext' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]params.put("application", grailsApplication) [MSG]The String 'application' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 73 | [SRC]if (result.get("create") == true && !canCreateBasedOnRole) { [MSG]The String 'create' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 79 | [SRC]result.put("create", canCreateBasedOnRole) [MSG]The String 'create' can be wrapped in single quotes instead of double quotes |
StaticMethodsBeforeInstanceMethods | 3 | 84 | [SRC]static Map<String, Object> buildErrorMsg( [MSG]The public static method buildErrorMsg in class tech.muyan.ActionMetaController is declared after a public instance method |
UnnecessaryGString | 3 | 98 | [SRC]result.put("error", 1) [MSG]The String 'error' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 100 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class ApplicationController implements PluginManagerAware { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
NoWildcardImports | 3 | 4 | [SRC]import grails.plugins.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 11 | [SRC]def index() { [MSG]Method "index" has a dynamic return type |
NoDef | 3 | 11 | [SRC]def index() { [MSG]def for method return type should not be used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 14 | [SRC]class BootStrap { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ImplementationAsType | 2 | 25 | [SRC]HashMap<String, Collection<Map<String, Object>>> metas =..Application) |
EmptyIfStatement | 2 | 54 | [SRC]if (environment == Environment.DEVELOPMENT || environmen..ment.TEST) { [MSG]The if statement is empty |
UnnecessaryGString | 3 | 18 | [SRC]public static final String DEFAULT_SEED_DATA_FOLDER = "/app/data" [MSG]The String '/app/data' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 23 | [SRC]def importSeedDataFromCsv(File directory) { [MSG]Method "importSeedDataFromCsv" has a dynamic return type |
NoDef | 3 | 23 | [SRC]def importSeedDataFromCsv(File directory) { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 28 | [SRC]log.info("To import csv files(sorted): [\n${sortedFiles...("\n")}\n]") [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 34 | [SRC]def init = { servletContext -> [MSG]The type is not specified for field "init" |
NoDef | 3 | 43 | [SRC]def environment = Environment.getCurrent() [MSG]def for declaration should not be used |
NoDef | 3 | 43 | [SRC]def environment = Environment.getCurrent() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 43 | [SRC]def environment = Environment.getCurrent() [MSG]The type is not specified for variable "environment" |
VariableTypeRequired | 3 | 43 | [SRC]def environment = Environment.getCurrent() [MSG]The type is not specified for variable "environment" |
UnnecessaryGetter | 3 | 43 | [SRC]def environment = Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 3 | 46 | [SRC]String seedDataFolder = grailsApplication.getConfig().ge..DATA_FOLDER) [MSG]getConfig() can probably be rewritten as config |
UnnecessaryGetter | 3 | 47 | [SRC]File directory = new File(seedDataFolder + File.separato..t.getName()) [MSG]getName() can probably be rewritten as name |
InvertedIfElse | 3 | 48 | [SRC]if (!directory.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
InvertedIfElse | 3 | 48 | [SRC]if (!directory.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
MethodReturnTypeRequired | 3 | 59 | [SRC]def changeMenuInFormToNullable() { [MSG]Method "changeMenuInFormToNullable" has a dynamic return type |
NoDef | 3 | 59 | [SRC]def changeMenuInFormToNullable() { [MSG]def for method return type should not be used |
NoDef | 3 | 60 | [SRC]def sql = new Sql(dataSource) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 60 | [SRC]def sql = new Sql(dataSource) [MSG]The type is not specified for variable "sql" |
FieldTypeRequired | 3 | 65 | [SRC]def destroy = { [MSG]The type is not specified for field "destroy" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 15 | [SRC]class ColumnMetaController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
FieldTypeRequired | 3 | 16 | [SRC]static responseFormats = ['json', 'html'] [MSG]The type is not specified for field "responseFormats" |
MethodReturnTypeRequired | 3 | 20 | [SRC]def refresh(String domainName, String sourceColumn, Stri..estColumn) { [MSG]Method "refresh" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def refresh(String domainName, String sourceColumn, Stri..estColumn) { [MSG]def for method return type should not be used |
NoDef | 3 | 21 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 21 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]The type is not specified for variable "clazz" |
NoDef | 3 | 22 | [SRC]def clazzName = clazz.getName() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def clazzName = clazz.getName() [MSG]The type is not specified for variable "clazzName" |
UnnecessaryGetter | 3 | 22 | [SRC]def clazzName = clazz.getName() [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 23 | [SRC]def decideLogics = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 23 | [SRC]def decideLogics = DynamicLogic.where { [MSG]The type is not specified for variable "decideLogics" |
NoDef | 3 | 30 | [SRC]def object = request.getJSON() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 30 | [SRC]def object = request.getJSON() [MSG]The type is not specified for variable "object" |
UnnecessaryGetter | 3 | 30 | [SRC]def object = request.getJSON() [MSG]getJSON() can probably be rewritten as JSON |
NoDef | 3 | 31 | [SRC]def sourceColumnValue = object.get(sourceColumn) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 31 | [SRC]def sourceColumnValue = object.get(sourceColumn) [MSG]The type is not specified for variable "sourceColumnValue" |
UnnecessaryGString | 3 | 32 | [SRC]params.put("domainName", domainName) [MSG]The String 'domainName' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]params.put("sourceColumn", sourceColumn) [MSG]The String 'sourceColumn' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]params.put("destColumn", destColumn) [MSG]The String 'destColumn' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]params.put("sourceColumnValue", sourceColumnValue) [MSG]The String 'sourceColumnValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]params.put("object", object) [MSG]The String 'object' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]params.put("application", grailsApplication) [MSG]The String 'application' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 37 | [SRC]params.put("application", grailsApplication) [MSG]The code could be more concise by using a with() or identity() block |
NoDef | 3 | 38 | [SRC]def result = Engine.run(params, it.code, this.class.classLoader) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 38 | [SRC]def result = Engine.run(params, it.code, this.class.classLoader) [MSG]The type is not specified for variable "result" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class Contract extends WithDynamicFields<Contract> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 10 | [SRC]class Contract extends WithDynamicFields<Contract> { [MSG]The domain class tech.muyan.Contract should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]class Contract extends WithDynamicFields<Contract> { [MSG]The domain class tech.muyan.Contract should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 16 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 19 | [SRC]String title [MSG]There is no constraint on the size of String property 'title' which will result in applying database defaults |
DuplicateNumberLiteral | 2 | 55 | [SRC]title boost: 1.0 [MSG]Duplicate Number Literal: 1.0 |
DuplicateStringLiteral | 2 | 56 | [SRC]except = ['effectiveDate', 'lines', 'contractStatus'] [MSG]Duplicate String Literal: effectiveDate |
FieldTypeRequired | 3 | 31 | [SRC]static belongsTo = [ownerOrganization: Organization] [MSG]The type is not specified for field "belongsTo" |
StaticFieldsBeforeInstanceFields | 3 | 31 | [SRC]static belongsTo = [ownerOrganization: Organization] [MSG]The static field belongsTo in class tech.muyan.Contract is declared after an instance field |
FieldTypeRequired | 3 | 34 | [SRC]static hasMany = [lines: ContractLine] [MSG]The type is not specified for field "hasMany" |
StaticFieldsBeforeInstanceFields | 3 | 34 | [SRC]static hasMany = [lines: ContractLine] [MSG]The static field hasMany in class tech.muyan.Contract is declared after an instance field |
FieldTypeRequired | 3 | 37 | [SRC]static labelField = "title" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 37 | [SRC]static labelField = "title" [MSG]The static field labelField in class tech.muyan.Contract is declared after an instance field |
UnnecessaryGString | 3 | 37 | [SRC]static labelField = "title" [MSG]The String 'title' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 39 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 39 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.Contract is declared after an instance field |
DuplicateMapLiteral | 3 | 44 | [SRC]total nullable: true [MSG]Map [nullable:true] is duplicated. |
FieldTypeRequired | 3 | 47 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 47 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.Contract is declared after an instance field |
FieldTypeRequired | 3 | 53 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 53 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.Contract is declared after an instance field |
DuplicateMapLiteral | 3 | 55 | [SRC]title boost: 1.0 [MSG]Map [boost:1.0] is duplicated. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class ContractLine extends WithDynamicFields<ContractLine> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 6 | [SRC]class ContractLine extends WithDynamicFields<ContractLine> { [MSG]The domain class tech.muyan.ContractLine should define an equals(Object) method |
GrailsDomainHasToString | 2 | 6 | [SRC]class ContractLine extends WithDynamicFields<ContractLine> { [MSG]The domain class tech.muyan.ContractLine should define a toString() method |
FieldTypeRequired | 3 | 14 | [SRC]static belongsTo = [contract: Contract, lineType: ContractLineType] [MSG]The type is not specified for field "belongsTo" |
StaticFieldsBeforeInstanceFields | 3 | 14 | [SRC]static belongsTo = [contract: Contract, lineType: ContractLineType] [MSG]The static field belongsTo in class tech.muyan.ContractLine is declared after an instance field |
FieldTypeRequired | 3 | 16 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 16 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.ContractLine is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 4 | [SRC]class ContractLineType { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 4 | [SRC]class ContractLineType { [MSG]The domain class tech.muyan.ContractLineType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 4 | [SRC]class ContractLineType { [MSG]The domain class tech.muyan.ContractLineType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 7 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 10 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldTypeRequired | 3 | 12 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 12 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.ContractLineType is declared after an instance field |
FieldTypeRequired | 3 | 17 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 17 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.ContractLineType is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 15 | [SRC]class DataLoadController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ImplementationAsType | 2 | 41 | [SRC]HashMap<String, Collection<Map<String, Object>>> metas =..Application) |
FieldTypeRequired | 3 | 16 | [SRC]static responseFormats = ['json', 'html'] [MSG]The type is not specified for field "responseFormats" |
StaticFieldsBeforeInstanceFields | 3 | 21 | [SRC]public static final String SEED_DATA_FOLDER = 'seedData.folder' [MSG]The static field SEED_DATA_FOLDER in class tech.muyan.DataLoadController is declared after an instance field |
StaticFieldsBeforeInstanceFields | 3 | 22 | [SRC]public static final String DEFAULT_SEED_DATA_FOLDER = "/app/data" [MSG]The static field DEFAULT_SEED_DATA_FOLDER in class tech.muyan.DataLoadController is declared after an instance field |
UnnecessaryGString | 3 | 22 | [SRC]public static final String DEFAULT_SEED_DATA_FOLDER = "/app/data" [MSG]The String '/app/data' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 25 | [SRC]def reload() { [MSG]Method "reload" has a dynamic return type |
NoDef | 3 | 25 | [SRC]def reload() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 26 | [SRC]log.info("Reload called") [MSG]The String 'Reload called' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 27 | [SRC]def environment = Environment.getCurrent() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def environment = Environment.getCurrent() [MSG]The type is not specified for variable "environment" |
UnnecessaryGetter | 3 | 27 | [SRC]def environment = Environment.getCurrent() [MSG]getCurrent() can probably be rewritten as current |
UnnecessaryGetter | 3 | 28 | [SRC]String seedDataFolder = grailsApplication.getConfig().ge..DATA_FOLDER) [MSG]getConfig() can probably be rewritten as config |
UnnecessaryGetter | 3 | 29 | [SRC]File directory = new File(seedDataFolder + File.separato..t.getName()) [MSG]getName() can probably be rewritten as name |
InvertedIfElse | 3 | 30 | [SRC]if (!directory.exists()) { [MSG]Testing the negative condition first can make an if statement confusing |
NoDef | 3 | 35 | [SRC]def result = [status: "success"] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 35 | [SRC]def result = [status: "success"] [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 35 | [SRC]def result = [status: "success"] [MSG]The String 'success' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 39 | [SRC]private static def importSeedDataFromCsv(File directory,..plication) { [MSG]Method "importSeedDataFromCsv" has a dynamic return type |
NoDef | 3 | 39 | [SRC]private static def importSeedDataFromCsv(File directory,..plication) { [MSG]def for method return type should not be used |
UnnecessaryDefInMethodDeclaration | 3 | 39 | [SRC]private static def importSeedDataFromCsv(File directory,..plication) { [MSG]Violation in class tech.muyan.DataLoadController. The def keyword is unneeded when a method is marked private |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class DomainClass { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 11 | [SRC]class DomainClass { [MSG]The domain class tech.muyan.DomainClass should define an equals(Object) method |
GrailsDomainHasToString | 2 | 11 | [SRC]class DomainClass { [MSG]The domain class tech.muyan.DomainClass should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 14 | [SRC]String fullName [MSG]There is no constraint on the size of String property 'fullName' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 17 | [SRC]String shortName [MSG]There is no constraint on the size of String property 'shortName' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 20 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
DuplicateNumberLiteral | 2 | 34 | [SRC]label boost: 2.0 [MSG]Duplicate Number Literal: 2.0 |
StaticFieldsBeforeInstanceFields | 3 | 23 | [SRC]static List<DomainClass> cachedObjects [MSG]The static field cachedObjects in class tech.muyan.DomainClass is declared after an instance field |
FieldTypeRequired | 3 | 25 | [SRC]static hasMany = [dynamicFields: ObjectDynamicField, dyn..ynamicLogic] [MSG]The type is not specified for field "hasMany" |
StaticFieldsBeforeInstanceFields | 3 | 25 | [SRC]static hasMany = [dynamicFields: ObjectDynamicField, dyn..ynamicLogic] [MSG]The static field hasMany in class tech.muyan.DomainClass is declared after an instance field |
FieldTypeRequired | 3 | 27 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.DomainClass is declared after an instance field |
DuplicateMapLiteral | 3 | 29 | [SRC]shortName updateable: false, editable: false, unique: true [MSG]Map [updateable:false, editable:false, unique:true] is duplicated. |
FieldTypeRequired | 3 | 32 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 32 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.DomainClass is declared after an instance field |
DuplicateMapLiteral | 3 | 34 | [SRC]label boost: 2.0 [MSG]Map [boost:2.0] is duplicated. |
UnnecessaryReturnKeyword | 3 | 43 | [SRC]return cachedObjects [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 18 | [SRC]class DomainDataController extends RestfulController<DummyDomain> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
NoWildcardImports | 3 | 4 | [SRC]import grails.gorm.transactions.* [MSG]Wildcard (star) import |
MisorderedStaticImports | 3 | 11 | [SRC]import static tech.muyan.helper.DynamicFieldHelper.hasDynamicFields [MSG]Static imports should appear before normal imports |
FieldTypeRequired | 3 | 38 | [SRC]static scope = "prototype" [MSG]The type is not specified for field "scope" |
StaticFieldsBeforeInstanceFields | 3 | 38 | [SRC]static scope = "prototype" [MSG]The static field scope in class tech.muyan.DomainDataController is declared after an instance field |
UnnecessaryGString | 3 | 38 | [SRC]static scope = "prototype" [MSG]The String 'prototype' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 40 | [SRC]static responseFormats = ['json', 'html'] [MSG]The type is not specified for field "responseFormats" |
StaticFieldsBeforeInstanceFields | 3 | 40 | [SRC]static responseFormats = ['json', 'html'] [MSG]The static field responseFormats in class tech.muyan.DomainDataController is declared after an instance field |
MethodReturnTypeRequired | 3 | 53 | [SRC]def update(String domainName) { [MSG]Method "update" has a dynamic return type |
NoDef | 3 | 53 | [SRC]def update(String domainName) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 57 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
NoDef | 3 | 58 | [SRC]def domainObj = getResource().get(params.id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 58 | [SRC]def domainObj = getResource().get(params.id) [MSG]The type is not specified for variable "domainObj" |
UnnecessaryGetter | 3 | 58 | [SRC]def domainObj = getResource().get(params.id) [MSG]getResource() can probably be rewritten as resource |
InvertedCondition | 3 | 59 | [SRC]if (null == domainObj) { [MSG]null is a constant expression on the left side of a compare equals operation |
NoDef | 3 | 64 | [SRC]def jsonObj = request.JSON [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 64 | [SRC]def jsonObj = request.JSON [MSG]The type is not specified for variable "jsonObj" |
NoDef | 3 | 66 | [SRC]def dynamicFieldValues = DynamicFieldHelper.parseDynamic..bj, jsonObj, [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 66 | [SRC]def dynamicFieldValues = DynamicFieldHelper.parseDynamic..bj, jsonObj, [MSG]The type is not specified for variable "dynamicFieldValues" |
UnnecessaryGetter | 3 | 70 | [SRC]domainObj.properties = getObjectToBind() [MSG]getObjectToBind() can probably be rewritten as objectToBind |
MethodReturnTypeRequired | 3 | 83 | [SRC]def show(String domainName) { [MSG]Method "show" has a dynamic return type |
NoDef | 3 | 83 | [SRC]def show(String domainName) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 87 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
NoDef | 3 | 88 | [SRC]def resource = queryForResource(params.id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 88 | [SRC]def resource = queryForResource(params.id) [MSG]The type is not specified for variable "resource" |
MethodReturnTypeRequired | 3 | 104 | [SRC]def showMultiple(String domainName) { [MSG]Method "showMultiple" has a dynamic return type |
NoDef | 3 | 104 | [SRC]def showMultiple(String domainName) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 105 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
UnnecessaryGString | 3 | 106 | [SRC]List ids = params.ids.split(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 110 | [SRC]def resource = queryForResource(id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 110 | [SRC]def resource = queryForResource(id) [MSG]The type is not specified for variable "resource" |
NoDef | 3 | 111 | [SRC]def withDfs = DomainHelper.getDomainObjectWithDynamicField(resource) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 111 | [SRC]def withDfs = DomainHelper.getDomainObjectWithDynamicField(resource) [MSG]The type is not specified for variable "withDfs" |
MethodReturnTypeRequired | 3 | 125 | [SRC]save(String domainName) { [MSG]Method "save" has a dynamic return type |
NoDef | 3 | 125 | [SRC]save(String domainName) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 126 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
NoDef | 3 | 127 | [SRC]def jsonObj = request.JSON [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 127 | [SRC]def jsonObj = request.JSON [MSG]The type is not specified for variable "jsonObj" |
NoDef | 3 | 128 | [SRC]def domainObj = super.createResource() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 128 | [SRC]def domainObj = super.createResource() [MSG]The type is not specified for variable "domainObj" |
NoDef | 3 | 136 | [SRC]def dynamicFieldValues = DynamicFieldHelper.parseDynamic..bj, jsonObj, [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 136 | [SRC]def dynamicFieldValues = DynamicFieldHelper.parseDynamic..bj, jsonObj, [MSG]The type is not specified for variable "dynamicFieldValues" |
UnnecessaryGString | 3 | 142 | [SRC]log.error("Failed to save object with value: {}", jsonObj) [MSG]The String 'Failed to save object with value: {}' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 148 | [SRC]def delete(String domainName) { [MSG]Method "delete" has a dynamic return type |
NoDef | 3 | 148 | [SRC]def delete(String domainName) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 149 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
NoDef | 3 | 154 | [SRC]def obj = queryForResource(params.id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 154 | [SRC]def obj = queryForResource(params.id) [MSG]The type is not specified for variable "obj" |
DuplicateMapLiteral | 3 | 161 | [SRC]obj.delete flush: true [MSG]Map [flush:true] is duplicated. |
UnnecessaryGString | 3 | 162 | [SRC]respond "success" [MSG]The String 'success' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 169 | [SRC]def index(String domainName, Integer max) { [MSG]Method "index" has a dynamic return type |
NoDef | 3 | 169 | [SRC]def index(String domainName, Integer max) { [MSG]def for method return type should not be used |
UnnecessarySetter | 3 | 170 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
UnnecessaryGString | 3 | 173 | [SRC]params.sort = "id" [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 174 | [SRC]def resources = getResource().listOrderById(max: params...der: "desc") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 174 | [SRC]def resources = getResource().listOrderById(max: params...der: "desc") [MSG]The type is not specified for variable "resources" |
UnnecessaryGetter | 3 | 174 | [SRC]def resources = getResource().listOrderById(max: params...der: "desc") [MSG]getResource() can probably be rewritten as resource |
UnnecessaryGString | 3 | 174 | [SRC]def resources = getResource().listOrderById(max: params...der: "desc") [MSG]The String 'desc' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 176 | [SRC]def count = getResource().count() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 176 | [SRC]def count = getResource().count() [MSG]The type is not specified for variable "count" |
UnnecessaryGetter | 3 | 176 | [SRC]def count = getResource().count() [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 177 | [SRC]def data = [ [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 177 | [SRC]def data = [ [MSG]The type is not specified for variable "data" |
UnnecessarySetter | 3 | 186 | [SRC]setResource(clazz) [MSG]setResource(..) can probably be rewritten as resource = .. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class DomainMetaConfig { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
FieldName | 2 | 15 | [SRC]public static ConstraintTypeToDisplayMap = [ [MSG]The fieldname ConstraintTypeToDisplayMap in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
FieldName | 2 | 29 | [SRC]public static AttributeTypeToClientTypeMap = [ [MSG]The fieldname AttributeTypeToClientTypeMap in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
DuplicateStringLiteral | 2 | 31 | [SRC]"java.lang.Double" : "decimal", [MSG]Duplicate String Literal: decimal |
DuplicateStringLiteral | 2 | 33 | [SRC]"java.lang.Long" : "integer", [MSG]Duplicate String Literal: integer |
DuplicateStringLiteral | 2 | 37 | [SRC]"java.math.BigDecimal" : "decimal", [MSG]Duplicate String Literal: decimal |
FieldName | 2 | 46 | [SRC]public static FieldNameToSpecialClientTypeMap = [ [MSG]The fieldname FieldNameToSpecialClientTypeMap in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
DuplicateStringLiteral | 2 | 52 | [SRC]"tech.muyan.dynamic.DynamicLogic.targetField": "staticField", [MSG]Duplicate String Literal: staticField |
FieldName | 2 | 62 | [SRC]public static DisplayComponentToTypeMapping = [:] [MSG]The fieldname DisplayComponentToTypeMapping in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
DuplicateStringLiteral | 2 | 70 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.A..ATE, "date") [MSG]Duplicate String Literal: date |
DuplicateStringLiteral | 2 | 71 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.A.. "datetime") [MSG]Duplicate String Literal: datetime |
DuplicateStringLiteral | 2 | 72 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.., "decimal") [MSG]Duplicate String Literal: decimal |
DuplicateStringLiteral | 2 | 73 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.., "integer") [MSG]Duplicate String Literal: integer |
DuplicateStringLiteral | 2 | 80 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_multiple") [MSG]Duplicate String Literal: df_multiple |
DuplicateStringLiteral | 2 | 81 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.., "df_tags") [MSG]Duplicate String Literal: df_tags |
DuplicateStringLiteral | 2 | 82 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.."df_single") [MSG]Duplicate String Literal: df_single |
DuplicateStringLiteral | 2 | 84 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F..f_multiple") [MSG]Duplicate String Literal: df_multiple |
DuplicateStringLiteral | 2 | 85 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.., "df_tags") [MSG]Duplicate String Literal: df_tags |
DuplicateStringLiteral | 2 | 86 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.."df_single") [MSG]Duplicate String Literal: df_single |
DuplicateStringLiteral | 2 | 91 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S..f_checkbox") [MSG]Duplicate String Literal: df_checkbox |
DuplicateStringLiteral | 2 | 92 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.. "df_radio") [MSG]Duplicate String Literal: df_radio |
DuplicateStringLiteral | 2 | 94 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_checkbox") [MSG]Duplicate String Literal: df_checkbox |
DuplicateStringLiteral | 2 | 95 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.. "df_radio") [MSG]Duplicate String Literal: df_radio |
FieldName | 2 | 106 | [SRC]public static MultipleSelectionTypes = [ [MSG]The fieldname MultipleSelectionTypes in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
FieldName | 2 | 125 | [SRC]public static SingleSelectionTypes = [ [MSG]The fieldname SingleSelectionTypes in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
FieldName | 2 | 144 | [SRC]public static IdFieldMetaData = [ [MSG]The fieldname IdFieldMetaData in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
DuplicateStringLiteral | 2 | 146 | [SRC]dataIndex: "id", [MSG]Duplicate String Literal: id |
DuplicateStringLiteral | 2 | 147 | [SRC]key : "id", [MSG]Duplicate String Literal: id |
DuplicateStringLiteral | 2 | 151 | [SRC]type : "integer" [MSG]Duplicate String Literal: integer |
FieldName | 2 | 157 | [SRC]public static HideDomain = [ [MSG]The fieldname HideDomain in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
FieldName | 2 | 169 | [SRC]public static String DynamicFieldKeyPrefix = "df_" [MSG]The fieldname DynamicFieldKeyPrefix in class tech.muyan.DomainMetaConfig does not match [a-z][a-zA-Z0-9]* |
FieldName | 2 | 174 | [SRC]public static final String DynamicPropertiesMapKey = "dynamic" [MSG]The fieldname DynamicPropertiesMapKey in class tech.muyan.DomainMetaConfig does not match [A-Z][A-Z0-9_]* |
FieldTypeRequired | 3 | 15 | [SRC]public static ConstraintTypeToDisplayMap = [ [MSG]The type is not specified for field "ConstraintTypeToDisplayMap" |
UnnecessaryGString | 3 | 16 | [SRC]"org.grails.datastore.gorm.validation.constraints.BlankC.. : "blank", [MSG]The String 'org.grails.datastore.gorm.validation.constraints.BlankConstraint' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]"org.grails.datastore.gorm.validation.constraints.BlankC.. : "blank", [MSG]The String 'blank' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]"org.grails.datastore.gorm.validation.constraints.Nullab.. "nullable", [MSG]The String 'org.grails.datastore.gorm.validation.constraints.NullableConstraint' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]"org.grails.datastore.gorm.validation.constraints.Nullab.. "nullable", [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]"org.grails.datastore.gorm.validation.constraints.builti..": "unique", [MSG]The String 'org.grails.datastore.gorm.validation.constraints.builtin.UniqueConstraint' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]"org.grails.datastore.gorm.validation.constraints.builti..": "unique", [MSG]The String 'unique' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]"org.grails.datastore.gorm.validation.constraints.Valida.."validator", [MSG]The String 'org.grails.datastore.gorm.validation.constraints.ValidatorConstraint' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]"org.grails.datastore.gorm.validation.constraints.Valida.."validator", [MSG]The String 'validator' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 29 | [SRC]public static AttributeTypeToClientTypeMap = [ [MSG]The type is not specified for field "AttributeTypeToClientTypeMap" |
UnnecessaryGString | 3 | 30 | [SRC]"java.lang.Float" : "decimal", [MSG]The String 'java.lang.Float' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]"java.lang.Float" : "decimal", [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]"java.lang.Double" : "decimal", [MSG]The String 'java.lang.Double' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]"java.lang.Double" : "decimal", [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"java.lang.Integer" : "integer", [MSG]The String 'java.lang.Integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"java.lang.Integer" : "integer", [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"java.lang.Long" : "integer", [MSG]The String 'java.lang.Long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"java.lang.Long" : "integer", [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]"java.time.LocalDateTime": "datetime", [MSG]The String 'java.time.LocalDateTime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]"java.time.LocalDateTime": "datetime", [MSG]The String 'datetime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]"java.time.LocalDate" : "date", [MSG]The String 'java.time.LocalDate' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]"java.time.LocalDate" : "date", [MSG]The String 'date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]"java.lang.String" : "string", [MSG]The String 'java.lang.String' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]"java.lang.String" : "string", [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]"java.math.BigDecimal" : "decimal", [MSG]The String 'java.math.BigDecimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]"java.math.BigDecimal" : "decimal", [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]"java.lang.Boolean" : "boolean", [MSG]The String 'java.lang.Boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]"java.lang.Boolean" : "boolean", [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 39 | [SRC]"java.util.Set" : "array", [MSG]The String 'java.util.Set' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 39 | [SRC]"java.util.Set" : "array", [MSG]The String 'array' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 46 | [SRC]public static FieldNameToSpecialClientTypeMap = [ [MSG]The type is not specified for field "FieldNameToSpecialClientTypeMap" |
TrailingComma | 3 | 46 | [SRC]public static FieldNameToSpecialClientTypeMap = [ [MSG]Map should contain trailing comma. |
UnnecessaryGString | 3 | 48 | [SRC]"tech.muyan.dynamic.field.DynamicFieldDefinition.options..n" : "tags", [MSG]The String 'tech.muyan.dynamic.field.DynamicFieldDefinition.optionsJson' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"tech.muyan.dynamic.field.DynamicFieldDefinition.options..n" : "tags", [MSG]The String 'tags' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"tech.muyan.dynamic.DynamicLogic.code" : "code", [MSG]The String 'tech.muyan.dynamic.DynamicLogic.code' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"tech.muyan.dynamic.DynamicLogic.code" : "code", [MSG]The String 'code' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"tech.muyan.dynamic.DynamicLogic.triggerField": "staticField", [MSG]The String 'tech.muyan.dynamic.DynamicLogic.triggerField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"tech.muyan.dynamic.DynamicLogic.triggerField": "staticField", [MSG]The String 'staticField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"tech.muyan.dynamic.DynamicLogic.targetField": "staticField", [MSG]The String 'tech.muyan.dynamic.DynamicLogic.targetField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"tech.muyan.dynamic.DynamicLogic.targetField": "staticField", [MSG]The String 'staticField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]"tech.muyan.security.RequestMap.httpMethod" : "httpMethod", [MSG]The String 'tech.muyan.security.RequestMap.httpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]"tech.muyan.security.RequestMap.httpMethod" : "httpMethod", [MSG]The String 'httpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 56 | [SRC]"tech.muyan.security.RequestMap.configAttribute": "roles" [MSG]The String 'tech.muyan.security.RequestMap.configAttribute' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 56 | [SRC]"tech.muyan.security.RequestMap.configAttribute": "roles" [MSG]The String 'roles' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 62 | [SRC]public static DisplayComponentToTypeMapping = [:] [MSG]The type is not specified for field "DisplayComponentToTypeMapping" |
UnnecessaryGString | 3 | 69 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.T..REA, "text") [MSG]The String 'text' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.A..ATE, "date") [MSG]The String 'date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.A.. "datetime") [MSG]The String 'datetime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 72 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.., "decimal") [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 73 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.., "integer") [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 74 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.P..percentage") [MSG]The String 'percentage' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 74 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.P..percentage") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 75 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.C.. "currency") [MSG]The String 'currency' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 75 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.C.. "currency") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 76 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S..f_multiple") [MSG]The String 'df_multiple' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 76 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S..f_multiple") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 77 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.., "df_tags") [MSG]The String 'df_tags' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 77 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.., "df_tags") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 78 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.."df_single") [MSG]The String 'df_single' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 78 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.."df_single") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 80 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_multiple") [MSG]The String 'df_multiple' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 80 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_multiple") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 81 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.., "df_tags") [MSG]The String 'df_tags' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 81 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.., "df_tags") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 82 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.."df_single") [MSG]The String 'df_single' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 82 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.."df_single") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 84 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F..f_multiple") [MSG]The String 'df_multiple' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 84 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F..f_multiple") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 85 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.., "df_tags") [MSG]The String 'df_tags' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 85 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.., "df_tags") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 86 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.."df_single") [MSG]The String 'df_single' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 86 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.."df_single") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 88 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F..f_checkbox") [MSG]The String 'df_checkbox' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 88 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F..f_checkbox") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 89 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.. "df_radio") [MSG]The String 'df_radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 89 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.F.. "df_radio") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 91 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S..f_checkbox") [MSG]The String 'df_checkbox' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 91 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S..f_checkbox") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 92 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.. "df_radio") [MSG]The String 'df_radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 92 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.S.. "df_radio") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 94 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_checkbox") [MSG]The String 'df_checkbox' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 94 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I..f_checkbox") [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 95 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.. "df_radio") [MSG]The String 'df_radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 95 | [SRC]DisplayComponentToTypeMapping.put(DisplayComponentType.I.. "df_radio") [MSG]The code could be more concise by using a with() or identity() block |
FieldTypeRequired | 3 | 106 | [SRC]public static MultipleSelectionTypes = [ [MSG]The type is not specified for field "MultipleSelectionTypes" |
FieldTypeRequired | 3 | 125 | [SRC]public static SingleSelectionTypes = [ [MSG]The type is not specified for field "SingleSelectionTypes" |
FieldTypeRequired | 3 | 144 | [SRC]public static IdFieldMetaData = [ [MSG]The type is not specified for field "IdFieldMetaData" |
TrailingComma | 3 | 144 | [SRC]public static IdFieldMetaData = [ [MSG]Map should contain trailing comma. |
UnnecessaryGString | 3 | 145 | [SRC]title : "id", [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 146 | [SRC]dataIndex: "id", [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 147 | [SRC]key : "id", [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 151 | [SRC]type : "integer" [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 157 | [SRC]public static HideDomain = [ [MSG]The type is not specified for field "HideDomain" |
UnnecessaryGString | 3 | 158 | [SRC]"DummyDomain", [MSG]The String 'DummyDomain' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 159 | [SRC]"DomainClass", [MSG]The String 'DomainClass' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 160 | [SRC]"ContractLine", [MSG]The String 'ContractLine' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 161 | [SRC]"DynamicFieldValue", [MSG]The String 'DynamicFieldValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 162 | [SRC]"AuthenticationToken", [MSG]The String 'AuthenticationToken' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 163 | [SRC]"UserRole", [MSG]The String 'UserRole' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 169 | [SRC]public static String DynamicFieldKeyPrefix = "df_" [MSG]The String 'df_' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 174 | [SRC]public static final String DynamicPropertiesMapKey = "dynamic" [MSG]The String 'dynamic' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 21 | [SRC]class DomainMetaController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
DuplicateNumberLiteral | 2 | 64 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]Duplicate Number Literal: -1 |
DuplicateNumberLiteral | 2 | 86 | [SRC]if (requestMap != null && requestMap.getConfigAttribute(..ll") > -1) { [MSG]Duplicate Number Literal: -1 |
DuplicateStringLiteral | 2 | 86 | [SRC]if (requestMap != null && requestMap.getConfigAttribute(..ll") > -1) { [MSG]Duplicate String Literal: permitAll |
DuplicateStringLiteral | 2 | 97 | [SRC]meta.put('form', [ [MSG]Duplicate String Literal: form |
DuplicateNumberLiteral | 2 | 138 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]Duplicate Number Literal: -1 |
DuplicateStringLiteral | 2 | 138 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]Duplicate String Literal: permitAll |
Instanceof | 2 | 144 | [SRC]if (it instanceof SimpleGrantedAuthority) { [MSG]The instanceof operator is used in class tech.muyan.DomainMetaController |
DuplicateNumberLiteral | 2 | 147 | [SRC]if (!"".equals(authority) && attribute.indexOf(authority) > -1) { [MSG]Duplicate Number Literal: -1 |
VariableName | 2 | 176 | [SRC]final fieldsMap = [:] [MSG]Variable named fieldsMap in class tech.muyan.DomainMetaController does not match the pattern [A-Z][A-Z0-9_]* |
NoWildcardImports | 3 | 4 | [SRC]import grails.gorm.transactions.* [MSG]Wildcard (star) import |
MisorderedStaticImports | 3 | 17 | [SRC]import static tech.muyan.DomainMetaConfig.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 17 | [SRC]import static tech.muyan.DomainMetaConfig.* [MSG]Wildcard (star) import |
MisorderedStaticImports | 3 | 18 | [SRC]import static tech.muyan.enums.MenuType.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 18 | [SRC]import static tech.muyan.enums.MenuType.* [MSG]Wildcard (star) import |
FieldTypeRequired | 3 | 22 | [SRC]static responseFormats = ['json', 'html'] [MSG]The type is not specified for field "responseFormats" |
MethodReturnTypeRequired | 3 | 28 | [SRC]def subMenus(long menuId) { [MSG]Method "subMenus" has a dynamic return type |
NoDef | 3 | 28 | [SRC]def subMenus(long menuId) { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 34 | [SRC]def topMenus() { [MSG]Method "topMenus" has a dynamic return type |
NoDef | 3 | 34 | [SRC]def topMenus() { [MSG]def for method return type should not be used |
MethodParameterTypeRequired | 3 | 39 | [SRC]List getSubMenuOfParent(parentMenu) { [MSG]"parentMenu" parameter of "getSubMenuOfParent" method is dynamically typed |
NoDef | 3 | 39 | [SRC]List getSubMenuOfParent(parentMenu) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 41 | [SRC]def auth = springSecurityService.authentication [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 41 | [SRC]def auth = springSecurityService.authentication [MSG]The type is not specified for variable "auth" |
NoDef | 3 | 42 | [SRC]def authorities = auth.getAuthorities() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 42 | [SRC]def authorities = auth.getAuthorities() [MSG]The type is not specified for variable "authorities" |
UnnecessaryGetter | 3 | 42 | [SRC]def authorities = auth.getAuthorities() [MSG]getAuthorities() can probably be rewritten as authorities |
NoDef | 3 | 43 | [SRC]def organization = OrganizationHelper.getOrganizationOfUser(auth) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 43 | [SRC]def organization = OrganizationHelper.getOrganizationOfUser(auth) [MSG]The type is not specified for variable "organization" |
TrailingComma | 3 | 46 | [SRC]Map<String, Object> meta = [ [MSG]Map should contain trailing comma. |
NoDef | 3 | 54 | [SRC]def linkUrl = menu.link [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 54 | [SRC]def linkUrl = menu.link [MSG]The type is not specified for variable "linkUrl" |
NoDef | 3 | 55 | [SRC]def indexOfQuestionMark = linkUrl.indexOf("?") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 55 | [SRC]def indexOfQuestionMark = linkUrl.indexOf("?") [MSG]The type is not specified for variable "indexOfQuestionMark" |
UnnecessaryGString | 3 | 55 | [SRC]def indexOfQuestionMark = linkUrl.indexOf("?") [MSG]The String '?' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 56 | [SRC]def linkUrlWithoutParameters = (indexOfQuestionMark > -1)? [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 56 | [SRC]def linkUrlWithoutParameters = (indexOfQuestionMark > -1)? [MSG]The type is not specified for variable "linkUrlWithoutParameters" |
UnnecessarySubstring | 3 | 57 | [SRC]linkUrl?.substring(0, indexOfQuestionMark) : linkUrl [MSG]Violation in class tech.muyan.DomainMetaController. The String.substring(int, int) method can be replaced with the subscript operator |
UnnecessarySemicolon | 3 | 61 | [SRC]boolean hasPermission = false; [MSG]Semicolons as line endings can be removed safely |
NoDef | 3 | 63 | [SRC]def requestMap = requestMaps.get(0) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 63 | [SRC]def requestMap = requestMaps.get(0) [MSG]The type is not specified for variable "requestMap" |
UnnecessaryGetter | 3 | 64 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
UnnecessaryGString | 3 | 64 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]The String 'permitAll' can be wrapped in single quotes instead of double quotes |
UnnecessarySemicolon | 3 | 65 | [SRC]hasPermission = true; [MSG]Semicolons as line endings can be removed safely |
NoDef | 3 | 67 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 67 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]The type is not specified for variable "attribute" |
UnnecessaryGetter | 3 | 67 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
UnnecessarySemicolon | 3 | 85 | [SRC]boolean hasPermission = false; [MSG]Semicolons as line endings can be removed safely |
UnnecessaryGetter | 3 | 86 | [SRC]if (requestMap != null && requestMap.getConfigAttribute(..ll") > -1) { [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
UnnecessaryGString | 3 | 86 | [SRC]if (requestMap != null && requestMap.getConfigAttribute(..ll") > -1) { [MSG]The String 'permitAll' can be wrapped in single quotes instead of double quotes |
TrailingComma | 3 | 88 | [SRC]meta.put('form', [ [MSG]Map should contain trailing comma. |
NoDef | 3 | 94 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 94 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]The type is not specified for variable "attribute" |
UnnecessaryGetter | 3 | 94 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
TrailingComma | 3 | 97 | [SRC]meta.put('form', [ [MSG]Map should contain trailing comma. |
UnnecessaryGString | 3 | 108 | [SRC]log.warn("domain class associate to menu [{}/{}] is empt.. menu.label) [MSG]The String 'domain class associate to menu [{}/{}] is empty' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 118 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
MethodReturnTypeRequired | 3 | 129 | [SRC]def list() { [MSG]Method "list" has a dynamic return type |
NoDef | 3 | 129 | [SRC]def list() { [MSG]def for method return type should not be used |
NoDef | 3 | 130 | [SRC]def list = new HashSet() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 130 | [SRC]def list = new HashSet() [MSG]The type is not specified for variable "list" |
NoDef | 3 | 131 | [SRC]def auth = springSecurityService.authentication [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 131 | [SRC]def auth = springSecurityService.authentication [MSG]The type is not specified for variable "auth" |
NoDef | 3 | 132 | [SRC]def authorities = auth.getAuthorities() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 132 | [SRC]def authorities = auth.getAuthorities() [MSG]The type is not specified for variable "authorities" |
UnnecessaryGetter | 3 | 132 | [SRC]def authorities = auth.getAuthorities() [MSG]getAuthorities() can probably be rewritten as authorities |
UnnecessaryGetter | 3 | 133 | [SRC]DomainClass.getAll().each { domainClazz -> [MSG]getAll() can probably be rewritten as all |
NoDef | 3 | 134 | [SRC]def sn = domainClazz.shortName [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 134 | [SRC]def sn = domainClazz.shortName [MSG]The type is not specified for variable "sn" |
NoDef | 3 | 136 | [SRC]def requestMap = RequestMap.findByUrlAndHttpMethod("/${s..pMethod.GET) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 136 | [SRC]def requestMap = RequestMap.findByUrlAndHttpMethod("/${s..pMethod.GET) [MSG]The type is not specified for variable "requestMap" |
UnnecessaryGetter | 3 | 138 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
UnnecessaryGString | 3 | 138 | [SRC]if (requestMap.getConfigAttribute().indexOf("permitAll") > -1) { [MSG]The String 'permitAll' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 141 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 141 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]The type is not specified for variable "attribute" |
UnnecessaryGetter | 3 | 141 | [SRC]def attribute = requestMap.getConfigAttribute() [MSG]getConfigAttribute() can probably be rewritten as configAttribute |
UnnecessaryGString | 3 | 143 | [SRC]String authority = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
ImplicitClosureParameter | 3 | 144 | [SRC]if (it instanceof SimpleGrantedAuthority) { [MSG]By convention closure parameters should be specified explicitly. |
ImplicitClosureParameter | 3 | 145 | [SRC]authority = ((SimpleGrantedAuthority) it).authority [MSG]By convention closure parameters should be specified explicitly. |
UnnecessaryGString | 3 | 147 | [SRC]if (!"".equals(authority) && attribute.indexOf(authority) > -1) { [MSG]The String '' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 164 | [SRC]def get(String domainName, String formId) { [MSG]Method "get" has a dynamic return type |
NoDef | 3 | 164 | [SRC]def get(String domainName, String formId) { [MSG]def for method return type should not be used |
NoDef | 3 | 168 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 168 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
UnnecessaryGetter | 3 | 171 | [SRC]if (null != form && form.getFields().size() > 0) { [MSG]getFields() can probably be rewritten as fields |
UnnecessaryGetter | 3 | 174 | [SRC]List<DynamicFormField> fields = new ArrayList(form.getFields()) [MSG]getFields() can probably be rewritten as fields |
NoDef | 3 | 176 | [SRC]final fieldsMap = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 176 | [SRC]final fieldsMap = [:] [MSG]The type is not specified for variable "fieldsMap" |
ImplicitClosureParameter | 3 | 177 | [SRC]allFields.forEach { it -> [MSG]By convention "it" should not be used as a closure parameter name. |
NoDef | 3 | 181 | [SRC]def meta = fieldsMap.get(field.fieldName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 181 | [SRC]def meta = fieldsMap.get(field.fieldName) [MSG]The type is not specified for variable "meta" |
MethodReturnTypeRequired | 3 | 196 | [SRC]def getForm(String domainName, String formType) { [MSG]Method "getForm" has a dynamic return type |
NoDef | 3 | 196 | [SRC]def getForm(String domainName, String formType) { [MSG]def for method return type should not be used |
NoDef | 3 | 199 | [SRC]def result = [id: (form == null)? -1 : form.id] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 199 | [SRC]def result = [id: (form == null)? -1 : form.id] [MSG]The type is not specified for variable "result" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
EmptyClass | 2 | 8 | [SRC]class DummyDomain { [MSG]Class 'DummyDomain' is empty (has no methods, fields or properties). Why would you need a class like this? |
CompileStatic | 2 | 8 | [SRC]class DummyDomain { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 8 | [SRC]class DummyDomain { [MSG]The domain class tech.muyan.DummyDomain should define an equals(Object) method |
GrailsDomainHasToString | 2 | 8 | [SRC]class DummyDomain { [MSG]The domain class tech.muyan.DummyDomain should define a toString() method |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class EnumController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ClassForName | 2 | 22 | [SRC]Class obj = Class.forName(type) [MSG]Violation in class tech.muyan.EnumController. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
MethodReturnTypeRequired | 3 | 20 | [SRC]def get(String enumType) { [MSG]Method "get" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def get(String enumType) { [MSG]def for method return type should not be used |
NoDef | 3 | 23 | [SRC]def options = obj.getEnumConstants() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 23 | [SRC]def options = obj.getEnumConstants() [MSG]The type is not specified for variable "options" |
UnnecessaryGetter | 3 | 23 | [SRC]def options = obj.getEnumConstants() [MSG]getEnumConstants() can probably be rewritten as enumConstants |
NoDef | 3 | 24 | [SRC]def optionKeys = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 24 | [SRC]def optionKeys = [] [MSG]The type is not specified for variable "optionKeys" |
NoDef | 3 | 26 | [SRC]def key = opt.toString() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 26 | [SRC]def key = opt.toString() [MSG]The type is not specified for variable "key" |
NoDef | 3 | 27 | [SRC]def label = opt.hasProperty("label") ? opt.getLabel() : key [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def label = opt.hasProperty("label") ? opt.getLabel() : key [MSG]The type is not specified for variable "label" |
UnnecessaryGetter | 3 | 27 | [SRC]def label = opt.hasProperty("label") ? opt.getLabel() : key [MSG]getLabel() can probably be rewritten as label |
UnnecessaryGString | 3 | 27 | [SRC]def label = opt.hasProperty("label") ? opt.getLabel() : key [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
TrailingComma | 3 | 28 | [SRC]optionKeys.add([ [MSG]Map should contain trailing comma. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 14 | [SRC]class OptionsController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MisorderedStaticImports | 3 | 6 | [SRC]import static tech.muyan.DomainMetaConfig.DynamicFieldKeyPrefix [MSG]Static imports should appear before normal imports |
MethodReturnTypeRequired | 3 | 16 | [SRC]def get(String objectDynamicFieldId) { [MSG]Method "get" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def get(String objectDynamicFieldId) { [MSG]def for method return type should not be used |
NoDef | 3 | 17 | [SRC]def key = objectDynamicFieldId.substring(DynamicFieldKey..ix.length()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 17 | [SRC]def key = objectDynamicFieldId.substring(DynamicFieldKey..ix.length()) [MSG]The type is not specified for variable "key" |
UnnecessarySubstring | 3 | 17 | [SRC]def key = objectDynamicFieldId.substring(DynamicFieldKey..ix.length()) [MSG]Violation in class tech.muyan.OptionsController. The String.substring(int) method can be replaced with the subscript operator |
NoDef | 3 | 18 | [SRC]def odf = ObjectDynamicField.get(Long.parseLong(key)) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 18 | [SRC]def odf = ObjectDynamicField.get(Long.parseLong(key)) [MSG]The type is not specified for variable "odf" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 5 | [SRC]class Organization extends WithDynamicFields<Organization> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 5 | [SRC]class Organization extends WithDynamicFields<Organization> { [MSG]The domain class tech.muyan.Organization should define an equals(Object) method |
GrailsDomainHasToString | 2 | 5 | [SRC]class Organization extends WithDynamicFields<Organization> { [MSG]The domain class tech.muyan.Organization should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 11 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
FieldTypeRequired | 3 | 7 | [SRC]static hasMany = [contracts: Contract, children: Organiz..users: User] [MSG]The type is not specified for field "hasMany" |
FieldTypeRequired | 3 | 13 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 13 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.Organization is declared after an instance field |
FieldTypeRequired | 3 | 18 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 18 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.Organization is declared after an instance field |
UnnecessaryGString | 3 | 20 | [SRC]only = ["name"] [MSG]The String 'name' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 23 | [SRC]static labelField = "name" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 23 | [SRC]static labelField = "name" [MSG]The static field labelField in class tech.muyan.Organization is declared after an instance field |
UnnecessaryGString | 3 | 23 | [SRC]static labelField = "name" [MSG]The String 'name' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class RelateDataController extends RestfulController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 35 | [SRC]if (properties instanceof Set || properties instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.RelateDataController |
Instanceof | 2 | 35 | [SRC]if (properties instanceof Set || properties instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.RelateDataController |
NoWildcardImports | 3 | 3 | [SRC]import grails.rest.* [MSG]Wildcard (star) import |
FieldTypeRequired | 3 | 13 | [SRC]static scope = "prototype" [MSG]The type is not specified for field "scope" |
UnnecessaryGString | 3 | 13 | [SRC]static scope = "prototype" [MSG]The String 'prototype' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 15 | [SRC]static responseFormats = ['json', 'xml'] [MSG]The type is not specified for field "responseFormats" |
UnnecessaryDotClass | 3 | 18 | [SRC]super(DummyDomain.class) [MSG]DummyDomain.class can be rewritten as DummyDomain |
MethodReturnTypeRequired | 3 | 28 | [SRC]def get(String domainName, long id, String columnName) { [MSG]Method "get" has a dynamic return type |
NoDef | 3 | 28 | [SRC]def get(String domainName, long id, String columnName) { [MSG]def for method return type should not be used |
NoDef | 3 | 29 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 29 | [SRC]def clazz = DomainHelper.getClazzFromDomainName(domainName) [MSG]The type is not specified for variable "clazz" |
UnnecessarySemicolon | 3 | 30 | [SRC]setResource(clazz); [MSG]Semicolons as line endings can be removed safely |
UnnecessarySetter | 3 | 30 | [SRC]setResource(clazz); [MSG]setResource(..) can probably be rewritten as resource = .. |
NoDef | 3 | 31 | [SRC]def domain = getResource().get(id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 31 | [SRC]def domain = getResource().get(id) [MSG]The type is not specified for variable "domain" |
UnnecessaryGetter | 3 | 31 | [SRC]def domain = getResource().get(id) [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 33 | [SRC]def properties = domain.getProperty(columnName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 33 | [SRC]def properties = domain.getProperty(columnName) [MSG]The type is not specified for variable "properties" |
NoDef | 3 | 34 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 34 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
NoDef | 3 | 36 | [SRC]def offset = Integer.valueOf(params.offset ? params.offset : 0) ?: 0 [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 36 | [SRC]def offset = Integer.valueOf(params.offset ? params.offset : 0) ?: 0 [MSG]The type is not specified for variable "offset" |
NoDef | 3 | 37 | [SRC]def maxParam = Integer.valueOf(params.max ? params.max : 10) ?: 10 [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 37 | [SRC]def maxParam = Integer.valueOf(params.max ? params.max : 10) ?: 10 [MSG]The type is not specified for variable "maxParam" |
NoDef | 3 | 38 | [SRC]def actualMax = properties.size() > maxParam ? maxParam ..rties.size() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 38 | [SRC]def actualMax = properties.size() > maxParam ? maxParam ..rties.size() [MSG]The type is not specified for variable "actualMax" |
NoDef | 3 | 44 | [SRC]def isDomainObject = DomainHelper.isDomainClass(p.getCla..).getName()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 44 | [SRC]def isDomainObject = DomainHelper.isDomainClass(p.getCla..).getName()) [MSG]The type is not specified for variable "isDomainObject" |
UnnecessaryGetter | 3 | 44 | [SRC]def isDomainObject = DomainHelper.isDomainClass(p.getCla..).getName()) [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 51 | [SRC]def data = [ [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 51 | [SRC]def data = [ [MSG]The type is not specified for variable "data" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 34 | [SRC]class SearchController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ClassForName | 2 | 54 | [SRC]def clazz = Class.forName(javaType, true, getClass().classLoader) [MSG]Violation in class tech.muyan.SearchController. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
DuplicateStringLiteral | 2 | 115 | [SRC]Object value = (obj.has("value"))? obj.get("value") : null [MSG]Duplicate String Literal: value |
DuplicateStringLiteral | 2 | 115 | [SRC]Object value = (obj.has("value"))? obj.get("value") : null [MSG]Duplicate String Literal: value |
Instanceof | 2 | 129 | [SRC]def isObjectConverter = converter instanceof ObjectConverter [MSG]The instanceof operator is used in class tech.muyan.SearchController |
Instanceof | 2 | 133 | [SRC]Object convertedValue = (value instanceof List)? [MSG]The instanceof operator is used in class tech.muyan.SearchController |
Instanceof | 2 | 138 | [SRC]if (convertedValue instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.SearchController |
Instanceof | 2 | 148 | [SRC]if (convertedValue instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.SearchController |
EmptyIfStatement | 2 | 176 | [SRC]} else if (matchMode == "between") { [MSG]The if statement is empty |
FieldTypeRequired | 3 | 35 | [SRC]static responseFormats = ['json', 'xml'] [MSG]The type is not specified for field "responseFormats" |
MethodReturnTypeRequired | 3 | 51 | [SRC]def search(String domainName, String fieldName, String fieldType) { [MSG]Method "search" has a dynamic return type |
NoDef | 3 | 51 | [SRC]def search(String domainName, String fieldName, String fieldType) { [MSG]def for method return type should not be used |
NoDef | 3 | 52 | [SRC]def q = params.q [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 52 | [SRC]def q = params.q [MSG]The type is not specified for variable "q" |
NoDef | 3 | 53 | [SRC]def javaType = StringHelper.pathTypeToJavaType(fieldType) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 53 | [SRC]def javaType = StringHelper.pathTypeToJavaType(fieldType) [MSG]The type is not specified for variable "javaType" |
NoDef | 3 | 54 | [SRC]def clazz = Class.forName(javaType, true, getClass().classLoader) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 54 | [SRC]def clazz = Class.forName(javaType, true, getClass().classLoader) [MSG]The type is not specified for variable "clazz" |
NoDef | 3 | 57 | [SRC]def searchLogics = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 57 | [SRC]def searchLogics = DynamicLogic.where { [MSG]The type is not specified for variable "searchLogics" |
UnnecessaryGetter | 3 | 58 | [SRC]targetField == fieldName && objectType.fullName == owner..cType.SEARCH [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 62 | [SRC]def auth = springSecurityService.authentication [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 62 | [SRC]def auth = springSecurityService.authentication [MSG]The type is not specified for variable "auth" |
UnnecessaryGString | 3 | 64 | [SRC]params.put("ownerClass", ownerClass) [MSG]The String 'ownerClass' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 65 | [SRC]params.put("fieldName", fieldName) [MSG]The String 'fieldName' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 66 | [SRC]params.put("fieldClass", clazz) [MSG]The String 'fieldClass' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 67 | [SRC]params.put("keyword", q) [MSG]The String 'keyword' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 68 | [SRC]params.put("userContext", auth) [MSG]The String 'userContext' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]respond resultFromCustomLogic.get("result") [MSG]The String 'result' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 72 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 72 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
UnnecessaryGetter | 3 | 74 | [SRC]if (esResult.getTotal().value > 0) { [MSG]getTotal() can probably be rewritten as total |
NoDef | 3 | 75 | [SRC]def searchResults = esResult.searchResults [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 75 | [SRC]def searchResults = esResult.searchResults [MSG]The type is not specified for variable "searchResults" |
TrailingComma | 3 | 78 | [SRC]result.add([ [MSG]Map should contain trailing comma. |
MethodReturnTypeRequired | 3 | 98 | [SRC]def searchObjectList(String domainName) { [MSG]Method "searchObjectList" has a dynamic return type |
NoDef | 3 | 98 | [SRC]def searchObjectList(String domainName) { [MSG]def for method return type should not be used |
NoDef | 3 | 99 | [SRC]def conditions = request.JSON [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 99 | [SRC]def conditions = request.JSON [MSG]The type is not specified for variable "conditions" |
NoDef | 3 | 100 | [SRC]def ownerClass = params.ownerClass [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 100 | [SRC]def ownerClass = params.ownerClass [MSG]The type is not specified for variable "ownerClass" |
NoDef | 3 | 101 | [SRC]def ownerId = params.ownerId [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 101 | [SRC]def ownerId = params.ownerId [MSG]The type is not specified for variable "ownerId" |
NoDef | 3 | 102 | [SRC]def ownerClassColumnName = params.ownerClassColumnName [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 102 | [SRC]def ownerClassColumnName = params.ownerClassColumnName [MSG]The type is not specified for variable "ownerClassColumnName" |
NoDef | 3 | 103 | [SRC]def max = params.max [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 103 | [SRC]def max = params.max [MSG]The type is not specified for variable "max" |
NoDef | 3 | 104 | [SRC]def offset = params.offset [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 104 | [SRC]def offset = params.offset [MSG]The type is not specified for variable "offset" |
NoDef | 3 | 107 | [SRC]def searchResult = domainClazz.createCriteria().list(max..t: offset) { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 107 | [SRC]def searchResult = domainClazz.createCriteria().list(max..t: offset) { [MSG]The type is not specified for variable "searchResult" |
NoDef | 3 | 110 | [SRC]def owner = ownerClazz.get(ownerId) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 110 | [SRC]def owner = ownerClazz.get(ownerId) [MSG]The type is not specified for variable "owner" |
UnnecessaryGString | 3 | 114 | [SRC]JSONObject obj = queryInfo.getAt("value") as JSONObject [MSG]The String 'value' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 115 | [SRC]Object value = (obj.has("value"))? obj.get("value") : null [MSG]The String 'value' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 115 | [SRC]Object value = (obj.has("value"))? obj.get("value") : null [MSG]The String 'value' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 116 | [SRC]String columnKey = obj.get("columnKey") [MSG]The String 'columnKey' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 117 | [SRC]String matchMode = obj.get("matchMode") [MSG]The String 'matchMode' can be wrapped in single quotes instead of double quotes |
CouldBeSwitchStatement | 3 | 118 | [SRC]if (matchMode == "isEmpty") { [MSG]Code could use switch statement |
UnnecessaryGString | 3 | 118 | [SRC]if (matchMode == "isEmpty") { [MSG]The String 'isEmpty' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 120 | [SRC]} else if (matchMode == "isNotEmpty") { [MSG]The String 'isNotEmpty' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 122 | [SRC]} else if (matchMode == "hasNoRelated") { [MSG]The String 'hasNoRelated' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 124 | [SRC]} else if (matchMode == "hasRelated") { [MSG]The String 'hasRelated' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 129 | [SRC]def isObjectConverter = converter instanceof ObjectConverter [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 129 | [SRC]def isObjectConverter = converter instanceof ObjectConverter [MSG]The type is not specified for variable "isObjectConverter" |
UnnecessaryGString | 3 | 131 | [SRC]converter = ConverterFactory.getConverter("id") [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 137 | [SRC]if (matchMode == "=") { [MSG]The String '=' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 147 | [SRC]} else if (matchMode == "!=") { [MSG]The String '!=' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 157 | [SRC]} else if (matchMode == ">" || matchMode == "after") { [MSG]The String '>' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 157 | [SRC]} else if (matchMode == ">" || matchMode == "after") { [MSG]The String 'after' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 159 | [SRC]} else if (matchMode == "<" || matchMode == "before") { [MSG]The String '<' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 159 | [SRC]} else if (matchMode == "<" || matchMode == "before") { [MSG]The String 'before' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 161 | [SRC]} else if (matchMode == ">=" || matchMode == "afterOrEqual") { [MSG]The String '>=' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 161 | [SRC]} else if (matchMode == ">=" || matchMode == "afterOrEqual") { [MSG]The String 'afterOrEqual' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 163 | [SRC]} else if (matchMode == "<=" || matchMode == "beforeOrEqual") { [MSG]The String '<=' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 163 | [SRC]} else if (matchMode == "<=" || matchMode == "beforeOrEqual") { [MSG]The String 'beforeOrEqual' can be wrapped in single quotes instead of double quotes |
CouldBeSwitchStatement | 3 | 165 | [SRC]} else if (matchMode == "endsWith") { [MSG]Code could use switch statement |
CouldBeSwitchStatement | 3 | 165 | [SRC]} else if (matchMode == "endsWith") { [MSG]Code could use switch statement |
UnnecessaryGString | 3 | 165 | [SRC]} else if (matchMode == "endsWith") { [MSG]The String 'endsWith' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 167 | [SRC]} else if (matchMode == "startsWith") { [MSG]The String 'startsWith' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 169 | [SRC]} else if (matchMode == "contains") { [MSG]The String 'contains' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 171 | [SRC]} else if (matchMode == "notContains") { [MSG]The String 'notContains' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 176 | [SRC]} else if (matchMode == "between") { [MSG]The String 'between' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 178 | [SRC]} else if (matchMode == "isOneOf") { [MSG]The String 'isOneOf' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 181 | [SRC]} else if (matchMode == "isNotAnyOf") { [MSG]The String 'isNotAnyOf' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 193 | [SRC]def result = [ [MSG]def for declaration should not be used |
TrailingComma | 3 | 193 | [SRC]def result = [ [MSG]Map should contain trailing comma. |
VariableTypeRequired | 3 | 193 | [SRC]def result = [ [MSG]The type is not specified for variable "result" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class StorageFieldValue { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 10 | [SRC]class StorageFieldValue { [MSG]The domain class tech.muyan.StorageFieldValue should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]class StorageFieldValue { [MSG]The domain class tech.muyan.StorageFieldValue should define a toString() method |
GrailsDomainReservedSqlKeywordName | 2 | 20 | [SRC]String key [MSG]'key' is a reserved SQL keyword and - as such - a problematic domain class' field name. |
GrailsDomainStringPropertyMaxSize | 2 | 20 | [SRC]String key [MSG]There is no constraint on the size of String property 'key' which will result in applying database defaults |
FieldTypeRequired | 3 | 27 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.StorageFieldValue is declared after an instance field |
FieldTypeRequired | 3 | 32 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 32 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.StorageFieldValue is declared after an instance field |
FieldTypeRequired | 3 | 38 | [SRC]static labelField = "key" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 38 | [SRC]static labelField = "key" [MSG]The static field labelField in class tech.muyan.StorageFieldValue is declared after an instance field |
UnnecessaryGString | 3 | 38 | [SRC]static labelField = "key" [MSG]The String 'key' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 15 | [SRC]class UniqueValidController extends RestfulController { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 41 | [SRC]if (unique instanceof Boolean) { [MSG]The instanceof operator is used in class tech.muyan.UniqueValidController |
Instanceof | 2 | 49 | [SRC]} else if (unique instanceof JSONArray) { [MSG]The instanceof operator is used in class tech.muyan.UniqueValidController |
DuplicateStringLiteral | 2 | 97 | [SRC]ne("id", id) [MSG]Duplicate String Literal: id |
MethodReturnTypeRequired | 3 | 32 | [SRC]def valid(String domainName, String columnName) { [MSG]Method "valid" has a dynamic return type |
NoDef | 3 | 32 | [SRC]def valid(String domainName, String columnName) { [MSG]def for method return type should not be used |
UnnecessaryDefInMethodDeclaration | 3 | 32 | [SRC]def valid(String domainName, String columnName) { [MSG]Violation in class tech.muyan.UniqueValidController. The def keyword is unneeded when a method returns the Object type |
UnnecessarySetter | 3 | 33 | [SRC]setResourceByDomainName(domainName) [MSG]setResourceByDomainName(..) can probably be rewritten as resourceByDomainName = .. |
NoDef | 3 | 34 | [SRC]def id = Long.valueOf(params.id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 34 | [SRC]def id = Long.valueOf(params.id) [MSG]The type is not specified for variable "id" |
NoDef | 3 | 35 | [SRC]def value = params.v [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 35 | [SRC]def value = params.v [MSG]The type is not specified for variable "value" |
NoDef | 3 | 36 | [SRC]def create = params.create [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 36 | [SRC]def create = params.create [MSG]The type is not specified for variable "create" |
NoDef | 3 | 37 | [SRC]def isCreate = "true".equals(create) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 37 | [SRC]def isCreate = "true".equals(create) [MSG]The type is not specified for variable "isCreate" |
UnnecessaryGString | 3 | 37 | [SRC]def isCreate = "true".equals(create) [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 38 | [SRC]def json = request.JSON [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 38 | [SRC]def json = request.JSON [MSG]The type is not specified for variable "json" |
NoDef | 3 | 39 | [SRC]def unique = json.unique [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 39 | [SRC]def unique = json.unique [MSG]The type is not specified for variable "unique" |
NoDef | 3 | 40 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 40 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
NoDef | 3 | 42 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 42 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]The type is not specified for variable "hasDuplicate" |
UnnecessaryGetter | 3 | 42 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]getResource() can probably be rewritten as resource |
UnnecessaryGetter | 3 | 44 | [SRC]} : getResource().withCriteria { [MSG]getResource() can probably be rewritten as resource |
UnnecessaryGString | 3 | 46 | [SRC]ne("id", id) [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]result = [valid: (hasDuplicate == null || hasDuplicate.s.." : "false"] [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]result = [valid: (hasDuplicate == null || hasDuplicate.s.." : "false"] [MSG]The String 'false' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 50 | [SRC]def fields = unique as JSONArray [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 50 | [SRC]def fields = unique as JSONArray [MSG]The type is not specified for variable "fields" |
NoDef | 3 | 51 | [SRC]def record = json.record as JSONObject [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 51 | [SRC]def record = json.record as JSONObject [MSG]The type is not specified for variable "record" |
NoDef | 3 | 52 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 52 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]The type is not specified for variable "hasDuplicate" |
UnnecessaryGetter | 3 | 52 | [SRC]def hasDuplicate = isCreate? getResource().withCriteria { [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 53 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 53 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]The type is not specified for variable "columnType" |
UnnecessaryGetter | 3 | 53 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 55 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 55 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]The type is not specified for variable "transferValue" |
UnnecessaryGetter | 3 | 55 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]isEnum() can probably be rewritten as enum |
NoDef | 3 | 62 | [SRC]def rawVal = record.get(field) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 62 | [SRC]def rawVal = record.get(field) [MSG]The type is not specified for variable "rawVal" |
NoDef | 3 | 64 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 64 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]The type is not specified for variable "fieldType" |
UnnecessaryGetter | 3 | 64 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 66 | [SRC]def fieldValue = fieldType.isEnum()? fieldType.valueOf(r..al) : rawVal [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 66 | [SRC]def fieldValue = fieldType.isEnum()? fieldType.valueOf(r..al) : rawVal [MSG]The type is not specified for variable "fieldValue" |
UnnecessaryGetter | 3 | 66 | [SRC]def fieldValue = fieldType.isEnum()? fieldType.valueOf(r..al) : rawVal [MSG]isEnum() can probably be rewritten as enum |
UnnecessaryGetter | 3 | 75 | [SRC]} : getResource().withCriteria { [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 76 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 76 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]The type is not specified for variable "columnType" |
UnnecessaryGetter | 3 | 76 | [SRC]def columnType = getResource().getDeclaredField(columnName).type [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 77 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 77 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]The type is not specified for variable "transferValue" |
UnnecessaryGetter | 3 | 77 | [SRC]def transferValue = columnType.isEnum()? columnType.valu..lue) : value [MSG]isEnum() can probably be rewritten as enum |
NoDef | 3 | 85 | [SRC]def rawVal = record.get(field) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 85 | [SRC]def rawVal = record.get(field) [MSG]The type is not specified for variable "rawVal" |
NoDef | 3 | 87 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 87 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]The type is not specified for variable "fieldType" |
UnnecessaryGetter | 3 | 87 | [SRC]def fieldType = getResource().getDeclaredField(field).type [MSG]getResource() can probably be rewritten as resource |
NoDef | 3 | 88 | [SRC]def fieldVal = fieldType.isEnum()? fieldType.valueOf(rawVal) : rawVal [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 88 | [SRC]def fieldVal = fieldType.isEnum()? fieldType.valueOf(rawVal) : rawVal [MSG]The type is not specified for variable "fieldVal" |
UnnecessaryGetter | 3 | 88 | [SRC]def fieldVal = fieldType.isEnum()? fieldType.valueOf(rawVal) : rawVal [MSG]isEnum() can probably be rewritten as enum |
UnnecessaryGString | 3 | 97 | [SRC]ne("id", id) [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 99 | [SRC]result = [valid: (hasDuplicate == null || hasDuplicate.s.." : "false"] [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 99 | [SRC]result = [valid: (hasDuplicate == null || hasDuplicate.s.." : "false"] [MSG]The String 'false' can be wrapped in single quotes instead of double quotes |
UnnecessarySetter | 3 | 106 | [SRC]setResource(clazz) [MSG]setResource(..) can probably be rewritten as resource = .. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 3 | [SRC]class UrlMappings { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
DuplicateStringLiteral | 2 | 7 | [SRC]"/domain/$domainName/$formId(.$format)?"(controller: "do..tion: "get") [MSG]Duplicate String Literal: domainMeta |
DuplicateStringLiteral | 2 | 7 | [SRC]"/domain/$domainName/$formId(.$format)?"(controller: "do..tion: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 8 | [SRC]"/domain/list(.$format)?"(controller: "domainMeta", action: "list") [MSG]Duplicate String Literal: domainMeta |
DuplicateStringLiteral | 2 | 9 | [SRC]"/menu/sub/$menuId(.$format)?"(controller: "domainMeta",.. "subMenus") [MSG]Duplicate String Literal: domainMeta |
DuplicateStringLiteral | 2 | 10 | [SRC]"/form/$domainName/$formType(.$format)?"(controller: "do..: "getForm") [MSG]Duplicate String Literal: domainMeta |
DuplicateStringLiteral | 2 | 11 | [SRC]"/menu/top(.$format)?"(controller: "domainMeta", action: "topMenus") [MSG]Duplicate String Literal: domainMeta |
DuplicateStringLiteral | 2 | 12 | [SRC]"/enum/$enumType(.$format)?"(controller: "enum", action: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 13 | [SRC]"/options/$objectDynamicFieldId(.$format)?"(controller: ..tion: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 14 | [SRC]"/search/$domainName/$fieldName/$fieldType(.$format)?"(c..n: "search") [MSG]Duplicate String Literal: search |
DuplicateStringLiteral | 2 | 15 | [SRC]post "/search/$domainName(.$format)?"(controller: "searc..ObjectList") [MSG]Duplicate String Literal: search |
DuplicateStringLiteral | 2 | 18 | [SRC]"/actions/$domainName(.$format)?"(controller: "actionMet.."canCreate") [MSG]Duplicate String Literal: actionMeta |
DuplicateStringLiteral | 2 | 19 | [SRC]get "/application(.$format)?"(controller: "application",..tion: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 22 | [SRC]get "/$domainName(.$format)?"(controller: "domainData", ..on: "index") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 23 | [SRC]get "/$domainName/$id(.$format)?"(controller: "domainDat..ion: "show") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 24 | [SRC]get "/$domainName/multiple/$ids(.$format)?"(controller: ..owMultiple") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 25 | [SRC]post "/$domainName(.$format)?"(controller: "domainData",..ion: "save") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 26 | [SRC]put "/$domainName/$id(.$format)?"(controller: "domainDat..n: "update") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 27 | [SRC]patch "/$domainName/$id(.$format)?"(controller: "domainD..on: "patch") [MSG]Duplicate String Literal: domainData |
DuplicateStringLiteral | 2 | 28 | [SRC]get "/$domainName/$id/$columnName(.$format)?"(controller..tion: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 29 | [SRC]post "/oauth/access_token"(controller: "RestOauthControl..tion: "get") [MSG]Duplicate String Literal: get |
DuplicateStringLiteral | 2 | 32 | [SRC]"/"(controller: 'application', view: 'index') [MSG]Duplicate String Literal: application |
DuplicateStringLiteral | 2 | 32 | [SRC]"/"(controller: 'application', view: 'index') [MSG]Duplicate String Literal: index |
FieldTypeRequired | 3 | 5 | [SRC]static mappings = { [MSG]The type is not specified for field "mappings" |
UnnecessaryGString | 3 | 6 | [SRC]"/domain/$domainName(.$format)?"(controller: "domainMeta..tion: "get") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 6 | [SRC]"/domain/$domainName(.$format)?"(controller: "domainMeta..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
DuplicateMapLiteral | 3 | 7 | [SRC]"/domain/$domainName/$formId(.$format)?"(controller: "do..tion: "get") [MSG]Map [controller:domainMeta, action:get] is duplicated. |
UnnecessaryGString | 3 | 7 | [SRC]"/domain/$domainName/$formId(.$format)?"(controller: "do..tion: "get") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 7 | [SRC]"/domain/$domainName/$formId(.$format)?"(controller: "do..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 8 | [SRC]"/domain/list(.$format)?"(controller: "domainMeta", action: "list") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 8 | [SRC]"/domain/list(.$format)?"(controller: "domainMeta", action: "list") [MSG]The String 'list' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 9 | [SRC]"/menu/sub/$menuId(.$format)?"(controller: "domainMeta",.. "subMenus") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 9 | [SRC]"/menu/sub/$menuId(.$format)?"(controller: "domainMeta",.. "subMenus") [MSG]The String 'subMenus' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 10 | [SRC]"/form/$domainName/$formType(.$format)?"(controller: "do..: "getForm") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 10 | [SRC]"/form/$domainName/$formType(.$format)?"(controller: "do..: "getForm") [MSG]The String 'getForm' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 11 | [SRC]"/menu/top(.$format)?"(controller: "domainMeta", action: "topMenus") [MSG]The String 'domainMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 11 | [SRC]"/menu/top(.$format)?"(controller: "domainMeta", action: "topMenus") [MSG]The String 'topMenus' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]"/enum/$enumType(.$format)?"(controller: "enum", action: "get") [MSG]The String 'enum' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]"/enum/$enumType(.$format)?"(controller: "enum", action: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]"/options/$objectDynamicFieldId(.$format)?"(controller: ..tion: "get") [MSG]The String 'options' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]"/options/$objectDynamicFieldId(.$format)?"(controller: ..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]"/search/$domainName/$fieldName/$fieldType(.$format)?"(c..n: "search") [MSG]The String 'search' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]"/search/$domainName/$fieldName/$fieldType(.$format)?"(c..n: "search") [MSG]The String 'search' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]post "/search/$domainName(.$format)?"(controller: "searc..ObjectList") [MSG]The String 'search' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]post "/search/$domainName(.$format)?"(controller: "searc..ObjectList") [MSG]The String 'searchObjectList' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]"/column/refresh/$domainName/${sourceColumn}/${destColum..: "refresh") [MSG]The String 'columnMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]"/column/refresh/$domainName/${sourceColumn}/${destColum..: "refresh") [MSG]The String 'refresh' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]"/actions/$domainName/$id(.$format)?"(controller: "actio..eAndDelete") [MSG]The String 'actionMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]"/actions/$domainName/$id(.$format)?"(controller: "actio..eAndDelete") [MSG]The String 'canUpdateAndDelete' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]"/actions/$domainName(.$format)?"(controller: "actionMet.."canCreate") [MSG]The String 'actionMeta' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]"/actions/$domainName(.$format)?"(controller: "actionMet.."canCreate") [MSG]The String 'canCreate' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]get "/application(.$format)?"(controller: "application",..tion: "get") [MSG]The String 'application' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]get "/application(.$format)?"(controller: "application",..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 20 | [SRC]delete "/$domainName/$id(.$format)?"(controller: "domain..n: "delete") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 20 | [SRC]delete "/$domainName/$id(.$format)?"(controller: "domain..n: "delete") [MSG]The String 'delete' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]post "/unique/$domainName/$columnName(.$format)?"(contro..on: "valid") [MSG]The String 'uniqueValid' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]post "/unique/$domainName/$columnName(.$format)?"(contro..on: "valid") [MSG]The String 'valid' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 22 | [SRC]get "/$domainName(.$format)?"(controller: "domainData", ..on: "index") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 22 | [SRC]get "/$domainName(.$format)?"(controller: "domainData", ..on: "index") [MSG]The String 'index' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]get "/$domainName/$id(.$format)?"(controller: "domainDat..ion: "show") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]get "/$domainName/$id(.$format)?"(controller: "domainDat..ion: "show") [MSG]The String 'show' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]get "/$domainName/multiple/$ids(.$format)?"(controller: ..owMultiple") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]get "/$domainName/multiple/$ids(.$format)?"(controller: ..owMultiple") [MSG]The String 'showMultiple' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 25 | [SRC]post "/$domainName(.$format)?"(controller: "domainData",..ion: "save") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 25 | [SRC]post "/$domainName(.$format)?"(controller: "domainData",..ion: "save") [MSG]The String 'save' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 26 | [SRC]put "/$domainName/$id(.$format)?"(controller: "domainDat..n: "update") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 26 | [SRC]put "/$domainName/$id(.$format)?"(controller: "domainDat..n: "update") [MSG]The String 'update' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 27 | [SRC]patch "/$domainName/$id(.$format)?"(controller: "domainD..on: "patch") [MSG]The String 'domainData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 27 | [SRC]patch "/$domainName/$id(.$format)?"(controller: "domainD..on: "patch") [MSG]The String 'patch' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]get "/$domainName/$id/$columnName(.$format)?"(controller..tion: "get") [MSG]The String 'relateData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]get "/$domainName/$id/$columnName(.$format)?"(controller..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]post "/oauth/access_token"(controller: "RestOauthControl..tion: "get") [MSG]The String '/oauth/access_token' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]post "/oauth/access_token"(controller: "RestOauthControl..tion: "get") [MSG]The String 'RestOauthController' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]post "/oauth/access_token"(controller: "RestOauthControl..tion: "get") [MSG]The String 'get' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]get "/reloadSeedData"(controller: "dataLoad", action: "reload") [MSG]The String '/reloadSeedData' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]get "/reloadSeedData"(controller: "dataLoad", action: "reload") [MSG]The String 'dataLoad' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]get "/reloadSeedData"(controller: "dataLoad", action: "reload") [MSG]The String 'reload' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"/"(controller: 'application', view: 'index') [MSG]The String '/' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"500"(view: '/error') [MSG]The String '500' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]"404"(view: '/notFound') [MSG]The String '404' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 16 | [SRC]abstract class WithDynamicFields<D> implements GormEntity<D> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
AbstractClassWithoutAbstractMethod | 2 | 16 | [SRC]abstract class WithDynamicFields<D> implements GormEntity<D> { [MSG]The abstract class tech.muyan.WithDynamicFields contains no abstract methods |
UnusedMethodParameter | 2 | 34 | [SRC]boolean propertyIsDatasource(String name) { [MSG]Violation in class WithDynamicFields. Method parameter [name] is never referenced in the method propertyIsDatasource of class tech.muyan.WithDynamicFields |
MethodParameterTypeRequired | 3 | 20 | [SRC]def propertyMissing(String name, value) { [MSG]"value" parameter of "propertyMissing" method is dynamically typed |
MethodReturnTypeRequired | 3 | 20 | [SRC]def propertyMissing(String name, value) { [MSG]Method "propertyMissing" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def propertyMissing(String name, value) { [MSG]def for method return type should not be used |
NoDef | 3 | 20 | [SRC]def propertyMissing(String name, value) { [MSG]def for method parameter type should not be used |
MethodReturnTypeRequired | 3 | 26 | [SRC]def propertyMissing(String name) { [MSG]Method "propertyMissing" has a dynamic return type |
NoDef | 3 | 26 | [SRC]def propertyMissing(String name) { [MSG]def for method return type should not be used |
ImplicitReturnStatement | 3 | 34 | [SRC]boolean propertyIsDatasource(String name) { [MSG]The method propertyIsDatasource in class tech.muyan.WithDynamicFields is missing an explicit return |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 8 | [SRC]class Engine { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
NoDef | 3 | 17 | [SRC]def sharedData = new Binding() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 17 | [SRC]def sharedData = new Binding() [MSG]The type is not specified for variable "sharedData" |
NoDef | 3 | 21 | [SRC]def shell = new GroovyShell(classLoader, sharedData) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 21 | [SRC]def shell = new GroovyShell(classLoader, sharedData) [MSG]The type is not specified for variable "shell" |
UnnecessaryReturnKeyword | 3 | 23 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 14 | [SRC]class DynamicLogic { [MSG]The domain class tech.muyan.dynamic.DynamicLogic should define an equals(Object) method |
GrailsDomainHasToString | 2 | 14 | [SRC]class DynamicLogic { [MSG]The domain class tech.muyan.dynamic.DynamicLogic should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 27 | [SRC]String triggerField [MSG]There is no constraint on the size of String property 'triggerField' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 28 | [SRC]String targetField [MSG]There is no constraint on the size of String property 'targetField' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 51 | [SRC]description type: 'text' [MSG]Duplicate String Literal: text |
DuplicateStringLiteral | 2 | 53 | [SRC]logicSource enumType: 'string' [MSG]Duplicate String Literal: string |
FieldTypeRequired | 3 | 38 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 38 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.DynamicLogic is declared after an instance field |
DuplicateMapLiteral | 3 | 40 | [SRC]triggerDynamicField nullable: true, updatable: false [MSG]Map [nullable:true, updatable:false] is duplicated. |
DuplicateMapLiteral | 3 | 41 | [SRC]targetDynamicField nullable: true, updatable: false [MSG]Map [nullable:true, updatable:false] is duplicated. |
DuplicateMapLiteral | 3 | 43 | [SRC]triggerField nullable: true, updatable: false [MSG]Map [nullable:true, updatable:false] is duplicated. |
DuplicateMapLiteral | 3 | 44 | [SRC]logicType nullable: false, updatable: false [MSG]Map [nullable:false, updatable:false] is duplicated. |
DuplicateMapLiteral | 3 | 45 | [SRC]logicSource nullable: false, updatable: false [MSG]Map [nullable:false, updatable:false] is duplicated. |
FieldTypeRequired | 3 | 49 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 49 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.DynamicLogic is declared after an instance field |
DuplicateMapLiteral | 3 | 51 | [SRC]description type: 'text' [MSG]Map [type:text] is duplicated. |
DuplicateMapLiteral | 3 | 53 | [SRC]logicSource enumType: 'string' [MSG]Map [enumType:string] is duplicated. |
FieldTypeRequired | 3 | 56 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 56 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.DynamicLogic is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 16 | [SRC]class DynamicFieldDefinition { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 16 | [SRC]class DynamicFieldDefinition { [MSG]The domain class tech.muyan.dynamic.field.DynamicFieldDefinition should define an equals(Object) method |
GrailsDomainHasToString | 2 | 16 | [SRC]class DynamicFieldDefinition { [MSG]The domain class tech.muyan.dynamic.field.DynamicFieldDefinition should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 23 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 28 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 41 | [SRC]@BindUsing({ val, source -> [MSG]There is no constraint on the size of String property 'optionsJson' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 42 | [SRC]def options = source['optionsJson'] [MSG]Duplicate String Literal: optionsJson |
Instanceof | 2 | 43 | [SRC]if (options instanceof String) {//This is for handling CSV import [MSG]The instanceof operator is used in class tech.muyan.dynamic.field.DynamicFieldDefinition |
DuplicateStringLiteral | 2 | 74 | [SRC]result['label'] = this.label [MSG]Duplicate String Literal: label |
DuplicateStringLiteral | 2 | 76 | [SRC]result['optionsJson'] = (this.optionsJson != null && thi..gth() > 1) ? [MSG]Duplicate String Literal: optionsJson |
GrailsDomainStringPropertyMaxSize | 2 | 86 | [SRC]String referenceClazz [MSG]There is no constraint on the size of String property 'referenceClazz' which will result in applying database defaults |
NoWildcardImports | 3 | 6 | [SRC]import tech.muyan.enums.DynamicFieldDataType [MSG]Wildcard (star) import |
MisorderedStaticImports | 3 | 9 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Static imports should appear before normal imports |
FieldTypeRequired | 3 | 18 | [SRC]static hasMany = [dynamicFields: ObjectDynamicField, dyn..ynamicLogic] [MSG]The type is not specified for field "hasMany" |
NoDef | 3 | 42 | [SRC]def options = source['optionsJson'] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 42 | [SRC]def options = source['optionsJson'] [MSG]The type is not specified for variable "options" |
UnnecessaryGString | 3 | 46 | [SRC]String result = "[" [MSG]The String '[' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 48 | [SRC]def obj = options.get(i) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 48 | [SRC]def obj = options.get(i) [MSG]The type is not specified for variable "obj" |
NoDef | 3 | 49 | [SRC]def converter = ConverterFactory.getConverter(val.fieldT...toString()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 49 | [SRC]def converter = ConverterFactory.getConverter(val.fieldT...toString()) [MSG]The type is not specified for variable "converter" |
NoDef | 3 | 50 | [SRC]def value = converter.convert(obj.toString(), "", "") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 50 | [SRC]def value = converter.convert(obj.toString(), "", "") [MSG]The type is not specified for variable "value" |
UnnecessaryGString | 3 | 50 | [SRC]def value = converter.convert(obj.toString(), "", "") [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]def value = converter.convert(obj.toString(), "", "") [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 55 | [SRC]result += value + "," [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 60 | [SRC]result += "]" [MSG]The String ']' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 61 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
MethodReturnTypeRequired | 3 | 71 | [SRC]def render() { [MSG]Method "render" has a dynamic return type |
NoDef | 3 | 71 | [SRC]def render() { [MSG]def for method return type should not be used |
NoDef | 3 | 72 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 72 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
UnnecessaryReturnKeyword | 3 | 80 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
FieldTypeRequired | 3 | 88 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 88 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.field.DynamicFieldDefinition is declared after an instance field |
DuplicateMapLiteral | 3 | 93 | [SRC]referenceClazz blank: true, nullable: true [MSG]Map [blank:true, nullable:true] is duplicated. |
FieldTypeRequired | 3 | 97 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 97 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.field.DynamicFieldDefinition is declared after an instance field |
DuplicateMapLiteral | 3 | 100 | [SRC]name updateable: false [MSG]Map [updateable:false] is duplicated. |
FieldTypeRequired | 3 | 103 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 103 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.field.DynamicFieldDefinition is declared after an instance field |
FieldTypeRequired | 3 | 109 | [SRC]static labelField = "label" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 109 | [SRC]static labelField = "label" [MSG]The static field labelField in class tech.muyan.dynamic.field.DynamicFieldDefinition is declared after an instance field |
UnnecessaryGString | 3 | 109 | [SRC]static labelField = "label" [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 31 | [SRC]class DynamicFieldValue { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 31 | [SRC]class DynamicFieldValue { [MSG]The domain class tech.muyan.dynamic.field.DynamicFieldValue should define an equals(Object) method |
GrailsDomainHasToString | 2 | 31 | [SRC]class DynamicFieldValue { [MSG]The domain class tech.muyan.dynamic.field.DynamicFieldValue should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 87 | [SRC]String jsonValue [MSG]There is no constraint on the size of String property 'jsonValue' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 88 | [SRC]String stringValue [MSG]There is no constraint on the size of String property 'stringValue' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 97 | [SRC]String objectId [MSG]There is no constraint on the size of String property 'objectId' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 117 | [SRC]booleanValue defaultValue: "false" [MSG]Duplicate String Literal: false |
UnusedImport | 3 | 4 | [SRC]import groovy.json.JsonBuilder [MSG]The [groovy.json.JsonBuilder] import is never referenced |
UnusedImport | 3 | 5 | [SRC]import groovy.json.StringEscapeUtils [MSG]The [groovy.json.StringEscapeUtils] import is never referenced |
NoWildcardImports | 3 | 9 | [SRC]import tech.muyan.enums.DynamicFieldDataType [MSG]Wildcard (star) import |
UnusedImport | 3 | 12 | [SRC]import java.time.ZoneId [MSG]The [java.time.ZoneId] import is never referenced |
UnusedImport | 3 | 14 | [SRC]import static tech.muyan.DomainMetaConfig.MultipleSelectionTypes [MSG]The [tech.muyan.DomainMetaConfig] import is never referenced |
MisorderedStaticImports | 3 | 14 | [SRC]import static tech.muyan.DomainMetaConfig.MultipleSelectionTypes [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 15 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Static imports should appear before normal imports |
FieldTypeRequired | 3 | 33 | [SRC]static transients = ['fieldType', 'ownerClazz'] [MSG]The type is not specified for field "transients" |
FieldTypeRequired | 3 | 35 | [SRC]static belongsTo = [objectDynamicField: ObjectDynamicField] [MSG]The type is not specified for field "belongsTo" |
ImplicitReturnStatement | 3 | 53 | [SRC]DisplayComponentType getDisplayComponentType() { [MSG]The method getDisplayComponentType in class tech.muyan.dynamic.field.DynamicFieldValue is missing an explicit return |
ImplicitReturnStatement | 3 | 63 | [SRC]DomainClass getOwnerClazz() { [MSG]The method getOwnerClazz in class tech.muyan.dynamic.field.DynamicFieldValue is missing an explicit return |
ImplicitReturnStatement | 3 | 72 | [SRC]DynamicFieldDataType getFieldType() { [MSG]The method getFieldType in class tech.muyan.dynamic.field.DynamicFieldValue is missing an explicit return |
UnnecessaryGetter | 3 | 74 | [SRC]ObjectDynamicField.get(objectDynamicFieldId).getFieldType() : [MSG]getFieldType() can probably be rewritten as fieldType |
UnnecessaryGetter | 3 | 75 | [SRC](objectDynamicField != null) ? objectDynamicField.getFie..ype() : null [MSG]getFieldType() can probably be rewritten as fieldType |
FieldTypeRequired | 3 | 104 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 104 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.field.DynamicFieldValue is declared after an instance field |
DuplicateMapLiteral | 3 | 107 | [SRC]booleanValue nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 108 | [SRC]numericValue nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 109 | [SRC]objectId blank: true, nullable: true [MSG]Map [blank:true, nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 110 | [SRC]storage nullable: true [MSG]Map [nullable:true] is duplicated. |
FieldTypeRequired | 3 | 116 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 116 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.field.DynamicFieldValue is declared after an instance field |
UnnecessaryGString | 3 | 117 | [SRC]booleanValue defaultValue: "false" [MSG]The String 'false' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 14 | [SRC]class ObjectDynamicField { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 14 | [SRC]class ObjectDynamicField { [MSG]The domain class tech.muyan.dynamic.field.ObjectDynamicField should define an equals(Object) method |
GrailsDomainHasToString | 2 | 14 | [SRC]class ObjectDynamicField { [MSG]The domain class tech.muyan.dynamic.field.ObjectDynamicField should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 37 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 42 | [SRC]String meta [MSG]There is no constraint on the size of String property 'meta' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 62 | [SRC]String validation [MSG]There is no constraint on the size of String property 'validation' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 89 | [SRC]editable defaultValue: "true" [MSG]Duplicate String Literal: true |
DuplicateStringLiteral | 2 | 90 | [SRC]display defaultValue: "true" [MSG]Duplicate String Literal: true |
DuplicateStringLiteral | 2 | 91 | [SRC]required defaultValue: "true" [MSG]Duplicate String Literal: true |
DuplicateStringLiteral | 2 | 93 | [SRC]displayComponentType enumType: 'string' [MSG]Duplicate String Literal: string |
ImportFromSamePackage | 3 | 4 | [SRC]import tech.muyan.dynamic.field.DynamicFieldDefinition |
FieldTypeRequired | 3 | 16 | [SRC]static transients = ['fieldType'] [MSG]The type is not specified for field "transients" |
ImplicitReturnStatement | 3 | 18 | [SRC]DynamicFieldDataType getFieldType() { [MSG]The method getFieldType in class tech.muyan.dynamic.field.ObjectDynamicField is missing an explicit return |
FieldTypeRequired | 3 | 74 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 74 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.field.ObjectDynamicField is declared after an instance field |
DuplicateMapLiteral | 3 | 77 | [SRC]validation blank: true, nullable: true [MSG]Map [blank:true, nullable:true] is duplicated. |
FieldTypeRequired | 3 | 88 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 88 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.field.ObjectDynamicField is declared after an instance field |
UnnecessaryGString | 3 | 89 | [SRC]editable defaultValue: "true" [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
DuplicateMapLiteral | 3 | 90 | [SRC]display defaultValue: "true" [MSG]Map [defaultValue:true] is duplicated. |
UnnecessaryGString | 3 | 90 | [SRC]display defaultValue: "true" [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
DuplicateMapLiteral | 3 | 91 | [SRC]required defaultValue: "true" [MSG]Map [defaultValue:true] is duplicated. |
UnnecessaryGString | 3 | 91 | [SRC]required defaultValue: "true" [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
DuplicateMapLiteral | 3 | 93 | [SRC]displayComponentType enumType: 'string' [MSG]Map [enumType:string] is duplicated. |
FieldTypeRequired | 3 | 96 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 96 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.field.ObjectDynamicField is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 14 | [SRC]class DynamicForm { [MSG]The domain class tech.muyan.dynamic.form.DynamicForm should define an equals(Object) method |
GrailsDomainHasToString | 2 | 14 | [SRC]class DynamicForm { [MSG]The domain class tech.muyan.dynamic.form.DynamicForm should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 16 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 17 | [SRC]String description [MSG]There is no constraint on the size of String property 'description' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 21 | [SRC]String defaultSortField [MSG]There is no constraint on the size of String property 'defaultSortField' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 22 | [SRC]String defaultSortDirection [MSG]There is no constraint on the size of String property 'defaultSortDirection' which will result in applying database defaults |
FieldTypeRequired | 3 | 27 | [SRC]static hasMany = [fields: DynamicFormField] [MSG]The type is not specified for field "hasMany" |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]static hasMany = [fields: DynamicFormField] [MSG]The static field hasMany in class tech.muyan.dynamic.form.DynamicForm is declared after an instance field |
FieldTypeRequired | 3 | 29 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 29 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.form.DynamicForm is declared after an instance field |
DuplicateMapLiteral | 3 | 33 | [SRC]objectType nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 34 | [SRC]type nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 35 | [SRC]defaultSortField nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 36 | [SRC]defaultSortDirection nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 37 | [SRC]importEnable nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 38 | [SRC]exportEnable nullable: false [MSG]Map [nullable:false] is duplicated. |
FieldTypeRequired | 3 | 42 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 42 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.form.DynamicForm is declared after an instance field |
FieldTypeRequired | 3 | 46 | [SRC]static labelField = "name" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 46 | [SRC]static labelField = "name" [MSG]The static field labelField in class tech.muyan.dynamic.form.DynamicForm is declared after an instance field |
UnnecessaryGString | 3 | 46 | [SRC]static labelField = "name" [MSG]The String 'name' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 48 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 48 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.form.DynamicForm is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 13 | [SRC]class DynamicFormField { [MSG]The domain class tech.muyan.dynamic.form.DynamicFormField should define an equals(Object) method |
GrailsDomainHasToString | 2 | 13 | [SRC]class DynamicFormField { [MSG]The domain class tech.muyan.dynamic.form.DynamicFormField should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 19 | [SRC]String fieldName [MSG]There is no constraint on the size of String property 'fieldName' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 21 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 22 | [SRC]String helpText [MSG]There is no constraint on the size of String property 'helpText' which will result in applying database defaults |
FieldTypeRequired | 3 | 15 | [SRC]static belongsTo = [DynamicForm] [MSG]The type is not specified for field "belongsTo" |
FieldTypeRequired | 3 | 25 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 25 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.form.DynamicFormField is declared after an instance field |
DuplicateMapLiteral | 3 | 27 | [SRC]form nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 29 | [SRC]displaySequence nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 30 | [SRC]label nullable: false, blank: false [MSG]Map [nullable:false, blank:false] is duplicated. |
DuplicateMapLiteral | 3 | 32 | [SRC]fieldType nullable: false [MSG]Map [nullable:false] is duplicated. |
FieldTypeRequired | 3 | 36 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 36 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.form.DynamicFormField is declared after an instance field |
FieldTypeRequired | 3 | 40 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 40 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.form.DynamicFormField is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 13 | [SRC]class DynamicMenu { [MSG]The domain class tech.muyan.dynamic.form.DynamicMenu should define an equals(Object) method |
GrailsDomainHasToString | 2 | 13 | [SRC]class DynamicMenu { [MSG]The domain class tech.muyan.dynamic.form.DynamicMenu should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 16 | [SRC]String icon [MSG]There is no constraint on the size of String property 'icon' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 17 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 20 | [SRC]String link [MSG]There is no constraint on the size of String property 'link' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 46 | [SRC]result.put("label", label) [MSG]Duplicate String Literal: label |
FieldTypeRequired | 3 | 23 | [SRC]static hasMany = [children: DynamicMenu] [MSG]The type is not specified for field "hasMany" |
StaticFieldsBeforeInstanceFields | 3 | 23 | [SRC]static hasMany = [children: DynamicMenu] [MSG]The static field hasMany in class tech.muyan.dynamic.form.DynamicMenu is declared after an instance field |
FieldTypeRequired | 3 | 24 | [SRC]static hasOne = [form: DynamicForm] [MSG]The type is not specified for field "hasOne" |
StaticFieldsBeforeInstanceFields | 3 | 24 | [SRC]static hasOne = [form: DynamicForm] [MSG]The static field hasOne in class tech.muyan.dynamic.form.DynamicMenu is declared after an instance field |
FieldTypeRequired | 3 | 26 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 26 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.dynamic.form.DynamicMenu is declared after an instance field |
DuplicateMapLiteral | 3 | 28 | [SRC]icon nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 31 | [SRC]organization nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 32 | [SRC]link nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 33 | [SRC]form nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 34 | [SRC]children nullable: true [MSG]Map [nullable:true] is duplicated. |
DuplicateMapLiteral | 3 | 35 | [SRC]displaySequence nullable: true [MSG]Map [nullable:true] is duplicated. |
FieldTypeRequired | 3 | 38 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 38 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.dynamic.form.DynamicMenu is declared after an instance field |
MethodReturnTypeRequired | 3 | 42 | [SRC]def render() { [MSG]Method "render" has a dynamic return type |
NoDef | 3 | 42 | [SRC]def render() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 44 | [SRC]result.put("parentMenu", [id: parentMenu?.id]) [MSG]The String 'parentMenu' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 45 | [SRC]result.put("icon", icon) [MSG]The String 'icon' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 46 | [SRC]result.put("label", label) [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]result.put("type", type) [MSG]The String 'type' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]result.put("organization", [id: organization.id]) [MSG]The String 'organization' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]result.put("link", link) [MSG]The String 'link' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 49 | [SRC]result.put("link", link) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 50 | [SRC]result.put("form", [id: form?.id]) [MSG]The String 'form' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 50 | [SRC]result.put("form", [id: form?.id]) [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 51 | [SRC]result.put("displaySequence", displaySequence) [MSG]The String 'displaySequence' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 51 | [SRC]result.put("displaySequence", displaySequence) [MSG]The code could be more concise by using a with() or identity() block |
FieldTypeRequired | 3 | 55 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 55 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.dynamic.form.DynamicMenu is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 11 | [SRC]enum ContractStatus { [MSG]The domain class tech.muyan.enums.ContractStatus should define an equals(Object) method |
GrailsDomainHasToString | 2 | 11 | [SRC]enum ContractStatus { [MSG]The domain class tech.muyan.enums.ContractStatus should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 16 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 28 | [SRC]private static final Map<String, ContractStatus> lookup ..HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.ContractStatus does not match [A-Z][A-Z0-9_]* |
UnusedImport | 3 | 3 | [SRC]import grails.util.Environment [MSG]The [grails.util.Environment] import is never referenced |
UnnecessaryGString | 3 | 13 | [SRC]DRAFT("Draft"), [MSG]The String 'Draft' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]ACTIVE("Active"), [MSG]The String 'Active' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]TERMINATED("Terminated") [MSG]The String 'Terminated' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 23 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 28 | [SRC]private static final Map<String, ContractStatus> lookup ..HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.ContractStatus is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 38 | [SRC]static ContractStatus get(String label) { [MSG]The public static method get in class tech.muyan.enums.ContractStatus is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 39 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 10 | [SRC]enum DisplayComponentType { [MSG]The domain class tech.muyan.enums.DisplayComponentType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]enum DisplayComponentType { [MSG]The domain class tech.muyan.enums.DisplayComponentType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 87 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 100 | [SRC]private static final Map<String, DisplayComponentType> l..ashMap<>(32) [MSG]The fieldname lookup in class tech.muyan.enums.DisplayComponentType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 13 | [SRC]ABSTRACT_DATE("Abstract date"), [MSG]The String 'Abstract date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]ABSTRACT_DATE_TIME("Abstract date with time"), [MSG]The String 'Abstract date with time' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]RELATIVE_DATE("Relative date"), [MSG]The String 'Relative date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]RELATIVE_DATE_TIME("Relative date with time"), [MSG]The String 'Relative date with time' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]STRING_INPUT("Text input"), [MSG]The String 'Text input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]STRING_SINGLE_SELECTION("Text single selection"), [MSG]The String 'Text single selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 25 | [SRC]STRING_MULTIPLE_SELECTION("Text multiple selection"), [MSG]The String 'Text multiple selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 27 | [SRC]STRING_SINGLE_SELECTION_OR_INPUT("Text single selection or input"), [MSG]The String 'Text single selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]STRING_MULTIPLE_SELECTION_OR_INPUT("Text multiple select.. or input"), [MSG]The String 'Text multiple selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]TEXT_AREA("Long text"), [MSG]The String 'Long text' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]INTEGER_INPUT("Integer input"), [MSG]The String 'Integer input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]INTEGER_SINGLE_SELECTION("Integer single selection"), [MSG]The String 'Integer single selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]INTEGER_MULTIPLE_SELECTION("integer multiple selection"), [MSG]The String 'integer multiple selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 39 | [SRC]INTEGER_SINGLE_SELECTION_OR_INPUT("Integer single select.. or input"), [MSG]The String 'Integer single selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 41 | [SRC]INTEGER_MULTIPLE_SELECTION_OR_INPUT("Integer multiple se.. or input"), [MSG]The String 'Integer multiple selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 43 | [SRC]FLOAT_INPUT("Decimal input"), [MSG]The String 'Decimal input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 45 | [SRC]FLOAT_SINGLE_SELECTION("Decimal single selection"), [MSG]The String 'Decimal single selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]FLOAT_MULTIPLE_SELECTION("Decimal Multiple selection"), [MSG]The String 'Decimal Multiple selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]FLOAT_SINGLE_SELECTION_OR_INPUT("Decimal single selection or input"), [MSG]The String 'Decimal single selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]FLOAT_MULTIPLE_SELECTION_OR_INPUT("Decimal Multiple sele.. or input"), [MSG]The String 'Decimal Multiple selection or input' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]PERCENTAGE("Percentage"), [MSG]The String 'Percentage' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 55 | [SRC]CURRENCY("Currency"), [MSG]The String 'Currency' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 57 | [SRC]PASSWORD("Password"), [MSG]The String 'Password' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 59 | [SRC]BOOLEAN("Boolean switch(yes/no)"), [MSG]The String 'Boolean switch(yes/no)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 61 | [SRC]SINGLE_FILE_UPLOAD("Single file"), [MSG]The String 'Single file' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 63 | [SRC]MULTIPLE_FILE_UPLOAD("Multiple file(s)"), [MSG]The String 'Multiple file(s)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 65 | [SRC]SINGLE_IMAGE_UPLOAD("Single image"), [MSG]The String 'Single image' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 67 | [SRC]MULTIPLE_IMAGE_UPLOAD("Multiple image(s)"), [MSG]The String 'Multiple image(s)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 69 | [SRC]OBJECT_SINGLE_SELECTION("Object single selection"), [MSG]The String 'Object single selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]OBJECT_MULTIPLE_SELECTION("Object multiple selection"), [MSG]The String 'Object multiple selection' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 73 | [SRC]FLOAT_RADIO("Float Radio"), [MSG]The String 'Float Radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]STRING_RADIO("String Radio"), [MSG]The String 'String Radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 77 | [SRC]INTEGER_RADIO("Integer Radio"), [MSG]The String 'Integer Radio' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 79 | [SRC]FLOAT_CHECKBOX("Float CheckBox"), [MSG]The String 'Float CheckBox' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 81 | [SRC]STRING_CHECKBOX("String CheckBox"), [MSG]The String 'String CheckBox' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 83 | [SRC]INTEGER_CHECKBOX("Integer CheckBox") [MSG]The String 'Integer CheckBox' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 94 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 100 | [SRC]private static final Map<String, DisplayComponentType> l..ashMap<>(32) [MSG]The static field lookup in class tech.muyan.enums.DisplayComponentType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 110 | [SRC]static DisplayComponentType get(String label) { [MSG]The public static method get in class tech.muyan.enums.DisplayComponentType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 111 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 9 | [SRC]enum DynamicFieldDataType { [MSG]The domain class tech.muyan.enums.DynamicFieldDataType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 9 | [SRC]enum DynamicFieldDataType { [MSG]The domain class tech.muyan.enums.DynamicFieldDataType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 20 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 32 | [SRC]private static final Map<String, DynamicFieldDataType> l..ashMap<>(16) [MSG]The fieldname lookup in class tech.muyan.enums.DynamicFieldDataType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 11 | [SRC]STRING("Text (abc123)"), [MSG]The String 'Text (abc123)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]DATETIME("Date with time (2014-06-24 11:00)"), [MSG]The String 'Date with time (2014-06-24 11:00)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]DATE("Date without time (2014-06-24)"), [MSG]The String 'Date without time (2014-06-24)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]INTEGER("Integer number (42)"), [MSG]The String 'Integer number (42)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]DECIMAL("Float number (3.14159)"), [MSG]The String 'Float number (3.14159)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]BOOLEAN("Boolean (true/false)"), [MSG]The String 'Boolean (true/false)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]OBJECT("Object (Link to existing data)"), [MSG]The String 'Object (Link to existing data)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]FILE("File (Attachment)"), [MSG]The String 'File (Attachment)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]IMAGE("Image (Image attachment, can be displayed)") [MSG]The String 'Image (Image attachment, can be displayed)' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 27 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 32 | [SRC]private static final Map<String, DynamicFieldDataType> l..ashMap<>(16) [MSG]The static field lookup in class tech.muyan.enums.DynamicFieldDataType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 42 | [SRC]static DynamicFieldDataType get(String label) { [MSG]The public static method get in class tech.muyan.enums.DynamicFieldDataType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 43 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 10 | [SRC]enum FieldType { [MSG]The domain class tech.muyan.enums.FieldType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]enum FieldType { [MSG]The domain class tech.muyan.enums.FieldType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 15 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 28 | [SRC]private static final Map<String, FieldType> lookup = new HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.FieldType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 12 | [SRC]STATIC_FIELD("Static field"), [MSG]The String 'Static field' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]DYNAMIC_FIELD("Dynamic field") [MSG]The String 'Dynamic field' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 22 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 28 | [SRC]private static final Map<String, FieldType> lookup = new HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.FieldType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 38 | [SRC]static FieldType get(String label) { [MSG]The public static method get in class tech.muyan.enums.FieldType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 39 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 9 | [SRC]enum FileImportStatus { [MSG]The domain class tech.muyan.enums.FileImportStatus should define an equals(Object) method |
GrailsDomainHasToString | 2 | 9 | [SRC]enum FileImportStatus { [MSG]The domain class tech.muyan.enums.FileImportStatus should define a toString() method |
FieldName | 2 | 30 | [SRC]private static final Map<String, FileImportStatus> looku..HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.FileImportStatus does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 11 | [SRC]SUCCESS("Success"), [MSG]The String 'Success' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]PARTIALLY_SUCCESS("Partially success"), [MSG]The String 'Partially success' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]FAILED("Failed"), [MSG]The String 'Failed' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]RUNNING("Running"), [MSG]The String 'Running' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]NO_DATA_IMPORTED("No data imported"), [MSG]The String 'No data imported' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]NOT_START("Not start"); [MSG]The String 'Not start' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 25 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 30 | [SRC]private static final Map<String, FileImportStatus> looku..HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.FileImportStatus is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 40 | [SRC]static FileImportStatus get(String label) { [MSG]The public static method get in class tech.muyan.enums.FileImportStatus is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 41 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]enum FormType { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 7 | [SRC]enum FormType { [MSG]The domain class tech.muyan.enums.FormType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 7 | [SRC]enum FormType { [MSG]The domain class tech.muyan.enums.FormType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 15 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 28 | [SRC]private static final Map<String, FormType> lookup = new HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.FormType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 9 | [SRC]LIST("List"), [MSG]The String 'List' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 10 | [SRC]CREATE("Create"), [MSG]The String 'Create' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 11 | [SRC]UPDATE("Update"), [MSG]The String 'Update' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]DISPLAY("Display"), [MSG]The String 'Display' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]WIZARD("Wizard") [MSG]The String 'Wizard' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 22 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 28 | [SRC]private static final Map<String, FormType> lookup = new HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.FormType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 38 | [SRC]static FormType get(String label) { [MSG]The public static method get in class tech.muyan.enums.FormType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 39 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 10 | [SRC]enum LineImportStatus { [MSG]The domain class tech.muyan.enums.LineImportStatus should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]enum LineImportStatus { [MSG]The domain class tech.muyan.enums.LineImportStatus should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 16 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 28 | [SRC]private static final Map<String, LineImportStatus> looku..HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.LineImportStatus does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 12 | [SRC]SKIPPED("Skipped"), [MSG]The String 'Skipped' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]FAILED("Failed"), [MSG]The String 'Failed' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]INSERTED("Inserted"), [MSG]The String 'Inserted' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]UPDATED("Updated") [MSG]The String 'Updated' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 23 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 28 | [SRC]private static final Map<String, LineImportStatus> looku..HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.LineImportStatus is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 38 | [SRC]static LineImportStatus get(String label) { [MSG]The public static method get in class tech.muyan.enums.LineImportStatus is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 39 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 10 | [SRC]enum LogicType { [MSG]The domain class tech.muyan.enums.LogicType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 10 | [SRC]enum LogicType { [MSG]The domain class tech.muyan.enums.LogicType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 21 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 34 | [SRC]private static final Map<String, LogicType> lookup = new HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.LogicType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 12 | [SRC]DECIDES("Field dependencies logic"), [MSG]The String 'Field dependencies logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]DEFAULT_VALUE("Field default value logic"), [MSG]The String 'Field default value logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 14 | [SRC]REQUIRED("Field Mandatory logic"), [MSG]The String 'Field Mandatory logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 15 | [SRC]VISIBILITY("Field visibility logic"), [MSG]The String 'Field visibility logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 16 | [SRC]EDIT_ABILITY("Field edit ability logic"), [MSG]The String 'Field edit ability logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 17 | [SRC]UPDATE_DELETE("Object update/delete ability logic"), [MSG]The String 'Object update/delete ability logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 18 | [SRC]CREATE("Object create ability logic"), [MSG]The String 'Object create ability logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 19 | [SRC]SEARCH("Object search logic") [MSG]The String 'Object search logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 28 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 34 | [SRC]private static final Map<String, LogicType> lookup = new HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.LogicType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 44 | [SRC]static LogicType get(String label) { [MSG]The public static method get in class tech.muyan.enums.LogicType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 45 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]enum MenuType { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 7 | [SRC]enum MenuType { [MSG]The domain class tech.muyan.enums.MenuType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 7 | [SRC]enum MenuType { [MSG]The domain class tech.muyan.enums.MenuType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 14 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 27 | [SRC]private static final Map<String, MenuType> lookup = new HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.MenuType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 9 | [SRC]MENU_GROUP("Menu Group"), [MSG]The String 'Menu Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 10 | [SRC]EXTERNAL_LINK("External Link"), [MSG]The String 'External Link' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 11 | [SRC]INTERNAL_LINK("Internal Link"), [MSG]The String 'Internal Link' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]FORM("Form") [MSG]The String 'Form' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 21 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]private static final Map<String, MenuType> lookup = new HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.MenuType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 37 | [SRC]static MenuType get(String label) { [MSG]The public static method get in class tech.muyan.enums.MenuType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 38 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 9 | [SRC]enum ObjectReferenceType { [MSG]The domain class tech.muyan.enums.ObjectReferenceType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 9 | [SRC]enum ObjectReferenceType { [MSG]The domain class tech.muyan.enums.ObjectReferenceType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 14 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 27 | [SRC]private static final Map<String, ObjectReferenceType> lo..HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.ObjectReferenceType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 10 | [SRC]ONE_TO_ONE("One to One"), [MSG]The String 'One to One' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 11 | [SRC]ONE_TO_MANY("One to Many"), [MSG]The String 'One to Many' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 12 | [SRC]MANY_TO_MANY("Many to Many"); [MSG]The String 'Many to Many' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 21 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]private static final Map<String, ObjectReferenceType> lo..HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.ObjectReferenceType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 37 | [SRC]static ObjectReferenceType get(String label) { [MSG]The public static method get in class tech.muyan.enums.ObjectReferenceType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 38 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
GrailsDomainHasEquals | 2 | 11 | [SRC]enum StorageEngineType { [MSG]The domain class tech.muyan.enums.StorageEngineType should define an equals(Object) method |
GrailsDomainHasToString | 2 | 11 | [SRC]enum StorageEngineType { [MSG]The domain class tech.muyan.enums.StorageEngineType should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 15 | [SRC]String label [MSG]There is no constraint on the size of String property 'label' which will result in applying database defaults |
FieldName | 2 | 27 | [SRC]private static final Map<String, StorageEngineType> look..HashMap<>(8) [MSG]The fieldname lookup in class tech.muyan.enums.StorageEngineType does not match [A-Z][A-Z0-9_]* |
UnnecessaryGString | 3 | 12 | [SRC]S3_CEPH("Ceph & S3"), [MSG]The String 'Ceph & S3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 13 | [SRC]LOCAL_FILE("Local file system") [MSG]The String 'Local file system' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 22 | [SRC]return this.label [MSG]The return keyword is not needed and can be removed |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]private static final Map<String, StorageEngineType> look..HashMap<>(8) [MSG]The static field lookup in class tech.muyan.enums.StorageEngineType is declared after an instance field |
StaticMethodsBeforeInstanceMethods | 3 | 37 | [SRC]static StorageEngineType get(String label) { [MSG]The public static method get in class tech.muyan.enums.StorageEngineType is declared after a public instance method |
UnnecessaryReturnKeyword | 3 | 38 | [SRC]return lookup.get(label) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 5 | [SRC]class ConverterHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodReturnTypeRequired | 3 | 15 | [SRC]def static convertList(Converter converter, String type,..ist value) { [MSG]Method "convertList" has a dynamic return type |
NoDef | 3 | 15 | [SRC]def static convertList(Converter converter, String type,..ist value) { [MSG]def for method return type should not be used |
UnnecessaryDefInMethodDeclaration | 3 | 15 | [SRC]def static convertList(Converter converter, String type,..ist value) { [MSG]Violation in class tech.muyan.helper.ConverterHelper. The def keyword is unneeded when a method is marked static |
NoDef | 3 | 17 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 17 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
ImplicitClosureParameter | 3 | 18 | [SRC]value.forEach { it -> [MSG]By convention "it" should not be used as a closure parameter name. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 29 | [SRC]class DomainHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ClassForName | 2 | 73 | [SRC]return initialize? Class.forName(domainClazz.getFullName.. domainClazz [MSG]Violation in class tech.muyan.helper.DomainHelper. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
DuplicateNumberLiteral | 2 | 91 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1) ? [MSG]Duplicate Number Literal: -1 |
DuplicateStringLiteral | 2 | 91 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1) ? [MSG]Duplicate String Literal: _ |
DuplicateStringLiteral | 2 | 204 | [SRC]def propGrailsClazz = grailsApplication.getArtefact("Dom..e.getName()) [MSG]Duplicate String Literal: Domain |
DuplicateStringLiteral | 2 | 209 | [SRC]if (result['type'] == "array") { [MSG]Duplicate String Literal: type |
DuplicateStringLiteral | 2 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]Duplicate String Literal: Domain |
DuplicateStringLiteral | 2 | 214 | [SRC]result['backReferenceField'] = getBackReferenceFieldFromOwner( [MSG]Duplicate String Literal: backReferenceField |
DuplicateStringLiteral | 2 | 227 | [SRC]if (columnMapping != null && columnMapping.type == "text.. 'string') { [MSG]Duplicate String Literal: type |
DuplicateStringLiteral | 2 | 228 | [SRC]result['type'] = 'text' [MSG]Duplicate String Literal: text |
DuplicateStringLiteral | 2 | 228 | [SRC]result['type'] = 'text' [MSG]Duplicate String Literal: type |
DuplicateStringLiteral | 2 | 333 | [SRC]if (domainClazz == null && domainName.indexOf("_") > 0) { [MSG]Duplicate String Literal: _ |
DuplicateStringLiteral | 2 | 355 | [SRC]attributes.put("decides", dependFields) [MSG]Duplicate String Literal: decides |
UnnecessaryReturnKeyword | 3 | 44 | [SRC]return getDomainClassInfo(domainName, true) as Class<?> [MSG]The return keyword is not needed and can be removed |
UnnecessaryReturnKeyword | 3 | 58 | [SRC]return getDomainClassInfo(domainName, false) as DomainClass [MSG]The return keyword is not needed and can be removed |
InvertedCondition | 3 | 63 | [SRC]if (null == domainName || "" == domainName) { [MSG]null is a constant expression on the left side of a compare equals operation |
InvertedCondition | 3 | 63 | [SRC]if (null == domainName || "" == domainName) { [MSG] is a constant expression on the left side of a compare equals operation |
UnnecessaryGString | 3 | 63 | [SRC]if (null == domainName || "" == domainName) { [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 66 | [SRC]def domains = DomainClass.getAll() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 66 | [SRC]def domains = DomainClass.getAll() [MSG]The type is not specified for variable "domains" |
UnnecessaryGetter | 3 | 66 | [SRC]def domains = DomainClass.getAll() [MSG]getAll() can probably be rewritten as all |
NoDef | 3 | 67 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1)? [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 67 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1)? [MSG]The type is not specified for variable "trimmedDomainName" |
NoDef | 3 | 69 | [SRC]def upperCase = trimmedDomainName.toUpperCase() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 69 | [SRC]def upperCase = trimmedDomainName.toUpperCase() [MSG]The type is not specified for variable "upperCase" |
UnnecessaryGetter | 3 | 71 | [SRC]if (upperCase.equals(domainClazz.getFullName().toUpperCase()) [MSG]getFullName() can probably be rewritten as fullName |
UnnecessaryGetter | 3 | 72 | [SRC]|| upperCase.equals(domainClazz.getShortName().toUpperCase())) { [MSG]getShortName() can probably be rewritten as shortName |
UnnecessaryGetter | 3 | 73 | [SRC]return initialize? Class.forName(domainClazz.getFullName.. domainClazz [MSG]getFullName() can probably be rewritten as fullName |
InvertedCondition | 3 | 87 | [SRC]if (null == domainName || "" == domainName) { [MSG]null is a constant expression on the left side of a compare equals operation |
InvertedCondition | 3 | 87 | [SRC]if (null == domainName || "" == domainName) { [MSG] is a constant expression on the left side of a compare equals operation |
UnnecessaryGString | 3 | 87 | [SRC]if (null == domainName || "" == domainName) { [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 90 | [SRC]def domains = DomainClass.getAll() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 90 | [SRC]def domains = DomainClass.getAll() [MSG]The type is not specified for variable "domains" |
UnnecessaryGetter | 3 | 90 | [SRC]def domains = DomainClass.getAll() [MSG]getAll() can probably be rewritten as all |
NoDef | 3 | 91 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1) ? [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 91 | [SRC]def trimmedDomainName = (domainName.indexOf('_') > -1) ? [MSG]The type is not specified for variable "trimmedDomainName" |
NoDef | 3 | 93 | [SRC]def upperCase = trimmedDomainName.toUpperCase() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 93 | [SRC]def upperCase = trimmedDomainName.toUpperCase() [MSG]The type is not specified for variable "upperCase" |
UnnecessaryGetter | 3 | 95 | [SRC]if (upperCase.equals(domainClazz.getFullName().toUpperCase()) [MSG]getFullName() can probably be rewritten as fullName |
UnnecessaryGetter | 3 | 96 | [SRC]|| upperCase.equals(domainClazz.getShortName().toUpperCase())) { [MSG]getShortName() can probably be rewritten as shortName |
UnnecessaryReturnKeyword | 3 | 100 | [SRC]return false [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 113 | [SRC]def value [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 113 | [SRC]def value [MSG]The type is not specified for variable "value" |
UnnecessaryGString | 3 | 118 | [SRC]resource.metaClass.respondsTo(resource, "render")) { [MSG]The String 'render' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 124 | [SRC]return value [MSG]The return keyword is not needed and can be removed |
UnnecessaryGetter | 3 | 136 | [SRC]List<MappingFactory> associated = manySideDomainDef.pers..sociations() [MSG]getAssociations() can probably be rewritten as associations |
UnnecessaryGString | 3 | 145 | [SRC]return "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 145 | [SRC]return "" [MSG]The return keyword is not needed and can be removed |
UnnecessaryGetter | 3 | 157 | [SRC]List<MappingFactory> associated = oneSideDomainDef.persi..sociations() [MSG]getAssociations() can probably be rewritten as associations |
UnnecessaryGString | 3 | 166 | [SRC]return "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 166 | [SRC]return "" [MSG]The return keyword is not needed and can be removed |
ImplicitReturnStatement | 3 | 175 | [SRC]static Collection<Map<String, Object>> getStaticFields(S..plication) { [MSG]The method getStaticFields in class tech.muyan.helper.DomainHelper is missing an explicit return |
NoDef | 3 | 176 | [SRC]def staticFields = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 176 | [SRC]def staticFields = [] [MSG]The type is not specified for variable "staticFields" |
NoDef | 3 | 178 | [SRC]def artifacts = grailsApplication.getArtefacts("Domain") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 178 | [SRC]def artifacts = grailsApplication.getArtefacts("Domain") [MSG]The type is not specified for variable "artifacts" |
UnnecessaryGString | 3 | 178 | [SRC]def artifacts = grailsApplication.getArtefacts("Domain") [MSG]The String 'Domain' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 182 | [SRC]def constraints = obj.constrainedProperties [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 182 | [SRC]def constraints = obj.constrainedProperties [MSG]The type is not specified for variable "constraints" |
NoDef | 3 | 183 | [SRC]def mappings = GrailsDomainBinder.getMapping(obj.getClazz()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 183 | [SRC]def mappings = GrailsDomainBinder.getMapping(obj.getClazz()) [MSG]The type is not specified for variable "mappings" |
UnnecessaryGetter | 3 | 183 | [SRC]def mappings = GrailsDomainBinder.getMapping(obj.getClazz()) [MSG]getClazz() can probably be rewritten as clazz |
NoDef | 3 | 184 | [SRC]def columns = mappings.columns [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 184 | [SRC]def columns = mappings.columns [MSG]The type is not specified for variable "columns" |
NoDef | 3 | 185 | [SRC]def hasMany = GrailsClassUtils.getStaticPropertyValue(ob.., "hasMany") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 185 | [SRC]def hasMany = GrailsClassUtils.getStaticPropertyValue(ob.., "hasMany") [MSG]The type is not specified for variable "hasMany" |
UnnecessaryGetter | 3 | 185 | [SRC]def hasMany = GrailsClassUtils.getStaticPropertyValue(ob.., "hasMany") [MSG]getClazz() can probably be rewritten as clazz |
UnnecessaryGString | 3 | 185 | [SRC]def hasMany = GrailsClassUtils.getStaticPropertyValue(ob.., "hasMany") [MSG]The String 'hasMany' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 189 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 189 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
NoDef | 3 | 191 | [SRC]def propertyType = property.getPropertyType() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 191 | [SRC]def propertyType = property.getPropertyType() [MSG]The type is not specified for variable "propertyType" |
UnnecessaryGetter | 3 | 191 | [SRC]def propertyType = property.getPropertyType() [MSG]getPropertyType() can probably be rewritten as propertyType |
NoDef | 3 | 196 | [SRC]def appliedConstraints = property.getAppliedConstraints() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 196 | [SRC]def appliedConstraints = property.getAppliedConstraints() [MSG]The type is not specified for variable "appliedConstraints" |
UnnecessaryGetter | 3 | 196 | [SRC]def appliedConstraints = property.getAppliedConstraints() [MSG]getAppliedConstraints() can probably be rewritten as appliedConstraints |
UnnecessaryGetter | 3 | 202 | [SRC]if (isDomainClass(propertyType.getName())) { [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 204 | [SRC]def propGrailsClazz = grailsApplication.getArtefact("Dom..e.getName()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 204 | [SRC]def propGrailsClazz = grailsApplication.getArtefact("Dom..e.getName()) [MSG]The type is not specified for variable "propGrailsClazz" |
UnnecessaryGetter | 3 | 204 | [SRC]def propGrailsClazz = grailsApplication.getArtefact("Dom..e.getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGString | 3 | 204 | [SRC]def propGrailsClazz = grailsApplication.getArtefact("Dom..e.getName()) [MSG]The String 'Domain' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 209 | [SRC]if (result['type'] == "array") { [MSG]The String 'array' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]The type is not specified for variable "objGrailsClazz" |
UnnecessaryGetter | 3 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 3 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]getClazz() can probably be rewritten as clazz |
UnnecessaryGString | 3 | 210 | [SRC]def objGrailsClazz = grailsApplication.getArtefact("Doma..).getName()) [MSG]The String 'Domain' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 213 | [SRC]result['elementType'] = StringHelper.javaTypeToPathType(v.getName()) [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 221 | [SRC]def constrainKey = DomainMetaConfig.ConstraintTypeToDisp..).getName()] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 221 | [SRC]def constrainKey = DomainMetaConfig.ConstraintTypeToDisp..).getName()] [MSG]The type is not specified for variable "constrainKey" |
UnnecessaryGetter | 3 | 221 | [SRC]def constrainKey = DomainMetaConfig.ConstraintTypeToDisp..).getName()] [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 222 | [SRC]def constrainValue = getColumnConstrainMeta(cObj) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 222 | [SRC]def constrainValue = getColumnConstrainMeta(cObj) [MSG]The type is not specified for variable "constrainValue" |
NoDef | 3 | 226 | [SRC]def columnMapping = columns.get(name) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 226 | [SRC]def columnMapping = columns.get(name) [MSG]The type is not specified for variable "columnMapping" |
UnnecessaryGString | 3 | 227 | [SRC]if (columnMapping != null && columnMapping.type == "text.. 'string') { [MSG]The String 'text' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 256 | [SRC]def constrainValue = "" [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 256 | [SRC]def constrainValue = "" [MSG]The type is not specified for variable "constrainValue" |
UnnecessaryGString | 3 | 256 | [SRC]def constrainValue = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 273 | [SRC]return constrainValue [MSG]The return keyword is not needed and can be removed |
UnnecessaryGString | 3 | 289 | [SRC]case "boolean": [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 292 | [SRC]case "integer": [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 295 | [SRC]case "long": [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 298 | [SRC]case "decimal": [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 302 | [SRC]return defaultVal [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 319 | [SRC]def type = property.propertyType [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 319 | [SRC]def type = property.propertyType [MSG]The type is not specified for variable "type" |
NoDef | 3 | 320 | [SRC]def typeName = type.getName() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 320 | [SRC]def typeName = type.getName() [MSG]The type is not specified for variable "typeName" |
UnnecessaryGetter | 3 | 320 | [SRC]def typeName = type.getName() [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 321 | [SRC]def clientType = DomainMetaConfig.AttributeTypeToClientT..ap[typeName] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 321 | [SRC]def clientType = DomainMetaConfig.AttributeTypeToClientT..ap[typeName] [MSG]The type is not specified for variable "clientType" |
UnnecessaryReturnKeyword | 3 | 322 | [SRC]return clientType == null? StringHelper.javaTypeToPathTy..: clientType [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 332 | [SRC]def domainClazz = DomainClass.findByShortName(domainName.capitalize()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 332 | [SRC]def domainClazz = DomainClass.findByShortName(domainName.capitalize()) [MSG]The type is not specified for variable "domainClazz" |
UnnecessaryGString | 3 | 333 | [SRC]if (domainClazz == null && domainName.indexOf("_") > 0) { [MSG]The String '_' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 336 | [SRC]def dynamicFields = ObjectDynamicField.findAllByObjectTy..domainClazz) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 336 | [SRC]def dynamicFields = ObjectDynamicField.findAllByObjectTy..domainClazz) [MSG]The type is not specified for variable "dynamicFields" |
NoDef | 3 | 337 | [SRC]def fields = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 337 | [SRC]def fields = [] [MSG]The type is not specified for variable "fields" |
UnnecessaryGetter | 3 | 339 | [SRC]List dependFields = getDynamicFieldDecides(domainClazz.g..), field.id) [MSG]getFullName() can probably be rewritten as fullName |
NoDef | 3 | 340 | [SRC]def key = "df_$field.id".toString() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 340 | [SRC]def key = "df_$field.id".toString() [MSG]The type is not specified for variable "key" |
NoDef | 3 | 341 | [SRC]def fieldType = field.dynamicField.fieldType.name().toLowerCase() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 341 | [SRC]def fieldType = field.dynamicField.fieldType.name().toLowerCase() [MSG]The type is not specified for variable "fieldType" |
NoDef | 3 | 342 | [SRC]def displayControllerType = DomainMetaConfig.DisplayComp..mponentType] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 342 | [SRC]def displayControllerType = DomainMetaConfig.DisplayComp..mponentType] [MSG]The type is not specified for variable "displayControllerType" |
NoDef | 3 | 343 | [SRC]def controller = displayControllerType != null? displayC.. : fieldType [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 343 | [SRC]def controller = displayControllerType != null? displayC.. : fieldType [MSG]The type is not specified for variable "controller" |
NoDef | 3 | 344 | [SRC]def attributes = [ [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 344 | [SRC]def attributes = [ [MSG]The type is not specified for variable "attributes" |
UnnecessaryGString | 3 | 355 | [SRC]attributes.put("decides", dependFields) [MSG]The String 'decides' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 359 | [SRC]return fields [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 369 | [SRC]def decideLogics = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 369 | [SRC]def decideLogics = DynamicLogic.where { [MSG]The type is not specified for variable "decideLogics" |
NoDef | 3 | 372 | [SRC]def dependFields = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 372 | [SRC]def dependFields = [] [MSG]The type is not specified for variable "dependFields" |
ImplicitClosureParameter | 3 | 375 | [SRC]dependFields.add(it.targetField) [MSG]By convention closure parameters should be specified explicitly. |
UnnecessaryReturnKeyword | 3 | 378 | [SRC]return dependFields [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 388 | [SRC]def decideLogics = DynamicLogic.where { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 388 | [SRC]def decideLogics = DynamicLogic.where { [MSG]The type is not specified for variable "decideLogics" |
NoDef | 3 | 393 | [SRC]def dependFields = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 393 | [SRC]def dependFields = [] [MSG]The type is not specified for variable "dependFields" |
ImplicitClosureParameter | 3 | 396 | [SRC]dependFields.add(it.targetField) [MSG]By convention closure parameters should be specified explicitly. |
UnnecessaryReturnKeyword | 3 | 399 | [SRC]return dependFields [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 412 | [SRC]def staticFields = getStaticFields(domainName, application) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 412 | [SRC]def staticFields = getStaticFields(domainName, application) [MSG]The type is not specified for variable "staticFields" |
NoDef | 3 | 414 | [SRC]def dynamicFields = getDynamicFields(domainName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 414 | [SRC]def dynamicFields = getDynamicFields(domainName) [MSG]The type is not specified for variable "dynamicFields" |
UnnecessaryReturnKeyword | 3 | 416 | [SRC]return allFields [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 27 | [SRC]class DynamicFieldHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
FactoryMethodName | 2 | 52 | [SRC]static DynamicFieldValue buildFromString( [MSG]Violation in class DynamicFieldHelper. The method 'buildFromString' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
FactoryMethodName | 2 | 83 | [SRC]static DynamicFieldValue build(ObjectDynamicField field,..ypedValue) { [MSG]Violation in class DynamicFieldHelper. The method 'build' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
FactoryMethodName | 2 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]Violation in class DynamicFieldHelper. The method 'createDynamicFieldValue' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
Instanceof | 2 | 166 | [SRC]return (obj instanceof WithDynamicFields) [MSG]The instanceof operator is used in class tech.muyan.helper.DynamicFieldHelper |
VariableName | 2 | 177 | [SRC]def df_id = key.substring(prefix.length()) [MSG]Variable named df_id in class tech.muyan.helper.DynamicFieldHelper does not match the pattern [a-z][a-zA-Z0-9]* |
ThrowRuntimeException | 2 | 188 | [SRC]throw new RuntimeException("Multiple dynamic field value..inObj.id}]") [MSG]The type RuntimeException should not be thrown |
Instanceof | 2 | 211 | [SRC]if ((val instanceof HibernateProxy)) { [MSG]The instanceof operator is used in class tech.muyan.helper.DynamicFieldHelper |
Instanceof | 2 | 218 | [SRC]} else if (val instanceof Set || val instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.helper.DynamicFieldHelper |
Instanceof | 2 | 218 | [SRC]} else if (val instanceof Set || val instanceof List) { [MSG]The instanceof operator is used in class tech.muyan.helper.DynamicFieldHelper |
MethodReturnTypeRequired | 3 | 34 | [SRC]static saveAllToOwner(long ownerId, List<DynamicFieldValue> values) { [MSG]Method "saveAllToOwner" has a dynamic return type |
NoDef | 3 | 34 | [SRC]static saveAllToOwner(long ownerId, List<DynamicFieldValue> values) { [MSG]def for method return type should not be used |
NoDef | 3 | 36 | [SRC]def existing = DynamicFieldValue.findByOwnerIdAndObjectDynamicField( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 36 | [SRC]def existing = DynamicFieldValue.findByOwnerIdAndObjectDynamicField( [MSG]The type is not specified for variable "existing" |
UnnecessaryObjectReferences | 3 | 44 | [SRC]existing.save(flush: true) [MSG]The code could be more concise by using a with() or identity() block |
DuplicateMapLiteral | 3 | 47 | [SRC]value.save(flush: true) [MSG]Map [flush:true] is duplicated. |
NoDef | 3 | 56 | [SRC]def type = dfv.objectDynamicField.displayComponentType [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 56 | [SRC]def type = dfv.objectDynamicField.displayComponentType [MSG]The type is not specified for variable "type" |
NoDef | 3 | 57 | [SRC]def isSingleSelection = DomainMetaConfig.SingleSelection..ntains(type) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 57 | [SRC]def isSingleSelection = DomainMetaConfig.SingleSelection..ntains(type) [MSG]The type is not specified for variable "isSingleSelection" |
NoDef | 3 | 58 | [SRC]def isMultipleSelection = DomainMetaConfig.MultipleSelec..ntains(type) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 58 | [SRC]def isMultipleSelection = DomainMetaConfig.MultipleSelec..ntains(type) [MSG]The type is not specified for variable "isMultipleSelection" |
UnnecessaryGetter | 3 | 60 | [SRC]String optionStr = dfv.objectDynamicField.dynamicField.g..ptionsJson() [MSG]getOptionsJson() can probably be rewritten as optionsJson |
UnnecessaryReturnKeyword | 3 | 80 | [SRC]return dfv [MSG]The return keyword is not needed and can be removed |
CouldBeSwitchStatement | 3 | 86 | [SRC]if (fieldDefinition.fieldType == DynamicFieldDataType.STRING) { [MSG]Code could use switch statement |
CouldBeSwitchStatement | 3 | 86 | [SRC]if (fieldDefinition.fieldType == DynamicFieldDataType.STRING) { [MSG]Code could use switch statement |
NoDef | 3 | 91 | [SRC]def val = typedValue as LocalDate [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 91 | [SRC]def val = typedValue as LocalDate [MSG]The type is not specified for variable "val" |
UnnecessaryReturnKeyword | 3 | 100 | [SRC]return dfv [MSG]The return keyword is not needed and can be removed |
ImplicitReturnStatement | 3 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]The method createDynamicFieldValue in class tech.muyan.helper.DynamicFieldHelper is missing an explicit return |
MethodParameterTypeRequired | 3 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]"domainObj" parameter of "createDynamicFieldValue" method is dynamically typed |
MethodParameterTypeRequired | 3 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]"objectDynamicField" parameter of "createDynamicFieldValue" method is dynamically typed |
NoDef | 3 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 109 | [SRC]static DynamicFieldValue createDynamicFieldValue(domainO..amicField) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 110 | [SRC]def val = new DynamicFieldValue() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 110 | [SRC]def val = new DynamicFieldValue() [MSG]The type is not specified for variable "val" |
MethodParameterTypeRequired | 3 | 121 | [SRC]static List<DynamicFieldValue> getDynamicFieldValuesOf(domainObj) { [MSG]"domainObj" parameter of "getDynamicFieldValuesOf" method is dynamically typed |
NoDef | 3 | 121 | [SRC]static List<DynamicFieldValue> getDynamicFieldValuesOf(domainObj) { [MSG]def for method parameter type should not be used |
UnnecessaryGetter | 3 | 123 | [SRC](ownerId == domainObj.id) && (objectDynamicField.objectT..).getName()) [MSG]getName() can probably be rewritten as name |
UnnecessaryReturnKeyword | 3 | 125 | [SRC]return values [MSG]The return keyword is not needed and can be removed |
ImplicitReturnStatement | 3 | 134 | [SRC]static List<DynamicFieldValue> getDynamicFieldValueByTyp..domainObj) { [MSG]The method getDynamicFieldValueByType in class tech.muyan.helper.DynamicFieldHelper is missing an explicit return |
MethodParameterTypeRequired | 3 | 134 | [SRC]static List<DynamicFieldValue> getDynamicFieldValueByTyp..domainObj) { [MSG]"objectField" parameter of "getDynamicFieldValueByType" method is dynamically typed |
MethodParameterTypeRequired | 3 | 134 | [SRC]static List<DynamicFieldValue> getDynamicFieldValueByTyp..domainObj) { [MSG]"domainObj" parameter of "getDynamicFieldValueByType" method is dynamically typed |
NoDef | 3 | 134 | [SRC]static List<DynamicFieldValue> getDynamicFieldValueByTyp..domainObj) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 134 | [SRC]static List<DynamicFieldValue> getDynamicFieldValueByTyp..domainObj) { [MSG]def for method parameter type should not be used |
UnnecessaryGString | 3 | 137 | [SRC]eq("objectDynamicField", objectField) [MSG]The String 'objectDynamicField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 138 | [SRC]eq("ownerId", domainObj.id) [MSG]The String 'ownerId' can be wrapped in single quotes instead of double quotes |
ImplicitReturnStatement | 3 | 148 | [SRC]static List fillAllWithDynamicFieldValues(domainObjects) { [MSG]The method fillAllWithDynamicFieldValues in class tech.muyan.helper.DynamicFieldHelper is missing an explicit return |
MethodParameterTypeRequired | 3 | 148 | [SRC]static List fillAllWithDynamicFieldValues(domainObjects) { [MSG]"domainObjects" parameter of "fillAllWithDynamicFieldValues" method is dynamically typed |
NoDef | 3 | 148 | [SRC]static List fillAllWithDynamicFieldValues(domainObjects) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 149 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 149 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 165 | [SRC]static hasDynamicFields(Object obj) { [MSG]Method "hasDynamicFields" has a dynamic return type |
NoDef | 3 | 165 | [SRC]static hasDynamicFields(Object obj) { [MSG]def for method return type should not be used |
UnnecessaryReturnKeyword | 3 | 166 | [SRC]return (obj instanceof WithDynamicFields) [MSG]The return keyword is not needed and can be removed |
MethodParameterTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]"domainObj" parameter of "parseDynamicFields" method is dynamically typed |
MethodParameterTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]"jsonObj" parameter of "parseDynamicFields" method is dynamically typed |
MethodParameterTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]"decimalConverter" parameter of "parseDynamicFields" method is dynamically typed |
MethodParameterTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]"dateConverter" parameter of "parseDynamicFields" method is dynamically typed |
MethodParameterTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]"isCreate" parameter of "parseDynamicFields" method is dynamically typed |
MethodReturnTypeRequired | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]Method "parseDynamicFields" has a dynamic return type |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method return type should not be used |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]def for method parameter type should not be used |
UnnecessaryDefInMethodDeclaration | 3 | 169 | [SRC]def static parseDynamicFields(domainObj, jsonObj, decima.. isCreate) { [MSG]Violation in class tech.muyan.helper.DynamicFieldHelper. The def keyword is unneeded when a method is marked static |
NoDef | 3 | 170 | [SRC]def result = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 170 | [SRC]def result = [] [MSG]The type is not specified for variable "result" |
NoDef | 3 | 175 | [SRC]def prefix = DomainMetaConfig.DynamicFieldKeyPrefix [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 175 | [SRC]def prefix = DomainMetaConfig.DynamicFieldKeyPrefix [MSG]The type is not specified for variable "prefix" |
NoDef | 3 | 177 | [SRC]def df_id = key.substring(prefix.length()) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 177 | [SRC]def df_id = key.substring(prefix.length()) [MSG]The type is not specified for variable "df_id" |
UnnecessarySubstring | 3 | 177 | [SRC]def df_id = key.substring(prefix.length()) [MSG]Violation in class tech.muyan.helper.DynamicFieldHelper. The String.substring(int) method can be replaced with the subscript operator |
NoDef | 3 | 178 | [SRC]def odf = ObjectDynamicField.get(df_id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 178 | [SRC]def odf = ObjectDynamicField.get(df_id) [MSG]The type is not specified for variable "odf" |
NoDef | 3 | 185 | [SRC]def firstElem = currVals.get(0) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 185 | [SRC]def firstElem = currVals.get(0) [MSG]The type is not specified for variable "firstElem" |
MethodParameterTypeRequired | 3 | 205 | [SRC]static appendDynamicFields(domainObj) { [MSG]"domainObj" parameter of "appendDynamicFields" method is dynamically typed |
MethodReturnTypeRequired | 3 | 205 | [SRC]static appendDynamicFields(domainObj) { [MSG]Method "appendDynamicFields" has a dynamic return type |
NoDef | 3 | 205 | [SRC]static appendDynamicFields(domainObj) { [MSG]def for method return type should not be used |
NoDef | 3 | 205 | [SRC]static appendDynamicFields(domainObj) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 207 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 207 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 208 | [SRC]result.put("id", domainObj.id) [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 212 | [SRC]def clazz = val.getMetaClass().getTheClass() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 212 | [SRC]def clazz = val.getMetaClass().getTheClass() [MSG]The type is not specified for variable "clazz" |
UnnecessaryGetter | 3 | 212 | [SRC]def clazz = val.getMetaClass().getTheClass() [MSG]getTheClass() can probably be rewritten as theClass |
UnnecessaryGetter | 3 | 212 | [SRC]def clazz = val.getMetaClass().getTheClass() [MSG]getMetaClass() can probably be rewritten as metaClass |
UnnecessaryGetter | 3 | 213 | [SRC]if (DomainHelper.isDomainClass(clazz.getName())) { [MSG]getName() can probably be rewritten as name |
UnnecessaryGetter | 3 | 216 | [SRC]} else if (DomainHelper.isDomainClass(val.getClass().getName())) { [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 219 | [SRC]def field = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 219 | [SRC]def field = [] [MSG]The type is not specified for variable "field" |
MethodParameterTypeRequired | 3 | 243 | [SRC]static void getDomainProperties(List<DynamicFieldValue> ..domainObj) { [MSG]"domainObj" parameter of "getDomainProperties" method is dynamically typed |
NoDef | 3 | 243 | [SRC]static void getDomainProperties(List<DynamicFieldValue> ..domainObj) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 245 | [SRC]def propertyName = DomainMetaConfig.DynamicFieldKeyPrefi..amicField.id [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 245 | [SRC]def propertyName = DomainMetaConfig.DynamicFieldKeyPrefi..amicField.id [MSG]The type is not specified for variable "propertyName" |
NoDef | 3 | 246 | [SRC]def value [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 246 | [SRC]def value [MSG]The type is not specified for variable "value" |
MethodParameterTypeRequired | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]"valueObj" parameter of "setDynamicFieldValue" method is dynamically typed |
MethodParameterTypeRequired | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]"value" parameter of "setDynamicFieldValue" method is dynamically typed |
MethodParameterTypeRequired | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]"decimalConverter" parameter of "setDynamicFieldValue" method is dynamically typed |
MethodParameterTypeRequired | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]"dateConverter" parameter of "setDynamicFieldValue" method is dynamically typed |
NoDef | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 287 | [SRC]static void setDynamicFieldValue(valueObj, value, decima..Converter) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 288 | [SRC]def fd = DynamicFieldDefinition.get(valueObj.objectDynam..micField.id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 288 | [SRC]def fd = DynamicFieldDefinition.get(valueObj.objectDynam..micField.id) [MSG]The type is not specified for variable "fd" |
NoDef | 3 | 300 | [SRC]def decimal = decimalConverter.convert(value) as BigDecimal [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 300 | [SRC]def decimal = decimalConverter.convert(value) as BigDecimal [MSG]The type is not specified for variable "decimal" |
NoDef | 3 | 308 | [SRC]def date = dateConverter.convert(value) as Date [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 308 | [SRC]def date = dateConverter.convert(value) as Date [MSG]The type is not specified for variable "date" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class LabelHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
DuplicateStringLiteral | 2 | 22 | [SRC]labelField = (GrailsClassUtils.getStaticFieldValue(clazz..abelField")) [MSG]Duplicate String Literal: labelField |
DuplicateStringLiteral | 2 | 24 | [SRC]labelField = "label" [MSG]Duplicate String Literal: label |
ImplicitReturnStatement | 3 | 19 | [SRC]static String getLabelField(Class<?> clazz) { [MSG]The method getLabelField in class tech.muyan.helper.LabelHelper is missing an explicit return |
UnnecessaryGString | 3 | 20 | [SRC]String labelField = "id" [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]if (GrailsClassUtils.getStaticFieldValue(clazz, "labelField")) { [MSG]The String 'labelField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 22 | [SRC]labelField = (GrailsClassUtils.getStaticFieldValue(clazz..abelField")) [MSG]The String 'labelField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]} else if (GrailsClassUtils.getProperty(clazz, "label")) { [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]labelField = "label" [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 18 | [SRC]class OrganizationHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
PropertyName | 2 | 44 | [SRC]static final Map<FormType, HttpMethod> FormTypeToHttpMethodMapping = [ [MSG]The property name FormTypeToHttpMethodMapping in class tech.muyan.helper.OrganizationHelper does not match the pattern [A-Z][A-Z0-9_]* |
MethodReturnTypeRequired | 3 | 20 | [SRC]static def getOrganizationOfUser(Authentication authentication) { [MSG]Method "getOrganizationOfUser" has a dynamic return type |
NoDef | 3 | 20 | [SRC]static def getOrganizationOfUser(Authentication authentication) { [MSG]def for method return type should not be used |
UnnecessaryDefInMethodDeclaration | 3 | 20 | [SRC]static def getOrganizationOfUser(Authentication authentication) { [MSG]Violation in class tech.muyan.helper.OrganizationHelper. The def keyword is unneeded when a method is marked static |
UnnecessaryGetter | 3 | 21 | [SRC]long id = authentication.getPrincipal().properties.get("id") as long [MSG]getPrincipal() can probably be rewritten as principal |
UnnecessaryGString | 3 | 21 | [SRC]long id = authentication.getPrincipal().properties.get("id") as long [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 22 | [SRC]def user = User.get(id) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def user = User.get(id) [MSG]The type is not specified for variable "user" |
ImplicitReturnStatement | 3 | 26 | [SRC]static List<DynamicMenu> getMenusOfOrganization(Organiza..arentMenu) { [MSG]The method getMenusOfOrganization in class tech.muyan.helper.OrganizationHelper is missing an explicit return |
MethodParameterTypeRequired | 3 | 26 | [SRC]static List<DynamicMenu> getMenusOfOrganization(Organiza..arentMenu) { [MSG]"parentMenu" parameter of "getMenusOfOrganization" method is dynamically typed |
NoDef | 3 | 26 | [SRC]static List<DynamicMenu> getMenusOfOrganization(Organiza..arentMenu) { [MSG]def for method parameter type should not be used |
UnnecessaryGString | 3 | 27 | [SRC]DynamicMenu.findAllByOrganizationAndParentMenu(organizat..ySequence"]) [MSG]The String 'displaySequence' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]"UNKNOWN_REQUEST_URL" [MSG]The String 'UNKNOWN_REQUEST_URL' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 51 | [SRC]return FormTypeToHttpMethodMapping.get(formType) [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class ParamsHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 18 | [SRC]!((param.id instanceof Long) [MSG]The instanceof operator is used in class tech.muyan.helper.ParamsHelper |
Instanceof | 2 | 19 | [SRC]|| (param.id instanceof String) [MSG]The instanceof operator is used in class tech.muyan.helper.ParamsHelper |
Instanceof | 2 | 20 | [SRC]|| (param.id instanceof Integer)) [MSG]The instanceof operator is used in class tech.muyan.helper.ParamsHelper |
ImplicitReturnStatement | 3 | 16 | [SRC]static boolean idParamNotValid(GrailsParameterMap param) { [MSG]The method idParamNotValid in class tech.muyan.helper.ParamsHelper is missing an explicit return |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CatchException | 2 | 65 | [SRC]} catch (Exception ignored) {} [MSG]The type Exception should not be caught |
Instanceof | 2 | 66 | [SRC]if (hasOne != null && (hasOne instanceof Map)) { [MSG]The instanceof operator is used in class tech.muyan.importexport.ImportEngine |
ClassForName | 2 | 176 | [SRC]Class domainClazz = Class.forName(domainClass.fullName) [MSG]Violation in class tech.muyan.importexport.ImportEngine. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
CatchException | 2 | 312 | [SRC]} catch (Exception e) { [MSG]The type Exception should not be caught |
NoDef | 3 | 48 | [SRC]def domainClazz = DomainHelper.getClazzFromDomainName(clazz.fullName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 48 | [SRC]def domainClazz = DomainHelper.getClazzFromDomainName(clazz.fullName) [MSG]The type is not specified for variable "domainClazz" |
NoDef | 3 | 62 | [SRC]def hasOne = null [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 62 | [SRC]def hasOne = null [MSG]The type is not specified for variable "hasOne" |
UnnecessaryNullCheckBeforeInstanceOf | 3 | 66 | [SRC]if (hasOne != null && (hasOne instanceof Map)) { [MSG]The condition ((hasOne != null) && (hasOne instanceof Map)) can be safely simplified to (hasOne instanceof Map) |
InvertedIfElse | 3 | 88 | [SRC]if (!contains) { [MSG]Testing the negative condition first can make an if statement confusing |
UnnecessaryGString | 3 | 124 | [SRC]moveToFront(sortedFileNames, "ObjectDynamicField") [MSG]The String 'ObjectDynamicField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 125 | [SRC]moveToFront(sortedFileNames, "DynamicFieldDefinition") [MSG]The String 'DynamicFieldDefinition' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 126 | [SRC]return sortedFileNames [MSG]The return keyword is not needed and can be removed |
UnnecessaryGetter | 3 | 162 | [SRC]List<String> headerNames = records.getHeaderNames() [MSG]getHeaderNames() can probably be rewritten as headerNames |
NoDef | 3 | 165 | [SRC]def queryField = CSVHelper.me().isQueryField(headerName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 165 | [SRC]def queryField = CSVHelper.me().isQueryField(headerName) [MSG]The type is not specified for variable "queryField" |
NoDef | 3 | 166 | [SRC]def fieldWithoutStart = queryField? CSVHelper.me().remov..: headerName [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 166 | [SRC]def fieldWithoutStart = queryField? CSVHelper.me().remov..: headerName [MSG]The type is not specified for variable "fieldWithoutStart" |
UnnecessaryGString | 3 | 187 | [SRC]if (rawLineContent != null && rawLineContent.trim() == "") { [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 191 | [SRC]long lineNo = csvRecord.getRecordNumber() + numOfComment.. + blankLine [MSG]getRecordNumber() can probably be rewritten as recordNumber |
UnnecessaryGString | 3 | 195 | [SRC]String lineLog = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NestedForLoop | 3 | 196 | [SRC]for (headerName in headerNames) { [MSG]Nested for loop |
InvertedCondition | 3 | 214 | [SRC]values.put(CSVHelper.DELETE_FLAG, "Y" == rawValue) [MSG]Y is a constant expression on the left side of a compare equals operation |
UnnecessaryGString | 3 | 214 | [SRC]values.put(CSVHelper.DELETE_FLAG, "Y" == rawValue) [MSG]The String 'Y' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 218 | [SRC]def value = converter.convert(rawValue, type, fieldName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 218 | [SRC]def value = converter.convert(rawValue, type, fieldName) [MSG]The type is not specified for variable "value" |
UnnecessaryGetter | 3 | 235 | [SRC]lineLog += "Line ${lineNo} [${rawLineContent}] import fa..tMessage()}" [MSG]getMessage() can probably be rewritten as message |
UnnecessaryGetter | 3 | 235 | [SRC]lineLog += "Line ${lineNo} [${rawLineContent}] import fa..tMessage()}" [MSG]getMessage() can probably be rewritten as message |
UnnecessaryGetter | 3 | 235 | [SRC]lineLog += "Line ${lineNo} [${rawLineContent}] import fa..tMessage()}" [MSG]getMessage() can probably be rewritten as message |
UnnecessaryGString | 3 | 250 | [SRC]String conditions = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NestedForLoop | 3 | 254 | [SRC]for (String queryField : queryFields) { [MSG]Nested for loop |
NoDef | 3 | 255 | [SRC]def val = values.get(queryField) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 255 | [SRC]def val = values.get(queryField) [MSG]The type is not specified for variable "val" |
UnnecessaryGetter | 3 | 264 | [SRC]log.trace("${domainClazz.getName()} with condition ${con..rd.size()}") [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 266 | [SRC]def existObj = existRecord.get(0) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 266 | [SRC]def existObj = existRecord.get(0) [MSG]The type is not specified for variable "existObj" |
DuplicateMapLiteral | 3 | 275 | [SRC]existObj.save(flush: true) [MSG]Map [flush:true] is duplicated. |
UnnecessaryGetter | 3 | 279 | [SRC]recorder.onLineNoUpdate(csvRecord, existObj.getClass().g..existObj.id) [MSG]getSimpleName() can probably be rewritten as simpleName |
InvertedIfElse | 3 | 287 | [SRC]if (!delete) { [MSG]Testing the negative condition first can make an if statement confusing |
NoDef | 3 | 288 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 288 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]The type is not specified for variable "obj" |
DuplicateMapLiteral | 3 | 288 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]Map [flush:true] is duplicated. |
InvertedIfElse | 3 | 299 | [SRC]if (!delete) { [MSG]Testing the negative condition first can make an if statement confusing |
NoDef | 3 | 300 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 300 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]The type is not specified for variable "obj" |
DuplicateMapLiteral | 3 | 300 | [SRC]def obj = domainClazz.newInstance(values).save(flush: true) [MSG]Map [flush:true] is duplicated. |
ImplicitClosureParameter | 3 | 324 | [SRC][reader, fileInputStream, bomInputStream].each { IOUtils..uietly(it) } [MSG]By convention closure parameters should be specified explicitly. |
ImplicitReturnStatement | 3 | 329 | [SRC]static boolean objectChanged(Object object, Map<String, ..ObjectMap) { [MSG]The method objectChanged in class tech.muyan.importexport.ImportEngine is missing an explicit return |
NoDef | 3 | 332 | [SRC]def k = f.key [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 332 | [SRC]def k = f.key [MSG]The type is not specified for variable "k" |
NoDef | 3 | 334 | [SRC]def v = f.value [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 334 | [SRC]def v = f.value [MSG]The type is not specified for variable "v" |
NoDef | 3 | 335 | [SRC]def fieldValue = object."$k" [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 335 | [SRC]def fieldValue = object."$k" [MSG]The type is not specified for variable "fieldValue" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class ImportEngineHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
TrailingComma | 3 | 24 | [SRC]domainClass, [sort: 'startDate', order: 'desc', max: 1] [MSG]Map should contain trailing comma. |
UnnecessaryGetter | 3 | 28 | [SRC]String existMd5 = lastImportRecord.getCsvFileMD5() [MSG]getCsvFileMD5() can probably be rewritten as csvFileMD5 |
UnnecessaryReturnKeyword | 3 | 36 | [SRC]return shouldSkip [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 13 | [SRC]class ImportHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ImplementationAsType | 2 | 23 | [SRC]static HashMap<String, Collection<Map<String, Object>>> ..plication) { [MSG]The return type HashMap should be replaced with an interface or more general parent class |
MethodParameterTypeRequired | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]"directory" parameter of "importFiles" method is dynamically typed |
MethodParameterTypeRequired | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]"metas" parameter of "importFiles" method is dynamically typed |
MethodReturnTypeRequired | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]Method "importFiles" has a dynamic return type |
NoDef | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]def for method return type should not be used |
NoDef | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 15 | [SRC]static importFiles(List<String> sortedFiles, directory, metas) { [MSG]def for method parameter type should not be used |
NoDef | 3 | 17 | [SRC]def domainClass = DomainClass.findByShortName(csvFile) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 17 | [SRC]def domainClass = DomainClass.findByShortName(csvFile) [MSG]The type is not specified for variable "domainClass" |
UnnecessaryGetter | 3 | 18 | [SRC]String filePath = directory.getAbsolutePath() + File.sep..ile + ".csv" [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
UnnecessaryGString | 3 | 18 | [SRC]String filePath = directory.getAbsolutePath() + File.sep..ile + ".csv" [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
ImplicitReturnStatement | 3 | 23 | [SRC]static HashMap<String, Collection<Map<String, Object>>> ..plication) { [MSG]The method getMetasOfFiles in class tech.muyan.importexport.ImportHelper is missing an explicit return |
ImplicitClosureParameter | 3 | 27 | [SRC]def allFields = DomainHelper.getStaticFields(it, application) [MSG]By convention closure parameters should be specified explicitly. |
NoDef | 3 | 27 | [SRC]def allFields = DomainHelper.getStaticFields(it, application) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def allFields = DomainHelper.getStaticFields(it, application) [MSG]The type is not specified for variable "allFields" |
ImplicitClosureParameter | 3 | 28 | [SRC]def dynamicFields = DomainHelper.getDynamicFields(it) [MSG]By convention closure parameters should be specified explicitly. |
NoDef | 3 | 28 | [SRC]def dynamicFields = DomainHelper.getDynamicFields(it) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 28 | [SRC]def dynamicFields = DomainHelper.getDynamicFields(it) [MSG]The type is not specified for variable "dynamicFields" |
ImplicitClosureParameter | 3 | 30 | [SRC]metas.put(it, allFields) [MSG]By convention closure parameters should be specified explicitly. |
MethodParameterTypeRequired | 3 | 39 | [SRC]static void initSeedDomainClassData(application) { [MSG]"application" parameter of "initSeedDomainClassData" method is dynamically typed |
NoDef | 3 | 39 | [SRC]static void initSeedDomainClassData(application) { [MSG]def for method parameter type should not be used |
UnnecessaryGString | 3 | 41 | [SRC]application.getArtefacts("Domain").each { domainObject -> [MSG]The String 'Domain' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 42 | [SRC]def shortName = domainObject.shortName [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 42 | [SRC]def shortName = domainObject.shortName [MSG]The type is not specified for variable "shortName" |
NoDef | 3 | 43 | [SRC]def fullName = domainObject.fullName [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 43 | [SRC]def fullName = domainObject.fullName [MSG]The type is not specified for variable "fullName" |
NoDef | 3 | 44 | [SRC]def existing = DomainClass.findByFullName(fullName) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 44 | [SRC]def existing = DomainClass.findByFullName(fullName) [MSG]The type is not specified for variable "existing" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class ImportRecord { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 11 | [SRC]class ImportRecord { [MSG]The domain class tech.muyan.importexport.ImportRecord should define an equals(Object) method |
GrailsDomainHasToString | 2 | 11 | [SRC]class ImportRecord { [MSG]The domain class tech.muyan.importexport.ImportRecord should define a toString() method |
DuplicateNumberLiteral | 2 | 15 | [SRC]updatedIds type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 15 | [SRC]updatedIds type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
DuplicateNumberLiteral | 2 | 16 | [SRC]deletedIds type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 16 | [SRC]deletedIds type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
DuplicateNumberLiteral | 2 | 17 | [SRC]noUpdateIds type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 17 | [SRC]noUpdateIds type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
DuplicateNumberLiteral | 2 | 18 | [SRC]failedLines type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 18 | [SRC]failedLines type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
DuplicateNumberLiteral | 2 | 19 | [SRC]skippedLines type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 19 | [SRC]skippedLines type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
DuplicateNumberLiteral | 2 | 20 | [SRC]logs type: 'text', length: 8192 [MSG]Duplicate Number Literal: 8192 |
DuplicateStringLiteral | 2 | 20 | [SRC]logs type: 'text', length: 8192 [MSG]Duplicate String Literal: text |
GrailsDomainStringPropertyMaxSize | 2 | 44 | [SRC]String csvFileMD5 [MSG]There is no constraint on the size of String property 'csvFileMD5' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 47 | [SRC]String csvFileHeader [MSG]There is no constraint on the size of String property 'csvFileHeader' which will result in applying database defaults |
FieldTypeRequired | 3 | 13 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
DuplicateMapLiteral | 3 | 15 | [SRC]updatedIds type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
DuplicateMapLiteral | 3 | 16 | [SRC]deletedIds type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
DuplicateMapLiteral | 3 | 17 | [SRC]noUpdateIds type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
DuplicateMapLiteral | 3 | 18 | [SRC]failedLines type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
DuplicateMapLiteral | 3 | 19 | [SRC]skippedLines type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
DuplicateMapLiteral | 3 | 20 | [SRC]logs type: 'text', length: 8192 [MSG]Map [type:text, length:8192] is duplicated. |
FieldTypeRequired | 3 | 24 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
DuplicateMapLiteral | 3 | 27 | [SRC]status nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 28 | [SRC]startDate nullable: false [MSG]Map [nullable:false] is duplicated. |
DuplicateMapLiteral | 3 | 31 | [SRC]updatedIds nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 32 | [SRC]deletedIds nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 33 | [SRC]noUpdateIds nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 34 | [SRC]failedLines nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 35 | [SRC]skippedLines nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 36 | [SRC]logs nullable: true, blank: true [MSG]Map [nullable:true, blank:true] is duplicated. |
DuplicateMapLiteral | 3 | 37 | [SRC]finishDate nullable: true [MSG]Map [nullable:true] is duplicated. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 15 | [SRC]class ImportRecorder { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
DuplicateStringLiteral | 2 | 62 | [SRC]record.logs += lineFailedLog + "\n" [MSG]Duplicate String Literal: |
DuplicateStringLiteral | 2 | 69 | [SRC]record.skippedLines += CSVHelper.me().getCSVRecordConten..cord) + "\n" [MSG]Duplicate String Literal: |
DuplicateStringLiteral | 2 | 70 | [SRC]record.logs += lineSkipLog + "\n" [MSG]Duplicate String Literal: |
DuplicateStringLiteral | 2 | 103 | [SRC]record.failedLines += CSVHelper.me().getCSVRecordContent..cord) + "\n" [MSG]Duplicate String Literal: |
DuplicateStringLiteral | 2 | 118 | [SRC]record.updatedIds = updatedIds.join(",") [MSG]Duplicate String Literal: , |
DuplicateStringLiteral | 2 | 119 | [SRC]record.insertedIds = insertedIds.join(",") [MSG]Duplicate String Literal: , |
DuplicateStringLiteral | 2 | 120 | [SRC]record.deletedIds = deletedIds.join(",") [MSG]Duplicate String Literal: , |
DuplicateStringLiteral | 2 | 121 | [SRC]record.noUpdateIds = noUpdateIds.join(",") [MSG]Duplicate String Literal: , |
UnnecessaryGString | 3 | 51 | [SRC]String headerLine = headerNames.join(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 61 | [SRC]record.failedLines += CSVHelper.me().getCSVRecordContent..cord) + "\n" [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 62 | [SRC]record.logs += lineFailedLog + "\n" [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 69 | [SRC]record.skippedLines += CSVHelper.me().getCSVRecordConten..cord) + "\n" [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]record.logs += lineSkipLog + "\n" [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 77 | [SRC]def content = CSVHelper.me().getCSVRecordContent(csvRecord) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 77 | [SRC]def content = CSVHelper.me().getCSVRecordContent(csvRecord) [MSG]The type is not specified for variable "content" |
UnnecessaryGString | 3 | 103 | [SRC]record.failedLines += CSVHelper.me().getCSVRecordContent..cord) + "\n" [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 105 | [SRC]def msg = "Line ${csvRecord.getRecordNumber()} [${CSVHel..ssage()}]\n" [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 105 | [SRC]def msg = "Line ${csvRecord.getRecordNumber()} [${CSVHel..ssage()}]\n" [MSG]The type is not specified for variable "msg" |
UnnecessaryGetter | 3 | 105 | [SRC]def msg = "Line ${csvRecord.getRecordNumber()} [${CSVHel..ssage()}]\n" [MSG]getRecordNumber() can probably be rewritten as recordNumber |
UnnecessaryGetter | 3 | 105 | [SRC]def msg = "Line ${csvRecord.getRecordNumber()} [${CSVHel..ssage()}]\n" [MSG]getMessage() can probably be rewritten as message |
UnnecessaryGString | 3 | 118 | [SRC]record.updatedIds = updatedIds.join(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 119 | [SRC]record.insertedIds = insertedIds.join(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 120 | [SRC]record.deletedIds = deletedIds.join(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 121 | [SRC]record.noUpdateIds = noUpdateIds.join(",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class IdConverter implements Converter { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ClassForName | 2 | 21 | [SRC]def object = Class.forName(type).get(Long.parseLong(sourceValue)) [MSG]Violation in class tech.muyan.importexport.converter.IdConverter. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
UnusedImport | 3 | 3 | [SRC]import tech.muyan.importexport.CSVHelper [MSG]The [tech.muyan.importexport.CSVHelper] import is never referenced |
UnusedImport | 3 | 4 | [SRC]import tech.muyan.importexport.exception.MultiObjectMatchedException [MSG]The [tech.muyan.importexport.exception.MultiObjectMatchedException] import is never referenced |
UnnecessaryGString | 3 | 14 | [SRC]public static final String INTENTIONAL_NULL_VALUE = "NULL" [MSG]The String 'NULL' can be wrapped in single quotes instead of double quotes |
UnnecessaryElseStatement | 3 | 20 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary |
NoDef | 3 | 21 | [SRC]def object = Class.forName(type).get(Long.parseLong(sourceValue)) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 21 | [SRC]def object = Class.forName(type).get(Long.parseLong(sourceValue)) [MSG]The type is not specified for variable "object" |
UnnecessaryElseStatement | 3 | 24 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary |
UnnecessaryDotClass | 3 | 25 | [SRC]throw new NoObjectMatchedException(IdConverter.class, so..Value, type) [MSG]IdConverter.class can be rewritten as IdConverter |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 17 | [SRC]class ObjectConverter implements Converter { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ClassForName | 2 | 28 | [SRC]def relateObj = Class.forName(type).withCriteria { [MSG]Violation in class tech.muyan.importexport.converter.ObjectConverter. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...) |
UnnecessaryGString | 3 | 20 | [SRC]public static final String INTENTIONAL_NULL_VALUE = "NULL" [MSG]The String 'NULL' can be wrapped in single quotes instead of double quotes |
UnnecessaryElseStatement | 3 | 27 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary |
NoDef | 3 | 28 | [SRC]def relateObj = Class.forName(type).withCriteria { [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 28 | [SRC]def relateObj = Class.forName(type).withCriteria { [MSG]The type is not specified for variable "relateObj" |
UnnecessaryDotClass | 3 | 34 | [SRC]throw new MultiObjectMatchedException(ObjectConverter.cl..Value, type) [MSG]ObjectConverter.class can be rewritten as ObjectConverter |
UnnecessaryDotClass | 3 | 37 | [SRC]throw new NoObjectMatchedException(ObjectConverter.class..Value, type) [MSG]ObjectConverter.class can be rewritten as ObjectConverter |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 3 | [SRC]class AuthenticationToken { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainHasEquals | 2 | 3 | [SRC]class AuthenticationToken { [MSG]The domain class tech.muyan.security.AuthenticationToken should define an equals(Object) method |
GrailsDomainHasToString | 2 | 3 | [SRC]class AuthenticationToken { [MSG]The domain class tech.muyan.security.AuthenticationToken should define a toString() method |
GrailsDomainStringPropertyMaxSize | 2 | 4 | [SRC]String tokenValue [MSG]There is no constraint on the size of String property 'tokenValue' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 5 | [SRC]String username [MSG]There is no constraint on the size of String property 'username' which will result in applying database defaults |
FieldTypeRequired | 3 | 7 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 7 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.security.AuthenticationToken is declared after an instance field |
FieldTypeRequired | 3 | 11 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 11 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.AuthenticationToken is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]public class AuthorityHelper { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
UnnecessaryPublicModifier | 3 | 12 | [SRC]public class AuthorityHelper { [MSG]The public keyword is unnecessary for classes |
UnnecessaryReturnKeyword | 3 | 27 | [SRC]return false [MSG]The return keyword is not needed and can be removed |
NoDef | 3 | 31 | [SRC]def suffix = (wildcard)? "/**" : "" [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 31 | [SRC]def suffix = (wildcard)? "/**" : "" [MSG]The type is not specified for variable "suffix" |
UnnecessaryGString | 3 | 31 | [SRC]def suffix = (wildcard)? "/**" : "" [MSG]The String '/**' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]def suffix = (wildcard)? "/**" : "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 32 | [SRC]def map = RequestMap.findByUrlAndHttpMethod("/${clazz.ge.. httpMethod) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 32 | [SRC]def map = RequestMap.findByUrlAndHttpMethod("/${clazz.ge.. httpMethod) [MSG]The type is not specified for variable "map" |
UnnecessaryGetter | 3 | 32 | [SRC]def map = RequestMap.findByUrlAndHttpMethod("/${clazz.ge.. httpMethod) [MSG]getName() can probably be rewritten as name |
NoDef | 3 | 33 | [SRC]def isNullOrEmpty = (map == null || map.configAttribute == null) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 33 | [SRC]def isNullOrEmpty = (map == null || map.configAttribute == null) [MSG]The type is not specified for variable "isNullOrEmpty" |
NoDef | 3 | 34 | [SRC]def roles = isNullOrEmpty? "" : map.configAttribute [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 34 | [SRC]def roles = isNullOrEmpty? "" : map.configAttribute [MSG]The type is not specified for variable "roles" |
UnnecessaryGString | 3 | 34 | [SRC]def roles = isNullOrEmpty? "" : map.configAttribute [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 35 | [SRC]map = RequestMap.findByUrlAndHttpMethod("/${clazz.getSim.. httpMethod) [MSG]getSimpleName() can probably be rewritten as simpleName |
UnnecessaryGString | 3 | 38 | [SRC]roles += isNullOrEmpty? "" : map.configAttribute [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]roles += isNullOrEmpty? "" : "," + map.configAttribute [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]roles += isNullOrEmpty? "" : "," + map.configAttribute [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 42 | [SRC]return roles [MSG]The return keyword is not needed and can be removed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 8 | [SRC]class Group implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainStringPropertyMaxSize | 2 | 12 | [SRC]String name [MSG]There is no constraint on the size of String property 'name' which will result in applying database defaults |
ImplicitReturnStatement | 3 | 14 | [SRC]Set<Role> getAuthorities() { [MSG]The method getAuthorities in class tech.muyan.security.Group is missing an explicit return |
FieldTypeRequired | 3 | 18 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 18 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.Group is declared after an instance field |
FieldTypeRequired | 3 | 22 | [SRC]static labelField = 'name' [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 22 | [SRC]static labelField = 'name' [MSG]The static field labelField in class tech.muyan.security.Group is declared after an instance field |
FieldTypeRequired | 3 | 24 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 24 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.security.Group is declared after an instance field |
UnnecessaryGString | 3 | 25 | [SRC]table "application_group" [MSG]The String 'application_group' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 28 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 28 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.security.Group is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 9 | [SRC]class GroupRole implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 18 | [SRC]if (other == null || !(other instanceof GroupRole)) { [MSG]The instanceof operator is used in class tech.muyan.security.GroupRole |
FactoryMethodName | 2 | 51 | [SRC]static GroupRole create(Group group, Role role, boolean ..h = false) { [MSG]Violation in class GroupRole. The method 'create' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
ImplicitReturnStatement | 3 | 17 | [SRC]boolean equals(other) { [MSG]The method equals in class tech.muyan.security.GroupRole is missing an explicit return |
MethodParameterTypeRequired | 3 | 17 | [SRC]boolean equals(other) { [MSG]"other" parameter of "equals" method is dynamically typed |
NoDef | 3 | 17 | [SRC]boolean equals(other) { [MSG]def for method parameter type should not be used |
ImplicitReturnStatement | 3 | 25 | [SRC]int hashCode() { [MSG]The method hashCode in class tech.muyan.security.GroupRole is missing an explicit return |
ImplicitReturnStatement | 3 | 36 | [SRC]static GroupRole get(long groupId, long roleId) { [MSG]The method get in class tech.muyan.security.GroupRole is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 36 | [SRC]static GroupRole get(long groupId, long roleId) { [MSG]The public static method get in class tech.muyan.security.GroupRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 40 | [SRC]static boolean exists(long groupId, long roleId) { [MSG]The method exists in class tech.muyan.security.GroupRole is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 40 | [SRC]static boolean exists(long groupId, long roleId) { [MSG]The public static method exists in class tech.muyan.security.GroupRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 44 | [SRC]private static DetachedCriteria criteriaFor(long groupId..ng roleId) { [MSG]The method criteriaFor in class tech.muyan.security.GroupRole is missing an explicit return |
ImplicitReturnStatement | 3 | 51 | [SRC]static GroupRole create(Group group, Role role, boolean ..h = false) { [MSG]The method create in class tech.muyan.security.GroupRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 51 | [SRC]static GroupRole create(Group group, Role role, boolean ..h = false) { [MSG]The public method create in class tech.muyan.security.GroupRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 51 | [SRC]static GroupRole create(Group group, Role role, boolean ..h = false) { [MSG]The public static method create in class tech.muyan.security.GroupRole is declared after a public instance method |
NoDef | 3 | 52 | [SRC]def instance = new GroupRole(group: group, role: role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 52 | [SRC]def instance = new GroupRole(group: group, role: role) [MSG]The type is not specified for variable "instance" |
ImplicitReturnStatement | 3 | 57 | [SRC]static boolean remove(Group rg, Role r) { [MSG]The method remove in class tech.muyan.security.GroupRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 57 | [SRC]static boolean remove(Group rg, Role r) { [MSG]The public method remove in class tech.muyan.security.GroupRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 57 | [SRC]static boolean remove(Group rg, Role r) { [MSG]The public static method remove in class tech.muyan.security.GroupRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 64 | [SRC]static int removeAll(Role r) { [MSG]The method removeAll in class tech.muyan.security.GroupRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 64 | [SRC]static int removeAll(Role r) { [MSG]The public method removeAll in class tech.muyan.security.GroupRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 64 | [SRC]static int removeAll(Role r) { [MSG]The public static method removeAll in class tech.muyan.security.GroupRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 68 | [SRC]static int removeAll(Group rg) { [MSG]The method removeAll in class tech.muyan.security.GroupRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 68 | [SRC]static int removeAll(Group rg) { [MSG]The public method removeAll in class tech.muyan.security.GroupRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 68 | [SRC]static int removeAll(Group rg) { [MSG]The public static method removeAll in class tech.muyan.security.GroupRole is declared after a public instance method |
FieldTypeRequired | 3 | 72 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 72 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.GroupRole is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
DuplicateStringLiteral | 2 | 12 | [SRC]@ToString(includes = ['configAttribute', 'httpMethod', '..age = false) [MSG]Duplicate String Literal: configAttribute |
DuplicateStringLiteral | 2 | 12 | [SRC]@ToString(includes = ['configAttribute', 'httpMethod', '..age = false) [MSG]Duplicate String Literal: httpMethod |
DuplicateStringLiteral | 2 | 12 | [SRC]@ToString(includes = ['configAttribute', 'httpMethod', '..age = false) [MSG]Duplicate String Literal: url |
CompileStatic | 2 | 13 | [SRC]class RequestMap implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainWithServiceReference | 2 | 17 | [SRC]SpringSecurityService springSecurityService [MSG]Violation in class tech.muyan.security.RequestMap. Domain class RequestMap should not reference services (offending field: springSecurityService) |
GrailsDomainStringPropertyMaxSize | 2 | 21 | [SRC]@BindUsing({ val, source -> [MSG]There is no constraint on the size of String property 'configAttribute' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 22 | [SRC]def value = source['configAttribute'] [MSG]Duplicate String Literal: configAttribute |
Instanceof | 2 | 23 | [SRC]if (value instanceof JSONArray || value instanceof ArrayList) { [MSG]The instanceof operator is used in class tech.muyan.security.RequestMap |
Instanceof | 2 | 23 | [SRC]if (value instanceof JSONArray || value instanceof ArrayList) { [MSG]The instanceof operator is used in class tech.muyan.security.RequestMap |
GrailsDomainStringPropertyMaxSize | 2 | 47 | [SRC]String url [MSG]There is no constraint on the size of String property 'url' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 51 | [SRC]result["url"] = url [MSG]Duplicate String Literal: url |
DuplicateStringLiteral | 2 | 52 | [SRC]result["httpMethod"] = httpMethod [MSG]Duplicate String Literal: httpMethod |
DuplicateStringLiteral | 2 | 54 | [SRC]for (roleName in configAttribute.split(",")) { [MSG]Duplicate String Literal: , |
DuplicateStringLiteral | 2 | 57 | [SRC]result["configAttribute"] = ids [MSG]Duplicate String Literal: configAttribute |
DuplicateStringLiteral | 2 | 64 | [SRC]httpMethod nullable: true, unique: 'url' [MSG]Duplicate String Literal: url |
DuplicateStringLiteral | 2 | 65 | [SRC]url nullable: false, blank: false, unique: 'httpMethod' [MSG]Duplicate String Literal: httpMethod |
FieldTypeRequired | 3 | 15 | [SRC]static transients = ['springSecurityService'] [MSG]The type is not specified for field "transients" |
StaticFieldsBeforeInstanceFields | 3 | 19 | [SRC]private static final long serialVersionUID = 1 [MSG]The static field serialVersionUID in class tech.muyan.security.RequestMap is declared after an instance field |
NoDef | 3 | 22 | [SRC]def value = source['configAttribute'] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def value = source['configAttribute'] [MSG]The type is not specified for variable "value" |
NoDef | 3 | 24 | [SRC]def roleIds = value as List [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 24 | [SRC]def roleIds = value as List [MSG]The type is not specified for variable "roleIds" |
UnnecessaryGString | 3 | 25 | [SRC]String roleNames = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 27 | [SRC]def longIds = [] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def longIds = [] [MSG]The type is not specified for variable "longIds" |
ImplicitClosureParameter | 3 | 35 | [SRC]if (it != null && it.authority != null) { [MSG]By convention closure parameters should be specified explicitly. |
ImplicitClosureParameter | 3 | 35 | [SRC]if (it != null && it.authority != null) { [MSG]By convention closure parameters should be specified explicitly. |
ImplicitClosureParameter | 3 | 36 | [SRC]roleNames += (it.authority + ",") [MSG]By convention closure parameters should be specified explicitly. |
UnnecessaryGString | 3 | 36 | [SRC]roleNames += (it.authority + ",") [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessarySubstring | 3 | 40 | [SRC]return roleNames.substring(0, roleNames.length() - 1) [MSG]Violation in class tech.muyan.security.RequestMap. The String.substring(int, int) method can be replaced with the subscript operator |
UnnecessaryElseStatement | 3 | 41 | [SRC]} else { [MSG]When an if statement block ends with a return statement the else is unnecessary |
MethodReturnTypeRequired | 3 | 49 | [SRC]def render() { [MSG]Method "render" has a dynamic return type |
NoDef | 3 | 49 | [SRC]def render() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 51 | [SRC]result["url"] = url [MSG]The String 'url' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]result["httpMethod"] = httpMethod [MSG]The String 'httpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]for (roleName in configAttribute.split(",")) { [MSG]The String ',' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 57 | [SRC]result["configAttribute"] = ids [MSG]The String 'configAttribute' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 58 | [SRC]result["id"] = id [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 59 | [SRC]return result [MSG]The return keyword is not needed and can be removed |
FieldTypeRequired | 3 | 62 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 62 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.RequestMap is declared after an instance field |
FieldTypeRequired | 3 | 68 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 68 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.security.RequestMap is declared after an instance field |
MethodReturnTypeRequired | 3 | 72 | [SRC]def afterInsert() { [MSG]Method "afterInsert" has a dynamic return type |
NoDef | 3 | 72 | [SRC]def afterInsert() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 76 | [SRC]def afterUpdate() { [MSG]Method "afterUpdate" has a dynamic return type |
NoDef | 3 | 76 | [SRC]def afterUpdate() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 80 | [SRC]def afterDelete() { [MSG]Method "afterDelete" has a dynamic return type |
NoDef | 3 | 80 | [SRC]def afterDelete() { [MSG]def for method return type should not be used |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 8 | [SRC]class Role implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainStringPropertyMaxSize | 2 | 12 | [SRC]String authority [MSG]There is no constraint on the size of String property 'authority' which will result in applying database defaults |
FieldTypeRequired | 3 | 14 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 14 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.Role is declared after an instance field |
FieldTypeRequired | 3 | 18 | [SRC]static labelField = 'authority' [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 18 | [SRC]static labelField = 'authority' [MSG]The static field labelField in class tech.muyan.security.Role is declared after an instance field |
FieldTypeRequired | 3 | 27 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 27 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.security.Role is declared after an instance field |
UnnecessaryGString | 3 | 29 | [SRC]only = ["authority"] [MSG]The String 'authority' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 32 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 32 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.security.Role is declared after an instance field |
UnnecessaryGString | 3 | 33 | [SRC]table "application_role" [MSG]The String 'application_role' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 8 | [SRC]class RoleHierarchyEntry implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainStringPropertyMaxSize | 2 | 12 | [SRC]String entry [MSG]There is no constraint on the size of String property 'entry' which will result in applying database defaults |
FieldTypeRequired | 3 | 14 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 14 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.RoleHierarchyEntry is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class User implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
GrailsDomainStringPropertyMaxSize | 2 | 13 | [SRC]String username [MSG]There is no constraint on the size of String property 'username' which will result in applying database defaults |
GrailsDomainStringPropertyMaxSize | 2 | 14 | [SRC]String password [MSG]There is no constraint on the size of String property 'password' which will result in applying database defaults |
DuplicateStringLiteral | 2 | 65 | [SRC]result['username'] = username [MSG]Duplicate String Literal: username |
ImplicitReturnStatement | 3 | 21 | [SRC]Set<Group> getAuthorities() { [MSG]The method getAuthorities in class tech.muyan.security.User is missing an explicit return |
FieldTypeRequired | 3 | 31 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 31 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.User is declared after an instance field |
FieldTypeRequired | 3 | 36 | [SRC]static mapping = { [MSG]The type is not specified for field "mapping" |
StaticFieldsBeforeInstanceFields | 3 | 36 | [SRC]static mapping = { [MSG]The static field mapping in class tech.muyan.security.User is declared after an instance field |
UnnecessaryGString | 3 | 38 | [SRC]table "application_user" [MSG]The String 'application_user' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 41 | [SRC]static searchable = { [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 41 | [SRC]static searchable = { [MSG]The static field searchable in class tech.muyan.security.User is declared after an instance field |
MethodReturnTypeRequired | 3 | 46 | [SRC]def beforeInsert() { [MSG]Method "beforeInsert" has a dynamic return type |
NoDef | 3 | 46 | [SRC]def beforeInsert() { [MSG]def for method return type should not be used |
NoDef | 3 | 47 | [SRC]def group = Group.findByName(UserGroup.USER_DEFAULT_GROUP) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 47 | [SRC]def group = Group.findByName(UserGroup.USER_DEFAULT_GROUP) [MSG]The type is not specified for variable "group" |
MethodReturnTypeRequired | 3 | 57 | [SRC]def render() { [MSG]Method "render" has a dynamic return type |
NoDef | 3 | 57 | [SRC]def render() { [MSG]def for method return type should not be used |
NoDef | 3 | 58 | [SRC]def result = [:] [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 58 | [SRC]def result = [:] [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 66 | [SRC]result['password'] = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
FieldTypeRequired | 3 | 70 | [SRC]static hasMany = [groups: UserGroup] [MSG]The type is not specified for field "hasMany" |
StaticFieldsBeforeInstanceFields | 3 | 70 | [SRC]static hasMany = [groups: UserGroup] [MSG]The static field hasMany in class tech.muyan.security.User is declared after an instance field |
FieldTypeRequired | 3 | 72 | [SRC]static belongsTo = Organization [MSG]The type is not specified for field "belongsTo" |
StaticFieldsBeforeInstanceFields | 3 | 72 | [SRC]static belongsTo = Organization [MSG]The static field belongsTo in class tech.muyan.security.User is declared after an instance field |
FieldTypeRequired | 3 | 74 | [SRC]static labelField = "username" [MSG]The type is not specified for field "labelField" |
StaticFieldsBeforeInstanceFields | 3 | 74 | [SRC]static labelField = "username" [MSG]The static field labelField in class tech.muyan.security.User is declared after an instance field |
UnnecessaryGString | 3 | 74 | [SRC]static labelField = "username" [MSG]The String 'username' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class UserGroup implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 20 | [SRC]if (other == null || !(other instanceof UserGroup)) { [MSG]The instanceof operator is used in class tech.muyan.security.UserGroup |
FactoryMethodName | 2 | 53 | [SRC]static UserGroup create(User user, Group group, boolean ..h = false) { [MSG]Violation in class UserGroup. The method 'create' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
UnnecessaryGString | 3 | 13 | [SRC]public static final String USER_DEFAULT_GROUP = "USER" [MSG]The String 'USER' can be wrapped in single quotes instead of double quotes |
ImplicitReturnStatement | 3 | 19 | [SRC]boolean equals(other) { [MSG]The method equals in class tech.muyan.security.UserGroup is missing an explicit return |
MethodParameterTypeRequired | 3 | 19 | [SRC]boolean equals(other) { [MSG]"other" parameter of "equals" method is dynamically typed |
NoDef | 3 | 19 | [SRC]boolean equals(other) { [MSG]def for method parameter type should not be used |
ImplicitReturnStatement | 3 | 27 | [SRC]int hashCode() { [MSG]The method hashCode in class tech.muyan.security.UserGroup is missing an explicit return |
ImplicitReturnStatement | 3 | 38 | [SRC]static UserGroup get(long userId, long groupId) { [MSG]The method get in class tech.muyan.security.UserGroup is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 38 | [SRC]static UserGroup get(long userId, long groupId) { [MSG]The public static method get in class tech.muyan.security.UserGroup is declared after a public instance method |
ImplicitReturnStatement | 3 | 42 | [SRC]static boolean exists(long userId, long groupId) { [MSG]The method exists in class tech.muyan.security.UserGroup is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 42 | [SRC]static boolean exists(long userId, long groupId) { [MSG]The public static method exists in class tech.muyan.security.UserGroup is declared after a public instance method |
ImplicitReturnStatement | 3 | 46 | [SRC]private static DetachedCriteria criteriaFor(long userId,..g groupId) { [MSG]The method criteriaFor in class tech.muyan.security.UserGroup is missing an explicit return |
ImplicitReturnStatement | 3 | 53 | [SRC]static UserGroup create(User user, Group group, boolean ..h = false) { [MSG]The method create in class tech.muyan.security.UserGroup is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 53 | [SRC]static UserGroup create(User user, Group group, boolean ..h = false) { [MSG]The public method create in class tech.muyan.security.UserGroup is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 53 | [SRC]static UserGroup create(User user, Group group, boolean ..h = false) { [MSG]The public static method create in class tech.muyan.security.UserGroup is declared after a public instance method |
NoDef | 3 | 54 | [SRC]def instance = new UserGroup(user: user, group: group) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 54 | [SRC]def instance = new UserGroup(user: user, group: group) [MSG]The type is not specified for variable "instance" |
ImplicitReturnStatement | 3 | 59 | [SRC]static boolean remove(User u, Group rg) { [MSG]The method remove in class tech.muyan.security.UserGroup is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 59 | [SRC]static boolean remove(User u, Group rg) { [MSG]The public method remove in class tech.muyan.security.UserGroup is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 59 | [SRC]static boolean remove(User u, Group rg) { [MSG]The public static method remove in class tech.muyan.security.UserGroup is declared after a public instance method |
ImplicitReturnStatement | 3 | 66 | [SRC]static int removeAll(User u) { [MSG]The method removeAll in class tech.muyan.security.UserGroup is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 66 | [SRC]static int removeAll(User u) { [MSG]The public method removeAll in class tech.muyan.security.UserGroup is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 66 | [SRC]static int removeAll(User u) { [MSG]The public static method removeAll in class tech.muyan.security.UserGroup is declared after a public instance method |
ImplicitReturnStatement | 3 | 70 | [SRC]static int removeAll(Group rg) { [MSG]The method removeAll in class tech.muyan.security.UserGroup is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 70 | [SRC]static int removeAll(Group rg) { [MSG]The public method removeAll in class tech.muyan.security.UserGroup is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 70 | [SRC]static int removeAll(Group rg) { [MSG]The public static method removeAll in class tech.muyan.security.UserGroup is declared after a public instance method |
FieldTypeRequired | 3 | 74 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 74 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.UserGroup is declared after an instance field |
FieldTypeRequired | 3 | 87 | [SRC]static searchable = false [MSG]The type is not specified for field "searchable" |
StaticFieldsBeforeInstanceFields | 3 | 87 | [SRC]static searchable = false [MSG]The static field searchable in class tech.muyan.security.UserGroup is declared after an instance field |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
Instanceof | 2 | 28 | [SRC]if (event.entityObject instanceof User) { [MSG]The instanceof operator is used in class tech.muyan.security.UserPasswordEncoderListener |
Instanceof | 2 | 30 | [SRC]if (u.password && ((event instanceof PreInsertEvent) ||..sword')))) { [MSG]The instanceof operator is used in class tech.muyan.security.UserPasswordEncoderListener |
Instanceof | 2 | 30 | [SRC]if (u.password && ((event instanceof PreInsertEvent) ||..sword')))) { [MSG]The instanceof operator is used in class tech.muyan.security.UserPasswordEncoderListener |
DuplicateStringLiteral | 2 | 31 | [SRC]event.getEntityAccess().setProperty('password', encodePa..u.password)) [MSG]Duplicate String Literal: password |
UnnecessaryGetter | 3 | 31 | [SRC]event.getEntityAccess().setProperty('password', encodePa..u.password)) [MSG]getEntityAccess() can probably be rewritten as entityAccess |
ImplicitReturnStatement | 3 | 36 | [SRC]private String encodePassword(String password) { [MSG]The method encodePassword in class tech.muyan.security.UserPasswordEncoderListener is missing an explicit return |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 9 | [SRC]class UserRole implements Serializable { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Instanceof | 2 | 18 | [SRC]if (other != null && other instanceof UserRole) { [MSG]The instanceof operator is used in class tech.muyan.security.UserRole |
FactoryMethodName | 2 | 52 | [SRC]static UserRole create(User user, Role role, boolean flush = false) { [MSG]Violation in class UserRole. The method 'create' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
MethodParameterTypeRequired | 3 | 17 | [SRC]boolean equals(other) { [MSG]"other" parameter of "equals" method is dynamically typed |
NoDef | 3 | 17 | [SRC]boolean equals(other) { [MSG]def for method parameter type should not be used |
UnnecessaryNullCheckBeforeInstanceOf | 3 | 18 | [SRC]if (other != null && other instanceof UserRole) { [MSG]The condition ((other != null) && (other instanceof UserRole)) can be safely simplified to (other instanceof UserRole) |
ImplicitReturnStatement | 3 | 26 | [SRC]int hashCode() { [MSG]The method hashCode in class tech.muyan.security.UserRole is missing an explicit return |
ImplicitReturnStatement | 3 | 37 | [SRC]static UserRole get(long userId, long roleId) { [MSG]The method get in class tech.muyan.security.UserRole is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 37 | [SRC]static UserRole get(long userId, long roleId) { [MSG]The public static method get in class tech.muyan.security.UserRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 41 | [SRC]static boolean exists(long userId, long roleId) { [MSG]The method exists in class tech.muyan.security.UserRole is missing an explicit return |
StaticMethodsBeforeInstanceMethods | 3 | 41 | [SRC]static boolean exists(long userId, long roleId) { [MSG]The public static method exists in class tech.muyan.security.UserRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 45 | [SRC]private static DetachedCriteria criteriaFor(long userId,..ng roleId) { [MSG]The method criteriaFor in class tech.muyan.security.UserRole is missing an explicit return |
ImplicitReturnStatement | 3 | 52 | [SRC]static UserRole create(User user, Role role, boolean flush = false) { [MSG]The method create in class tech.muyan.security.UserRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 52 | [SRC]static UserRole create(User user, Role role, boolean flush = false) { [MSG]The public method create in class tech.muyan.security.UserRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 52 | [SRC]static UserRole create(User user, Role role, boolean flush = false) { [MSG]The public static method create in class tech.muyan.security.UserRole is declared after a public instance method |
NoDef | 3 | 53 | [SRC]def instance = new UserRole(user: user, role: role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 53 | [SRC]def instance = new UserRole(user: user, role: role) [MSG]The type is not specified for variable "instance" |
ImplicitReturnStatement | 3 | 58 | [SRC]static boolean remove(User u, Role r) { [MSG]The method remove in class tech.muyan.security.UserRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 58 | [SRC]static boolean remove(User u, Role r) { [MSG]The public method remove in class tech.muyan.security.UserRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 58 | [SRC]static boolean remove(User u, Role r) { [MSG]The public static method remove in class tech.muyan.security.UserRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 65 | [SRC]static int removeAll(User u) { [MSG]The method removeAll in class tech.muyan.security.UserRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 65 | [SRC]static int removeAll(User u) { [MSG]The public method removeAll in class tech.muyan.security.UserRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 65 | [SRC]static int removeAll(User u) { [MSG]The public static method removeAll in class tech.muyan.security.UserRole is declared after a public instance method |
ImplicitReturnStatement | 3 | 69 | [SRC]static int removeAll(Role r) { [MSG]The method removeAll in class tech.muyan.security.UserRole is missing an explicit return |
PublicMethodsBeforeNonPublicMethods | 3 | 69 | [SRC]static int removeAll(Role r) { [MSG]The public method removeAll in class tech.muyan.security.UserRole is declared after a non-public method |
StaticMethodsBeforeInstanceMethods | 3 | 69 | [SRC]static int removeAll(Role r) { [MSG]The public static method removeAll in class tech.muyan.security.UserRole is declared after a public instance method |
FieldTypeRequired | 3 | 73 | [SRC]static constraints = { [MSG]The type is not specified for field "constraints" |
StaticFieldsBeforeInstanceFields | 3 | 73 | [SRC]static constraints = { [MSG]The static field constraints in class tech.muyan.security.UserRole is declared after an instance field |