Package | Total Files | Files with Violations | Priority 1 | Priority 2 | Priority 3 |
---|---|---|---|---|---|
All Packages | 32 | 32 | - | 172 | 1196 |
tech/muyan | 7 | 7 | - | 27 | 77 |
tech/muyan/config | 1 | 1 | - | 2 | 15 |
tech/muyan/customise | 1 | 1 | - | 5 | 7 |
tech/muyan/dynamic/field | 3 | 3 | - | 22 | 51 |
tech/muyan/dynamic/form | 1 | 1 | - | 4 | 18 |
tech/muyan/helper | 7 | 7 | - | 32 | 278 |
tech/muyan/importexport | 2 | 2 | - | 22 | 285 |
tech/muyan/importexport/converter | 2 | 2 | - | 8 | 150 |
tech/muyan/security | 8 | 8 | - | 50 | 315 |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class ActionMetaControllerTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 13 | [SRC]def "test checkAuthority"() { [MSG]Violation in class ActionMetaControllerTest. The method name test checkAuthority in class tech.muyan.ActionMetaControllerTest does not match [a-z]\w* |
MethodName | 2 | 50 | [SRC]def "test buildErrorMsg"() { [MSG]Violation in class ActionMetaControllerTest. The method name test buildErrorMsg in class tech.muyan.ActionMetaControllerTest does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 13 | [SRC]def "test checkAuthority"() { [MSG]Method "test checkAuthority" has a dynamic return type |
UnnecessaryDotClass | 3 | 16 | [SRC]Authentication auth = Mock(Authentication.class) [MSG]Authentication.class can be rewritten as Authentication |
UnnecessaryDotClass | 3 | 20 | [SRC]GrantedAuthority authority = Mock(GrantedAuthority.class) [MSG]GrantedAuthority.class can be rewritten as GrantedAuthority |
ImplicitClosureParameter | 3 | 21 | [SRC]authority.authority >> it [MSG]By convention closure parameters should be specified explicitly. |
UnnecessaryBooleanExpression | 3 | 36 | [SRC]'' | ['user'] || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 37 | [SRC]'' | [''] || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 38 | [SRC]'biz_user' | ['user', 'admin'] || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 39 | [SRC]'biz_user' | ['biz_user'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 40 | [SRC]'biz_user' | ['biz_user', 'admin'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 41 | [SRC]'biz_user' | ['developer', 'biz_user', 'admin'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 42 | [SRC]'biz_user' | ['developer', 'biz_user'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 43 | [SRC]'biz_user,user' | ['biz_user'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 44 | [SRC]'biz_user,user' | ['biz_user', 'admin'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 45 | [SRC]'biz_user,user' | ['developer', 'biz_user', 'admin'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 46 | [SRC]'biz_user,user' | ['developer', 'biz_user'] || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 47 | [SRC]'user,biz_user' | ['user', 'admin'] || true [MSG]The expression using || is compared to a constant |
MethodReturnTypeRequired | 3 | 50 | [SRC]def "test buildErrorMsg"() { [MSG]Method "test buildErrorMsg" has a dynamic return type |
VariableTypeRequired | 3 | 53 | [SRC]def r = ActionMetaController.buildErrorMsg( [MSG]The type is not specified for variable "r" |
UnnecessaryGString | 3 | 70 | [SRC]assert (r['createErrorMsg'] as String).replace(" ", "") ..ace(" ", "") [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]assert (r['createErrorMsg'] as String).replace(" ", "") ..ace(" ", "") [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]assert (r['createErrorMsg'] as String).replace(" ", "") ..ace(" ", "") [MSG]The String ' ' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]assert (r['createErrorMsg'] as String).replace(" ", "") ..ace(" ", "") [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"user" | "create" | "GET" | "/domainObject" | new .. | "me" [MSG]The String 'user' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"user" | "create" | "GET" | "/domainObject" | new .. | "me" [MSG]The String 'create' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"user" | "create" | "GET" | "/domainObject" | new .. | "me" [MSG]The String 'GET' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"user" | "create" | "GET" | "/domainObject" | new .. | "me" [MSG]The String '/domainObject' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"user" | "create" | "GET" | "/domainObject" | new .. | "me" [MSG]The String 'me' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class ContractLineSpec extends Specification implements ..tractLine> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 8 | [SRC]void "test contract line should belongs to a contract"() { [MSG]Violation in class ContractLineSpec. The method name test contract line should belongs to a contract in class tech.muyan.ContractLineSpec does not match [a-z]\w* |
NoDef | 3 | 10 | [SRC]def cl = new ContractLine( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 10 | [SRC]def cl = new ContractLine( [MSG]The type is not specified for variable "cl" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 8 | [SRC]class ContractLineTypeSpec extends Specification impleme..tLineType> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 17 | [SRC]def cleanup() { [MSG]Violation in class ContractLineTypeSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 20 | [SRC]void "test contract line type can be saved"() { [MSG]Violation in class ContractLineTypeSpec. The method name test contract line type can be saved in class tech.muyan.ContractLineTypeSpec does not match [a-z]\w* |
MethodName | 2 | 34 | [SRC]void "contract line type name should be unique"() { [MSG]Violation in class ContractLineTypeSpec. The method name contract line type name should be unique in class tech.muyan.ContractLineTypeSpec does not match [a-z]\w* |
MethodName | 2 | 66 | [SRC]void "test contract line type name should not be null"() { [MSG]Violation in class ContractLineTypeSpec. The method name test contract line type name should not be null in class tech.muyan.ContractLineTypeSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 13 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 13 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 17 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 17 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
NoDef | 3 | 22 | [SRC]def clt = new ContractLineType(name: "price_line", label..Price Line") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def clt = new ContractLineType(name: "price_line", label..Price Line") [MSG]The type is not specified for variable "clt" |
UnnecessaryGString | 3 | 22 | [SRC]def clt = new ContractLineType(name: "price_line", label..Price Line") [MSG]The String 'price_line' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 22 | [SRC]def clt = new ContractLineType(name: "price_line", label..Price Line") [MSG]The String 'Price Line' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 36 | [SRC]def c1 = new ContractLineType(name: "c1", label: "title1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 36 | [SRC]def c1 = new ContractLineType(name: "c1", label: "title1") [MSG]The type is not specified for variable "c1" |
UnnecessaryGString | 3 | 36 | [SRC]def c1 = new ContractLineType(name: "c1", label: "title1") [MSG]The String 'c1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]def c1 = new ContractLineType(name: "c1", label: "title1") [MSG]The String 'title1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 48 | [SRC]def c2 = new ContractLineType(name: 'c1', label: "title2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 48 | [SRC]def c2 = new ContractLineType(name: 'c1', label: "title2") [MSG]The type is not specified for variable "c2" |
UnnecessaryGString | 3 | 48 | [SRC]def c2 = new ContractLineType(name: 'c1', label: "title2") [MSG]The String 'title2' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class ContractSpec extends Specification implements Doma..<Contract> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 20 | [SRC]def cleanup() { [MSG]Violation in class ContractSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 23 | [SRC]void "test domain name should not be blank"() { [MSG]Violation in class ContractSpec. The method name test domain name should not be blank in class tech.muyan.ContractSpec does not match [a-z]\w* |
MethodName | 2 | 32 | [SRC]void "test domain name should not be null"() { [MSG]Violation in class ContractSpec. The method name test domain name should not be null in class tech.muyan.ContractSpec does not match [a-z]\w* |
MethodName | 2 | 42 | [SRC]void "name should be unique"() { [MSG]Violation in class ContractSpec. The method name name should be unique in class tech.muyan.ContractSpec does not match [a-z]\w* |
MethodName | 2 | 74 | [SRC]void "test owner organization should not be null"() { [MSG]Violation in class ContractSpec. The method name test owner organization should not be null in class tech.muyan.ContractSpec does not match [a-z]\w* |
UnusedImport | 3 | 5 | [SRC]import spock.lang.Unroll [MSG]The [spock.lang.Unroll] import is never referenced |
UnusedImport | 3 | 7 | [SRC]import spock.lang.Ignore [MSG]The [spock.lang.Ignore] import is never referenced |
MethodReturnTypeRequired | 3 | 16 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 20 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 25 | [SRC]domain.name = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 44 | [SRC]def c1 = new Contract(name: "c1", title: "title1", reivi..tatus.DRAFT) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 44 | [SRC]def c1 = new Contract(name: "c1", title: "title1", reivi..tatus.DRAFT) [MSG]The type is not specified for variable "c1" |
UnnecessaryGString | 3 | 44 | [SRC]def c1 = new Contract(name: "c1", title: "title1", reivi..tatus.DRAFT) [MSG]The String 'c1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 44 | [SRC]def c1 = new Contract(name: "c1", title: "title1", reivi..tatus.DRAFT) [MSG]The String 'title1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 44 | [SRC]def c1 = new Contract(name: "c1", title: "title1", reivi..tatus.DRAFT) [MSG]The String 'org1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 56 | [SRC]def c2 = new Contract(name: 'c1', title: "title2", revis..tatus.DRAFT) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 56 | [SRC]def c2 = new Contract(name: 'c1', title: "title2", revis..tatus.DRAFT) [MSG]The type is not specified for variable "c2" |
UnnecessaryGString | 3 | 56 | [SRC]def c2 = new Contract(name: 'c1', title: "title2", revis..tatus.DRAFT) [MSG]The String 'title2' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]class DomainClassSpec extends Specification implements D..mainClass> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 16 | [SRC]def cleanup() { [MSG]Violation in class DomainClassSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 19 | [SRC]void "test fullName should not be null"() { [MSG]Violation in class DomainClassSpec. The method name test fullName should not be null in class tech.muyan.DomainClassSpec does not match [a-z]\w* |
MethodName | 2 | 30 | [SRC]void "test shortName should not be null"() { [MSG]Violation in class DomainClassSpec. The method name test shortName should not be null in class tech.muyan.DomainClassSpec does not match [a-z]\w* |
MethodName | 2 | 41 | [SRC]void "test label should not be null"() { [MSG]Violation in class DomainClassSpec. The method name test label should not be null in class tech.muyan.DomainClassSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 12 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 12 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 16 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 23 | [SRC]then: "fullName property is not valid" [MSG]The String 'fullName property is not valid' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 26 | [SRC]and: "valid error is nullable" [MSG]The String 'valid error is nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]then: "shortName property is not valid" [MSG]The String 'shortName property is not valid' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]and: "valid error is nullable" [MSG]The String 'valid error is nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 45 | [SRC]then: "label property is not valid" [MSG]The String 'label property is not valid' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]and: "valid error is nullable" [MSG]The String 'valid error is nullable' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class OrganizationSpec extends Specification implements ..anization> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 21 | [SRC]void "test name can not be blank"() { [MSG]Violation in class OrganizationSpec. The method name test name can not be blank in class tech.muyan.OrganizationSpec does not match [a-z]\w* |
MethodName | 2 | 30 | [SRC]void "test name can not be null"() { [MSG]Violation in class OrganizationSpec. The method name test name can not be null in class tech.muyan.OrganizationSpec does not match [a-z]\w* |
MethodName | 2 | 39 | [SRC]void "test parent organization can be empty"() { [MSG]Violation in class OrganizationSpec. The method name test parent organization can be empty in class tech.muyan.OrganizationSpec does not match [a-z]\w* |
MethodName | 2 | 47 | [SRC]void "test name should be unique"() { [MSG]Violation in class OrganizationSpec. The method name test name should be unique in class tech.muyan.OrganizationSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 17 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 17 | [SRC]def setup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 23 | [SRC]domain.name = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 49 | [SRC]def org1 = new Organization(name: "org1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 49 | [SRC]def org1 = new Organization(name: "org1") [MSG]The type is not specified for variable "org1" |
UnnecessaryGString | 3 | 49 | [SRC]def org1 = new Organization(name: "org1") [MSG]The String 'org1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 61 | [SRC]def org2 = new Organization(name: 'org1') [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 61 | [SRC]def org2 = new Organization(name: 'org1') [MSG]The type is not specified for variable "org2" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]class WithProperty extends WithDynamicFields { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 20 | [SRC]class DynamicFieldTypeToComponentMappingTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 21 | [SRC]def "test DynamicFieldTypeToComponentMappingTest initMapping"() { [MSG]Violation in class DynamicFieldTypeToComponentMappingTest. The method name test DynamicFieldTypeToComponentMappingTest initMapping in class tech.muyan.config.DynamicFieldTypeToComponentMappingTest does not match [a-z]\w* |
MisorderedStaticImports | 3 | 7 | [SRC]import static tech.muyan.enums.DisplayComponentType.ABSTRACT_DATE [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 8 | [SRC]import static tech.muyan.enums.DisplayComponentType.FLOA..ION_OR_INPUT [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 9 | [SRC]import static tech.muyan.enums.DisplayComponentType.INTE..LE_SELECTION [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 10 | [SRC]import static tech.muyan.enums.DisplayComponentType.MULT.._FILE_UPLOAD [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 11 | [SRC]import static tech.muyan.enums.DisplayComponentType.OBJE..LE_SELECTION [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 12 | [SRC]import static tech.muyan.enums.DisplayComponentType.RELATIVE_DATE_TIME [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 13 | [SRC]import static tech.muyan.enums.DisplayComponentType.SING..IMAGE_UPLOAD [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 14 | [SRC]import static tech.muyan.enums.DisplayComponentType.TEXT_AREA [MSG]Static imports should appear before normal imports |
MethodReturnTypeRequired | 3 | 21 | [SRC]def "test DynamicFieldTypeToComponentMappingTest initMapping"() { [MSG]Method "test DynamicFieldTypeToComponentMappingTest initMapping" has a dynamic return type |
VariableTypeRequired | 3 | 24 | [SRC]def mapping = DynamicFieldTypeToComponentMapping.FieldTy..onentMapping [MSG]The type is not specified for variable "mapping" |
VariableTypeRequired | 3 | 30 | [SRC]def elements = mapping.get(fieldType) [MSG]The type is not specified for variable "elements" |
UnnecessaryObjectReferences | 3 | 44 | [SRC]DynamicFieldDataType.STRING || 8 | TEXT_AREA [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 3 | 45 | [SRC]DynamicFieldDataType.OBJECT || 2 | OBJECT_MULTIPLE_SELECTION [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 3 | 46 | [SRC]DynamicFieldDataType.IMAGE || 2 | SINGLE_IMAGE_UPLOAD [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryObjectReferences | 3 | 47 | [SRC]DynamicFieldDataType.FILE || 2 | MULTIPLE_FILE_UPLOAD [MSG]The code could be more concise by using a with() or identity() block |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 9 | [SRC]class EngineTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 10 | [SRC]void "test customise engine"() { [MSG]Violation in class EngineTest. The method name test customise engine in class tech.muyan.customise.EngineTest does not match [a-z]\w* |
UnnecessaryCast | 2 | 22 | [SRC][:] as Map<String, Object> | "println('hello')" || null [MSG]The cast (Map <String, Object>) [:] in class tech.muyan.customise.EngineTest is unnecessary |
UnnecessaryCast | 2 | 23 | [SRC][:] as Map<String, Object> | '["r": "hello"]'..r': 'hello'] [MSG]The cast (Map <String, Object>) [:] in class tech.muyan.customise.EngineTest is unnecessary |
UnnecessaryCast | 2 | 24 | [SRC]["r": "hello"] as Map<String, Object> | '["r": r]' ..r': 'hello'] [MSG]The cast (Map <String, Object>) [r:hello] in class tech.muyan.customise.EngineTest is unnecessary |
NoDef | 3 | 14 | [SRC]def result = Engine.run(parameters, code, this.class.classLoader) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 14 | [SRC]def result = Engine.run(parameters, code, this.class.classLoader) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 22 | [SRC][:] as Map<String, Object> | "println('hello')" || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 23 | [SRC][:] as Map<String, Object> | '["r": "hello"]'..r': 'hello'] [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 24 | [SRC]["r": "hello"] as Map<String, Object> | '["r": r]' ..r': 'hello'] [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 24 | [SRC]["r": "hello"] as Map<String, Object> | '["r": r]' ..r': 'hello'] [MSG]The String 'r' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]["r": "hello"] as Map<String, Object> | '["r": r]' ..r': 'hello'] [MSG]The String 'hello' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 14 | [SRC]class DynamicFieldDefinitionSpec extends Specification i..efinition> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 23 | [SRC]def cleanup() { [MSG]Violation in class DynamicFieldDefinitionSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 26 | [SRC]void "test field should not be null"() { [MSG]Violation in class DynamicFieldDefinitionSpec. The method name test field should not be null in class tech.muyan.dynamic.field.DynamicFieldDefinitionSpec does not match [a-z]\w* |
MethodName | 2 | 40 | [SRC]void "test field can be blank or null"() { [MSG]Violation in class DynamicFieldDefinitionSpec. The method name test field can be blank or null in class tech.muyan.dynamic.field.DynamicFieldDefinitionSpec does not match [a-z]\w* |
MethodName | 2 | 55 | [SRC]void "test render"() { [MSG]Violation in class DynamicFieldDefinitionSpec. The method name test render in class tech.muyan.dynamic.field.DynamicFieldDefinitionSpec does not match [a-z]\w* |
ImportFromSamePackage | 3 | 6 | [SRC]import tech.muyan.dynamic.field.DynamicFieldDefinition |
MisorderedStaticImports | 3 | 8 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 8 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 19 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 19 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 23 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 23 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 36 | [SRC]"fieldType" | null | 'nullable' [MSG]The String 'fieldType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]"label" | '' | 'blank' [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]"optionsJson" | '' [MSG]The String 'optionsJson' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"optionsJson" | null [MSG]The String 'optionsJson' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"referenceClazz" | '' [MSG]The String 'referenceClazz' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"referenceClazz" | null [MSG]The String 'referenceClazz' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 57 | [SRC]domain.label = "Label" [MSG]The String 'Label' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 61 | [SRC]domain.name = "myName" [MSG]The String 'myName' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 62 | [SRC]def renderResult = domain.render() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 62 | [SRC]def renderResult = domain.render() [MSG]The type is not specified for variable "renderResult" |
UnnecessaryGString | 3 | 65 | [SRC]renderResult.label == "Label" [MSG]The String 'Label' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 66 | [SRC]renderResult.fieldType == "STRING" [MSG]The String 'STRING' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class DynamicFieldValueSpec extends Specification implem..ieldValue> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 20 | [SRC]def cleanup() { [MSG]Violation in class DynamicFieldValueSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 23 | [SRC]void "test field can be blank or null"() { [MSG]Violation in class DynamicFieldValueSpec. The method name test field can be blank or null in class tech.muyan.dynamic.field.DynamicFieldValueSpec does not match [a-z]\w* |
MethodName | 2 | 41 | [SRC]void "test field can not be updated"() { [MSG]Violation in class DynamicFieldValueSpec. The method name test field can not be updated in class tech.muyan.dynamic.field.DynamicFieldValueSpec does not match [a-z]\w* |
MethodName | 2 | 54 | [SRC]void "test objectDynamicField can not be null"() { [MSG]Violation in class DynamicFieldValueSpec. The method name test objectDynamicField can not be null in class tech.muyan.dynamic.field.DynamicFieldValueSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 16 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 20 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 20 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 32 | [SRC]"stringValue" | "" [MSG]The String 'stringValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"stringValue" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"objectId" | "" [MSG]The String 'objectId' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"objectId" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]"stringValue" | null [MSG]The String 'stringValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]"objectId" | null [MSG]The String 'objectId' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 36 | [SRC]"dateValue" | null [MSG]The String 'dateValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]"numericValue" | null [MSG]The String 'numericValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]"storage" | null [MSG]The String 'storage' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"fieldType" | null [MSG]The String 'fieldType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"ownerClazz" | null [MSG]The String 'ownerClazz' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class ObjectDynamicFieldSpec extends Specification imple..amicField> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 19 | [SRC]def cleanup() { [MSG]Violation in class ObjectDynamicFieldSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 22 | [SRC]void "test objectReferenceType can be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test objectReferenceType can be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 30 | [SRC]void "test meta can be blank"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test meta can be blank in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 38 | [SRC]void "test meta can be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test meta can be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 46 | [SRC]void "test validation can be blank"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test validation can be blank in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 54 | [SRC]void "test validation can be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test validation can be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 62 | [SRC]void "test displayComponentType can not be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test displayComponentType can not be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 71 | [SRC]void "test label can not be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test label can not be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 80 | [SRC]void "test objectType can not be null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test objectType can not be null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 89 | [SRC]void "test get field type dynamicField is not null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test get field type dynamicField is not null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
MethodName | 2 | 101 | [SRC]void "test get field type dynamicField is null"() { [MSG]Violation in class ObjectDynamicFieldSpec. The method name test get field type dynamicField is null in class tech.muyan.dynamic.field.ObjectDynamicFieldSpec does not match [a-z]\w* |
ImportFromSamePackage | 3 | 6 | [SRC]import tech.muyan.dynamic.field.ObjectDynamicField |
MisorderedStaticImports | 3 | 8 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 8 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 15 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 15 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 19 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 19 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 32 | [SRC]domain.meta = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]domain.validation = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 91 | [SRC]def definition = new DynamicFieldDefinition() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 91 | [SRC]def definition = new DynamicFieldDefinition() [MSG]The type is not specified for variable "definition" |
NoDef | 3 | 94 | [SRC]def result = domain.getFieldType() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 94 | [SRC]def result = domain.getFieldType() [MSG]The type is not specified for variable "result" |
UnnecessaryGetter | 3 | 94 | [SRC]def result = domain.getFieldType() [MSG]getFieldType() can probably be rewritten as fieldType |
NoDef | 3 | 104 | [SRC]def result = domain.getFieldType() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 104 | [SRC]def result = domain.getFieldType() [MSG]The type is not specified for variable "result" |
UnnecessaryGetter | 3 | 104 | [SRC]def result = domain.getFieldType() [MSG]getFieldType() can probably be rewritten as fieldType |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class DynamicMenuSpec extends Specification implements D..namicMenu> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 14 | [SRC]def setup() { [MSG]Violation in class DynamicMenuSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 17 | [SRC]def cleanup() { [MSG]Violation in class DynamicMenuSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 20 | [SRC]def "test render"() { [MSG]Violation in class DynamicMenuSpec. The method name test render in class tech.muyan.dynamic.form.DynamicMenuSpec does not match [a-z]\w* |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.dynamic.form; [MSG]Semicolons as line endings can be removed safely |
MisorderedStaticImports | 3 | 9 | [SRC]import static tech.muyan.enums.MenuType.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 9 | [SRC]import static tech.muyan.enums.MenuType.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 14 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 14 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 17 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 17 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 20 | [SRC]def "test render"() { [MSG]Method "test render" has a dynamic return type |
VariableTypeRequired | 3 | 22 | [SRC]def org = new Organization(name: "org1") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 22 | [SRC]def org = new Organization(name: "org1") [MSG]The String 'org1' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 23 | [SRC]def pm = new DynamicMenu( [MSG]The type is not specified for variable "pm" |
UnnecessaryGString | 3 | 26 | [SRC]label: "PM", [MSG]The String 'PM' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 32 | [SRC]def cm = new DynamicMenu( [MSG]The type is not specified for variable "cm" |
UnnecessaryGString | 3 | 35 | [SRC]label: "CM", [MSG]The String 'CM' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]link: "http://google.com", [MSG]The String 'http://google.com' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 41 | [SRC]def result = cm.render() [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 45 | [SRC]result.label == "CM" [MSG]The String 'CM' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]result.link == "http://google.com" [MSG]The String 'http://google.com' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 9 | [SRC]class ConvertHelperSpec extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 11 | [SRC]def setup() { [MSG]Violation in class ConvertHelperSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 14 | [SRC]def cleanup() { [MSG]Violation in class ConvertHelperSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 17 | [SRC]def "test Convert List"() { [MSG]Violation in class ConvertHelperSpec. The method name test Convert List in class tech.muyan.helper.ConvertHelperSpec does not match [a-z]\w* |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.helper; [MSG]Semicolons as line endings can be removed safely |
ImportFromSamePackage | 3 | 5 | [SRC]import tech.muyan.helper.ConverterHelper |
MethodReturnTypeRequired | 3 | 11 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 11 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 14 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 14 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 17 | [SRC]def "test Convert List"() { [MSG]Method "test Convert List" has a dynamic return type |
VariableTypeRequired | 3 | 20 | [SRC]def converter = ConverterFactory.getConverter(type) [MSG]The type is not specified for variable "converter" |
VariableTypeRequired | 3 | 21 | [SRC]def result = ConverterHelper.convertList(converter, type..Key", input) [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 21 | [SRC]def result = ConverterHelper.convertList(converter, type..Key", input) [MSG]The String 'columnKey' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'a' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'b' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'c' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'a' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'b' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 28 | [SRC]"string" | ["a", "b", "c"] || ["a", "b", "c"] [MSG]The String 'c' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 29 | [SRC]"integer"| ["1", "2", "3"] || [1, 2, 3] [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 29 | [SRC]"integer"| ["1", "2", "3"] || [1, 2, 3] [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]"integer"| ["1", "2", "3"] || [1, 2, 3] [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]"integer"| ["1", "2", "3"] || [1, 2, 3] [MSG]The String '2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]"integer"| ["1", "2", "3"] || [1, 2, 3] [MSG]The String '3' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 24 | [SRC]class DynamicFieldHelperSpec extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 27 | [SRC]def "save all to owner"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name save all to owner in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 58 | [SRC]def "test build dynamic field with options"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test build dynamic field with options in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 85 | [SRC]def "test build dynamic field option not valid"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test build dynamic field option not valid in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 111 | [SRC]def "test build"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test build in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 134 | [SRC]def "test createDynamicFieldValue"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test createDynamicFieldValue in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 147 | [SRC]def "test getDynamicFieldValuesOf"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test getDynamicFieldValuesOf in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 167 | [SRC]def "test getDynamicFieldValueByType"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test getDynamicFieldValueByType in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MethodName | 2 | 183 | [SRC]def "test getDomainProperties"() { [MSG]Violation in class DynamicFieldHelperSpec. The method name test getDomainProperties in class tech.muyan.helper.DynamicFieldHelperSpec does not match [a-z]\w* |
MisorderedStaticImports | 3 | 16 | [SRC]import static tech.muyan.enums.DisplayComponentType.STRI..LE_SELECTION [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 17 | [SRC]import static tech.muyan.enums.DisplayComponentType.STRI..LE_SELECTION [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 18 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 18 | [SRC]import static tech.muyan.enums.DynamicFieldDataType.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 27 | [SRC]def "save all to owner"() { [MSG]Method "save all to owner" has a dynamic return type |
UnnecessaryDotClass | 3 | 29 | [SRC]GroovySpy(DynamicFieldValue.class, global: true) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
VariableTypeRequired | 3 | 30 | [SRC]def dfv1 = new DynamicFieldValue() [MSG]The type is not specified for variable "dfv1" |
VariableTypeRequired | 3 | 31 | [SRC]def dfv2 = new DynamicFieldValue() [MSG]The type is not specified for variable "dfv2" |
VariableTypeRequired | 3 | 32 | [SRC]def dfv3 = new DynamicFieldValue() [MSG]The type is not specified for variable "dfv3" |
VariableTypeRequired | 3 | 33 | [SRC]def dfv4 = new DynamicFieldValue() [MSG]The type is not specified for variable "dfv4" |
UnnecessaryDotClass | 3 | 34 | [SRC]ObjectDynamicField odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 35 | [SRC]def values = List.of( [MSG]The type is not specified for variable "values" |
UnnecessaryGString | 3 | 36 | [SRC]new DynamicFieldValue(jsonValue: "1", numericValue: 1, o..Field: odf), [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]new DynamicFieldValue(jsonValue: "abc", stringValue: "ab..Field: odf), [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 37 | [SRC]new DynamicFieldValue(jsonValue: "abc", stringValue: "ab..Field: odf), [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 38 | [SRC]new DynamicFieldValue(jsonValue: "true", booleanValue: t..Field: odf), [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 39 | [SRC]new DynamicFieldValue(jsonValue: "2020-09-01", dateValue..cField: odf) [MSG]The String '2020-09-01' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]dfv1.jsonValue == "1" [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]dfv2.jsonValue == "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]dfv2.stringValue == "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]dfv3.jsonValue == "true" [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]dfv4.jsonValue == "2020-09-01" [MSG]The String '2020-09-01' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 58 | [SRC]def "test build dynamic field with options"() { [MSG]Method "test build dynamic field with options" has a dynamic return type |
UnnecessaryDotClass | 3 | 60 | [SRC]ObjectDynamicField odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 61 | [SRC]def fieldDefinition = Mock(DynamicFieldDefinition) [MSG]The type is not specified for variable "fieldDefinition" |
UnnecessaryGString | 3 | 65 | [SRC]fieldDefinition.label >> "dynamicField" [MSG]The String 'dynamicField' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 68 | [SRC]def dfv = DynamicFieldHelper.buildFromString(input, odf) [MSG]The type is not specified for variable "dfv" |
UnnecessaryBooleanExpression | 3 | 75 | [SRC]STRING_SINGLE_SELECTION | '["Option1", "Option2"]' .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 75 | [SRC]STRING_SINGLE_SELECTION | '["Option1", "Option2"]' .. || true [MSG]The String 'Option1' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 76 | [SRC]STRING_SINGLE_SELECTION | '["Option1", "Option2"]' .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 76 | [SRC]STRING_SINGLE_SELECTION | '["Option1", "Option2"]' .. || true [MSG]The String 'Option2' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 77 | [SRC]STRING_SINGLE_SELECTION | '[1,2,3,4]' .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 77 | [SRC]STRING_SINGLE_SELECTION | '[1,2,3,4]' .. || true [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 78 | [SRC]STRING_MULTIPLE_SELECTION | '[1.0,2.0,305,405]' .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 78 | [SRC]STRING_MULTIPLE_SELECTION | '[1.0,2.0,305,405]' .. || true [MSG]The String '[305, 2.0]' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 79 | [SRC]STRING_MULTIPLE_SELECTION | '["Option1", "Option2"]' .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 80 | [SRC]STRING_MULTIPLE_SELECTION | '["Option1", "Option2"]' ..2"]' || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 81 | [SRC]STRING_MULTIPLE_SELECTION | '["Option1", "Option2", "Opt..1"]' || true [MSG]The expression using || is compared to a constant |
MethodReturnTypeRequired | 3 | 85 | [SRC]def "test build dynamic field option not valid"() { [MSG]Method "test build dynamic field option not valid" has a dynamic return type |
UnnecessaryDotClass | 3 | 87 | [SRC]ObjectDynamicField odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 88 | [SRC]def fieldDefinition = Mock(DynamicFieldDefinition) [MSG]The type is not specified for variable "fieldDefinition" |
UnnecessaryGString | 3 | 92 | [SRC]fieldDefinition.label >> "dynamicField" [MSG]The String 'dynamicField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 102 | [SRC]STRING_SINGLE_SELECTION | '["Option1", "Option2"]' .. | "Option3" [MSG]The String 'Option3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 103 | [SRC]STRING_SINGLE_SELECTION | '[1,2,3,4]' | "5" [MSG]The String '5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 104 | [SRC]STRING_MULTIPLE_SELECTION | '[1.0,2.0,305,405]' .."[305, 5.0]" [MSG]The String '[305, 5.0]' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 111 | [SRC]def "test build"() { [MSG]Method "test build" has a dynamic return type |
UnnecessaryDotClass | 3 | 113 | [SRC]ObjectDynamicField odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 114 | [SRC]def fieldDefinition = Mock(DynamicFieldDefinition.class) [MSG]The type is not specified for variable "fieldDefinition" |
UnnecessaryDotClass | 3 | 114 | [SRC]def fieldDefinition = Mock(DynamicFieldDefinition.class) [MSG]DynamicFieldDefinition.class can be rewritten as DynamicFieldDefinition |
UnnecessaryGString | 3 | 117 | [SRC]fieldDefinition.label >> "dynamicField" [MSG]The String 'dynamicField' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 120 | [SRC]def result = DynamicFieldHelper.build(odf, strValue, typedValue) [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 127 | [SRC]BOOLEAN | "T" | true ..alue" | true [MSG]The String 'T' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 127 | [SRC]BOOLEAN | "T" | true ..alue" | true [MSG]The String 'booleanValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 128 | [SRC]DATE | "2020-09-01" | LocalDate.of(2020, 9,..atTime(0, 0) [MSG]The String '2020-09-01' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 128 | [SRC]DATE | "2020-09-01" | LocalDate.of(2020, 9,..atTime(0, 0) [MSG]The String 'dateValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 129 | [SRC]DATETIME | "2020-09-01 00:00:00" | LocalDate.of(2020, 9,..tTime(10, 0) [MSG]The String '2020-09-01 00:00:00' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 129 | [SRC]DATETIME | "2020-09-01 00:00:00" | LocalDate.of(2020, 9,..tTime(10, 0) [MSG]The String 'dateValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryBigDecimalInstantiation | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]Can be rewritten as 100.5 or 100.5G |
UnnecessaryBigDecimalInstantiation | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]Can be rewritten as 100.5 or 100.5G |
UnnecessaryGString | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]The String '100.5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]The String '100.5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]The String 'numericValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 130 | [SRC]DECIMAL | "100.5" | new BigDecimal("100.5..mal("100.5") [MSG]The String '100.5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]INTEGER | "25" | new BigDecimal("25") ..ecimal("25") [MSG]The String '25' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]INTEGER | "25" | new BigDecimal("25") ..ecimal("25") [MSG]The String '25' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]INTEGER | "25" | new BigDecimal("25") ..ecimal("25") [MSG]The String 'numericValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]INTEGER | "25" | new BigDecimal("25") ..ecimal("25") [MSG]The String '25' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 134 | [SRC]def "test createDynamicFieldValue"() { [MSG]Method "test createDynamicFieldValue" has a dynamic return type |
VariableTypeRequired | 3 | 136 | [SRC]def domainObject = [id: 1] [MSG]The type is not specified for variable "domainObject" |
VariableTypeRequired | 3 | 137 | [SRC]def odf = Mock(ObjectDynamicField.class) [MSG]The type is not specified for variable "odf" |
UnnecessaryDotClass | 3 | 137 | [SRC]def odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 140 | [SRC]def result = DynamicFieldHelper.createDynamicFieldValue(..Object, odf) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 147 | [SRC]def "test getDynamicFieldValuesOf"() { [MSG]Method "test getDynamicFieldValuesOf" has a dynamic return type |
UnnecessaryDotClass | 3 | 149 | [SRC]GroovySpy(DynamicFieldValue.class, global: true) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
VariableTypeRequired | 3 | 150 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]The type is not specified for variable "mock" |
UnnecessaryDotClass | 3 | 150 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
UnnecessaryDotClass | 3 | 151 | [SRC]DetachedCriteria criteria = Mock(DetachedCriteria.class) [MSG]DetachedCriteria.class can be rewritten as DetachedCriteria |
UnnecessaryReturnKeyword | 3 | 158 | [SRC]return criteria [MSG]The return keyword is not needed and can be removed |
VariableTypeRequired | 3 | 160 | [SRC]def result = DynamicFieldHelper.getDynamicFieldValuesOf(null) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 167 | [SRC]def "test getDynamicFieldValueByType"() { [MSG]Method "test getDynamicFieldValueByType" has a dynamic return type |
UnnecessaryDotClass | 3 | 169 | [SRC]GroovySpy(DynamicFieldValue.class, global: true) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
VariableTypeRequired | 3 | 170 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]The type is not specified for variable "mock" |
UnnecessaryDotClass | 3 | 170 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
VariableTypeRequired | 3 | 176 | [SRC]def result = DynamicFieldHelper.getDynamicFieldValueByType(null, null) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 183 | [SRC]def "test getDomainProperties"() { [MSG]Method "test getDomainProperties" has a dynamic return type |
VariableTypeRequired | 3 | 186 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]The type is not specified for variable "mock" |
UnnecessaryDotClass | 3 | 186 | [SRC]def mock = Mock(DynamicFieldValue.class) [MSG]DynamicFieldValue.class can be rewritten as DynamicFieldValue |
VariableTypeRequired | 3 | 191 | [SRC]def odf = Mock(ObjectDynamicField.class) [MSG]The type is not specified for variable "odf" |
UnnecessaryDotClass | 3 | 191 | [SRC]def odf = Mock(ObjectDynamicField.class) [MSG]ObjectDynamicField.class can be rewritten as ObjectDynamicField |
VariableTypeRequired | 3 | 196 | [SRC]def values = List.of(mock) [MSG]The type is not specified for variable "values" |
VariableTypeRequired | 3 | 197 | [SRC]def domainObject = new WithProperty() [MSG]The type is not specified for variable "domainObject" |
UnnecessaryGString | 3 | 205 | [SRC]null | OBJECT | null .. | 10 [MSG]The String 'objectId' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 205 | [SRC]null | OBJECT | null .. | 10 [MSG]The String '3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 206 | [SRC]null | FILE | null .. | 9 [MSG]The String 'objectId' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 206 | [SRC]null | FILE | null .. | 9 [MSG]The String '2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 207 | [SRC]null | IMAGE | null .. | 8 [MSG]The String 'objectId' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 207 | [SRC]null | IMAGE | null .. | 8 [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 208 | [SRC]null | INTEGER | null ..314") | 7 [MSG]The String 'numericValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 208 | [SRC]null | INTEGER | null ..314") | 7 [MSG]The String '314' can be wrapped in single quotes instead of double quotes |
UnnecessaryBigDecimalInstantiation | 3 | 209 | [SRC]null | DECIMAL | null .."3.14")) | 6 [MSG]Can be rewritten as 3.14 or 3.14G |
UnnecessaryGString | 3 | 209 | [SRC]null | DECIMAL | null .."3.14")) | 6 [MSG]The String 'numericValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 210 | [SRC]null | DATE | null ..w() | 5 [MSG]The String 'dateValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 211 | [SRC]null | DATETIME | null ..w() | 4 [MSG]The String 'dateValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 212 | [SRC]null | BOOLEAN | null .. | 3 [MSG]The String 'booleanValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 213 | [SRC]null | STRING | null .. | 2 [MSG]The String 'stringValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 213 | [SRC]null | STRING | null .. | 2 [MSG]The String 'STR_VALUE' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 214 | [SRC]STRING_MULTIPLE_SELECTION | STRING | '["A", "B", "C"].. | 1 [MSG]The String 'jsonValue' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class FileHelperTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 11 | [SRC]def "test getCSVFilesWithoutSuffix empty"() { [MSG]Violation in class FileHelperTest. The method name test getCSVFilesWithoutSuffix empty in class tech.muyan.helper.FileHelperTest does not match [a-z]\w* |
MethodName | 2 | 23 | [SRC]def "test getCSVFilesWithoutSuffix one"() { [MSG]Violation in class FileHelperTest. The method name test getCSVFilesWithoutSuffix one in class tech.muyan.helper.FileHelperTest does not match [a-z]\w* |
MethodName | 2 | 38 | [SRC]def "test getCSVFilesWithoutSuffix two"() { [MSG]Violation in class FileHelperTest. The method name test getCSVFilesWithoutSuffix two in class tech.muyan.helper.FileHelperTest does not match [a-z]\w* |
MethodName | 2 | 56 | [SRC]def "test getFileContentMd5 empty file should not crash"() { [MSG]Violation in class FileHelperTest. The method name test getFileContentMd5 empty file should not crash in class tech.muyan.helper.FileHelperTest does not match [a-z]\w* |
MethodName | 2 | 68 | [SRC]def "test getFileContentMd5 file with content"() { [MSG]Violation in class FileHelperTest. The method name test getFileContentMd5 file with content in class tech.muyan.helper.FileHelperTest does not match [a-z]\w* |
ImportFromSamePackage | 3 | 4 | [SRC]import tech.muyan.helper.FileHelper |
MethodReturnTypeRequired | 3 | 11 | [SRC]def "test getCSVFilesWithoutSuffix empty"() { [MSG]Method "test getCSVFilesWithoutSuffix empty" has a dynamic return type |
UnnecessaryGetter | 3 | 17 | [SRC]List<String> csvFileNames = FileHelper.getCSVFilesWithou..olutePath()) [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
MethodReturnTypeRequired | 3 | 23 | [SRC]def "test getCSVFilesWithoutSuffix one"() { [MSG]Method "test getCSVFilesWithoutSuffix one" has a dynamic return type |
UnnecessaryGString | 3 | 27 | [SRC]File.createTempFile("Group", ".csv", file) [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 27 | [SRC]File.createTempFile("Group", ".csv", file) [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 30 | [SRC]List<String> csvFileNames = FileHelper.getCSVFilesWithou..olutePath()) [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
UnnecessaryGString | 3 | 34 | [SRC]assert csvFileNames.get(0).contains("Group") [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]assert !csvFileNames.get(0).contains(".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 38 | [SRC]def "test getCSVFilesWithoutSuffix two"() { [MSG]Method "test getCSVFilesWithoutSuffix two" has a dynamic return type |
UnnecessaryGString | 3 | 42 | [SRC]File.createTempFile("User", ".csv", file) [MSG]The String 'User' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 42 | [SRC]File.createTempFile("User", ".csv", file) [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 43 | [SRC]File.createTempFile("Group", ".csv", file) [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 43 | [SRC]File.createTempFile("Group", ".csv", file) [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 46 | [SRC]List<String> csvFileNames = FileHelper.getCSVFilesWithou..olutePath()) [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
UnnecessaryGString | 3 | 50 | [SRC]assert csvFileNames.get(0).contains("Group") || csvFileN..ains("User") [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]assert csvFileNames.get(0).contains("Group") || csvFileN..ains("User") [MSG]The String 'User' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]assert csvFileNames.get(1).contains("Group") || csvFileN..ains("User") [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]assert csvFileNames.get(1).contains("Group") || csvFileN..ains("User") [MSG]The String 'User' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]assert !csvFileNames.get(0).contains(".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]assert !csvFileNames.get(1).contains(".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 56 | [SRC]def "test getFileContentMd5 empty file should not crash"() { [MSG]Method "test getFileContentMd5 empty file should not crash" has a dynamic return type |
UnnecessaryGString | 3 | 58 | [SRC]File file = File.createTempFile("Group", ".csv") [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 58 | [SRC]File file = File.createTempFile("Group", ".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 61 | [SRC]String md5 = FileHelper.getFileContentMd5(file.getAbsolutePath()) [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
UnnecessaryGString | 3 | 65 | [SRC]assert md5 == "d41d8cd98f00b204e9800998ecf8427e" [MSG]The String 'd41d8cd98f00b204e9800998ecf8427e' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 68 | [SRC]def "test getFileContentMd5 file with content"() { [MSG]Method "test getFileContentMd5 file with content" has a dynamic return type |
UnnecessaryGString | 3 | 70 | [SRC]File file = File.createTempFile("Group", ".csv") [MSG]The String 'Group' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 70 | [SRC]File file = File.createTempFile("Group", ".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]file.write("Hello World!", "UTF-8") [MSG]The String 'Hello World!' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]file.write("Hello World!", "UTF-8") [MSG]The String 'UTF-8' can be wrapped in single quotes instead of double quotes |
UnnecessaryGetter | 3 | 74 | [SRC]String md5 = FileHelper.getFileContentMd5(file.getAbsolutePath()) [MSG]getAbsolutePath() can probably be rewritten as absolutePath |
UnnecessaryGString | 3 | 77 | [SRC]assert md5 == "ed076287532e86365e841e92bfc50d8c" [MSG]The String 'ed076287532e86365e841e92bfc50d8c' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class LabelHelperTest extends GroovyTestCase { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
ImportFromSamePackage | 3 | 6 | [SRC]import tech.muyan.helper.LabelHelper |
UnnecessaryDotClass | 3 | 14 | [SRC]String val = LabelHelper.getLabelField(Organization.class) [MSG]Organization.class can be rewritten as Organization |
UnnecessaryGString | 3 | 15 | [SRC]assertEquals("name", val) [MSG]The String 'name' can be wrapped in single quotes instead of double quotes |
UnnecessaryDotClass | 3 | 19 | [SRC]String val = LabelHelper.getLabelField(ContractLine.class) [MSG]ContractLine.class can be rewritten as ContractLine |
UnnecessaryGString | 3 | 20 | [SRC]assertEquals("id", val) [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryDotClass | 3 | 24 | [SRC]String val = LabelHelper.getLabelField(DomainClass.class) [MSG]DomainClass.class can be rewritten as DomainClass |
UnnecessaryGString | 3 | 25 | [SRC]assertEquals("label", val) [MSG]The String 'label' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 17 | [SRC]class OrganizationHelperSpec extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 19 | [SRC]def setup() { [MSG]Violation in class OrganizationHelperSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 22 | [SRC]def cleanup() { [MSG]Violation in class OrganizationHelperSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 25 | [SRC]def "test get Organization of user"() { [MSG]Violation in class OrganizationHelperSpec. The method name test get Organization of user in class tech.muyan.helper.OrganizationHelperSpec does not match [a-z]\w* |
MethodName | 2 | 44 | [SRC]def "test get menus of organization"() { [MSG]Violation in class OrganizationHelperSpec. The method name test get menus of organization in class tech.muyan.helper.OrganizationHelperSpec does not match [a-z]\w* |
MethodName | 2 | 64 | [SRC]def "test getRequestUrlFromDomainClassAndFormType asset fail"() { [MSG]Violation in class OrganizationHelperSpec. The method name test getRequestUrlFromDomainClassAndFormType asset fail in class tech.muyan.helper.OrganizationHelperSpec does not match [a-z]\w* |
MethodName | 2 | 72 | [SRC]def "test getRequestUrlFromDomainClassAndFormType"() { [MSG]Violation in class OrganizationHelperSpec. The method name test getRequestUrlFromDomainClassAndFormType in class tech.muyan.helper.OrganizationHelperSpec does not match [a-z]\w* |
MethodName | 2 | 90 | [SRC]def "test getHttpMethodFromFormType"() { [MSG]Violation in class OrganizationHelperSpec. The method name test getHttpMethodFromFormType in class tech.muyan.helper.OrganizationHelperSpec does not match [a-z]\w* |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.helper; [MSG]Semicolons as line endings can be removed safely |
ImportFromSamePackage | 3 | 8 | [SRC]import tech.muyan.helper.OrganizationHelper |
NoWildcardImports | 3 | 11 | [SRC]import tech.muyan.enums.FormType [MSG]Wildcard (star) import |
MisorderedStaticImports | 3 | 13 | [SRC]import static tech.muyan.enums.FormType.* [MSG]Static imports should appear before normal imports |
MisorderedStaticImports | 3 | 14 | [SRC]import static org.springframework.http.HttpMethod.* [MSG]Static imports should appear before normal imports |
NoWildcardImports | 3 | 14 | [SRC]import static org.springframework.http.HttpMethod.* [MSG]Wildcard (star) import |
MethodReturnTypeRequired | 3 | 19 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 19 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 22 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 22 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 25 | [SRC]def "test get Organization of user"() { [MSG]Method "test get Organization of user" has a dynamic return type |
VariableTypeRequired | 3 | 28 | [SRC]def auth = Mock(Authentication.class) [MSG]The type is not specified for variable "auth" |
UnnecessaryDotClass | 3 | 28 | [SRC]def auth = Mock(Authentication.class) [MSG]Authentication.class can be rewritten as Authentication |
UnnecessaryGetter | 3 | 29 | [SRC]auth.getPrincipal() >> [properties: [id: 1L]] [MSG]getPrincipal() can probably be rewritten as principal |
VariableTypeRequired | 3 | 31 | [SRC]def user =new User("dummyUser", "password") [MSG]The type is not specified for variable "user" |
UnnecessaryGString | 3 | 31 | [SRC]def user =new User("dummyUser", "password") [MSG]The String 'dummyUser' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]def user =new User("dummyUser", "password") [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]user.organization = new Organization(name: "dummy") [MSG]The String 'dummy' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 37 | [SRC]def orgOfUser = OrganizationHelper.getOrganizationOfUser(auth) [MSG]The type is not specified for variable "orgOfUser" |
UnnecessaryGString | 3 | 40 | [SRC]orgOfUser.name == "dummy" [MSG]The String 'dummy' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 44 | [SRC]def "test get menus of organization"() { [MSG]Method "test get menus of organization" has a dynamic return type |
VariableTypeRequired | 3 | 46 | [SRC]def param = [sort: "displaySequence"] [MSG]The type is not specified for variable "param" |
UnnecessaryGString | 3 | 46 | [SRC]def param = [sort: "displaySequence"] [MSG]The String 'displaySequence' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 47 | [SRC]def dm1 = new DynamicMenu() [MSG]The type is not specified for variable "dm1" |
VariableTypeRequired | 3 | 48 | [SRC]def dm2 = new DynamicMenu() [MSG]The type is not specified for variable "dm2" |
VariableTypeRequired | 3 | 53 | [SRC]def result = OrganizationHelper.getMenusOfOrganization(null, null) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 64 | [SRC]def "test getRequestUrlFromDomainClassAndFormType asset fail"() { [MSG]Method "test getRequestUrlFromDomainClassAndFormType asset fail" has a dynamic return type |
UnnecessaryPackageReference | 3 | 69 | [SRC]thrown(java.lang.AssertionError) [MSG]Specifying the package name is not necessary for java.lang.AssertionError |
MethodReturnTypeRequired | 3 | 72 | [SRC]def "test getRequestUrlFromDomainClassAndFormType"() { [MSG]Method "test getRequestUrlFromDomainClassAndFormType" has a dynamic return type |
VariableTypeRequired | 3 | 74 | [SRC]def domainClazz = Mock(DomainClass.class) [MSG]The type is not specified for variable "domainClazz" |
UnnecessaryDotClass | 3 | 74 | [SRC]def domainClazz = Mock(DomainClass.class) [MSG]DomainClass.class can be rewritten as DomainClass |
VariableTypeRequired | 3 | 76 | [SRC]def result = OrganizationHelper.getRequestUrlFromDomainC..z, formType) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 83 | [SRC]"User" | FormType.CREATE || "/User" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 83 | [SRC]"User" | FormType.CREATE || "/User" [MSG]The String 'User' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 83 | [SRC]"User" | FormType.CREATE || "/User" [MSG]The String '/User' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 84 | [SRC]"Contract" | FormType.LIST || "/Contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 84 | [SRC]"Contract" | FormType.LIST || "/Contract" [MSG]The String 'Contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 84 | [SRC]"Contract" | FormType.LIST || "/Contract" [MSG]The String '/Contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 85 | [SRC]"Contract" | FormType.UPDATE || "/Contract/**" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 85 | [SRC]"Contract" | FormType.UPDATE || "/Contract/**" [MSG]The String 'Contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 85 | [SRC]"Contract" | FormType.UPDATE || "/Contract/**" [MSG]The String '/Contract/**' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 86 | [SRC]"Contract" | FormType.DISPLAY || "UNKNOWN_REQUEST_URL" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 86 | [SRC]"Contract" | FormType.DISPLAY || "UNKNOWN_REQUEST_URL" [MSG]The String 'Contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 86 | [SRC]"Contract" | FormType.DISPLAY || "UNKNOWN_REQUEST_URL" [MSG]The String 'UNKNOWN_REQUEST_URL' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 90 | [SRC]def "test getHttpMethodFromFormType"() { [MSG]Method "test getHttpMethodFromFormType" has a dynamic return type |
VariableTypeRequired | 3 | 93 | [SRC]def result = OrganizationHelper.getHttpMethodFromFormType(input) [MSG]The type is not specified for variable "result" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class ParamsHelperTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 26 | [SRC]def "param id check"() { [MSG]Violation in class ParamsHelperTest. The method name param id check in class tech.muyan.helper.ParamsHelperTest does not match [a-z]\w* |
ImportFromSamePackage | 3 | 6 | [SRC]import tech.muyan.helper.ParamsHelper |
FieldTypeRequired | 3 | 15 | [SRC]def mock1 = new GrailsParameterMap([id: 1L], null) [MSG]The type is not specified for field "mock1" |
FieldTypeRequired | 3 | 18 | [SRC]def mock2 = new GrailsParameterMap([id: null], null) [MSG]The type is not specified for field "mock2" |
FieldTypeRequired | 3 | 21 | [SRC]def mock3 = new GrailsParameterMap([id: 1], null) [MSG]The type is not specified for field "mock3" |
FieldTypeRequired | 3 | 24 | [SRC]def mock4 = new GrailsParameterMap([id: "1"], null) [MSG]The type is not specified for field "mock4" |
UnnecessaryGString | 3 | 24 | [SRC]def mock4 = new GrailsParameterMap([id: "1"], null) [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 26 | [SRC]def "param id check"() { [MSG]Method "param id check" has a dynamic return type |
VariableTypeRequired | 3 | 28 | [SRC]def result = ParamsHelper.idParamNotValid(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 35 | [SRC]Mock(GrailsParameterMap) || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 36 | [SRC]mock1 || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 37 | [SRC]mock2 || true [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 38 | [SRC]mock3 || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 39 | [SRC]mock4 || false [MSG]The expression using || is compared to a constant |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class StringHelperTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 12 | [SRC]void "test split camel case"() { [MSG]Violation in class StringHelperTest. The method name test split camel case in class tech.muyan.helper.StringHelperTest does not match [a-z]\w* |
ImportFromSamePackage | 3 | 4 | [SRC]import tech.muyan.helper.StringHelper |
NoDef | 3 | 14 | [SRC]def splitResult = StringHelper.splitCamelCase(input) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 14 | [SRC]def splitResult = StringHelper.splitCamelCase(input) [MSG]The type is not specified for variable "splitResult" |
UnnecessaryBooleanExpression | 3 | 21 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 21 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 22 | [SRC]null || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 23 | [SRC]"hello" || "hello" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 23 | [SRC]"hello" || "hello" [MSG]The String 'hello' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]"hello" || "hello" [MSG]The String 'hello' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 24 | [SRC]"thisIsAClass" || "this Is A Class" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 24 | [SRC]"thisIsAClass" || "this Is A Class" [MSG]The String 'thisIsAClass' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]"thisIsAClass" || "this Is A Class" [MSG]The String 'this Is A Class' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 25 | [SRC]"thisisloooong" || "thisisloooong" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 25 | [SRC]"thisisloooong" || "thisisloooong" [MSG]The String 'thisisloooong' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 25 | [SRC]"thisisloooong" || "thisisloooong" [MSG]The String 'thisisloooong' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 26 | [SRC]"ContractOrg" || "Contract Org" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 26 | [SRC]"ContractOrg" || "Contract Org" [MSG]The String 'ContractOrg' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 26 | [SRC]"ContractOrg" || "Contract Org" [MSG]The String 'Contract Org' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 32 | [SRC]def result = StringHelper.pathTypeToJavaType(input) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 32 | [SRC]def result = StringHelper.pathTypeToJavaType(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 39 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 39 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 39 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 40 | [SRC]null || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 41 | [SRC]"tech_muyan_domain_contract" || "tech.muyan.domain.contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 41 | [SRC]"tech_muyan_domain_contract" || "tech.muyan.domain.contract" [MSG]The String 'tech_muyan_domain_contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 41 | [SRC]"tech_muyan_domain_contract" || "tech.muyan.domain.contract" [MSG]The String 'tech.muyan.domain.contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 42 | [SRC]"contract" || "contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 42 | [SRC]"contract" || "contract" [MSG]The String 'contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 42 | [SRC]"contract" || "contract" [MSG]The String 'contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 43 | [SRC]"tech_contract" || "tech.contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 43 | [SRC]"tech_contract" || "tech.contract" [MSG]The String 'tech_contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 43 | [SRC]"tech_contract" || "tech.contract" [MSG]The String 'tech.contract' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 49 | [SRC]def result = StringHelper.javaTypeToPathType(input) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 49 | [SRC]def result = StringHelper.javaTypeToPathType(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 56 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 56 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 56 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 57 | [SRC]null || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 58 | [SRC]"tech.muyan.domain.contract" || "tech_muyan_domain_contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 58 | [SRC]"tech.muyan.domain.contract" || "tech_muyan_domain_contract" [MSG]The String 'tech.muyan.domain.contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 58 | [SRC]"tech.muyan.domain.contract" || "tech_muyan_domain_contract" [MSG]The String 'tech_muyan_domain_contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 59 | [SRC]"contract" || "contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 59 | [SRC]"contract" || "contract" [MSG]The String 'contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 59 | [SRC]"contract" || "contract" [MSG]The String 'contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 60 | [SRC]"tech.contract" || "tech_contract" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 60 | [SRC]"tech.contract" || "tech_contract" [MSG]The String 'tech.contract' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 60 | [SRC]"tech.contract" || "tech_contract" [MSG]The String 'tech_contract' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class CSVHelperTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 13 | [SRC]def "get Instance"() { [MSG]Violation in class CSVHelperTest. The method name get Instance in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 23 | [SRC]def "get CSV Record Content"() { [MSG]Violation in class CSVHelperTest. The method name get CSV Record Content in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 41 | [SRC]def "is object field"() { [MSG]Violation in class CSVHelperTest. The method name is object field in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 56 | [SRC]def "is query field"() { [MSG]Violation in class CSVHelperTest. The method name is query field in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 73 | [SRC]def "replace query sign"() { [MSG]Violation in class CSVHelperTest. The method name replace query sign in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 92 | [SRC]def "get object field query field null"() { [MSG]Violation in class CSVHelperTest. The method name get object field query field null in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
UnusedVariable | 2 | 94 | [SRC]def result = CSVHelper.me().getObjectFieldQueryField(input) [MSG]The variable [result] in class tech.muyan.importexport.CSVHelperTest is not used |
MethodName | 2 | 104 | [SRC]def "get object field query field"() { [MSG]Violation in class CSVHelperTest. The method name get object field query field in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 122 | [SRC]def "is comment line"() { [MSG]Violation in class CSVHelperTest. The method name is comment line in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 149 | [SRC]def "get object field name"() { [MSG]Violation in class CSVHelperTest. The method name get object field name in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 171 | [SRC]def "test getFieldType id"() { [MSG]Violation in class CSVHelperTest. The method name test getFieldType id in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 179 | [SRC]def "test getFieldType simple"() { [MSG]Violation in class CSVHelperTest. The method name test getFieldType simple in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 205 | [SRC]def "test getFieldType object"() { [MSG]Violation in class CSVHelperTest. The method name test getFieldType object in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 231 | [SRC]def "test startsAndEndsWithQuote"() { [MSG]Violation in class CSVHelperTest. The method name test startsAndEndsWithQuote in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 248 | [SRC]def "test removeStartAndEndQuote"() { [MSG]Violation in class CSVHelperTest. The method name test removeStartAndEndQuote in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 265 | [SRC]def "test isDynamicFieldColumn"() { [MSG]Violation in class CSVHelperTest. The method name test isDynamicFieldColumn in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodName | 2 | 283 | [SRC]def "test removeDynamicFieldSign"() { [MSG]Violation in class CSVHelperTest. The method name test removeDynamicFieldSign in class tech.muyan.importexport.CSVHelperTest does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 13 | [SRC]def "get Instance"() { [MSG]Method "get Instance" has a dynamic return type |
VariableTypeRequired | 3 | 16 | [SRC]def me = CSVHelper.me() [MSG]The type is not specified for variable "me" |
MethodReturnTypeRequired | 3 | 23 | [SRC]def "get CSV Record Content"() { [MSG]Method "get CSV Record Content" has a dynamic return type |
UnnecessaryGString | 3 | 26 | [SRC]File file = File.createTempFile("User", ".csv") [MSG]The String 'User' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 26 | [SRC]File file = File.createTempFile("User", ".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 27 | [SRC]file.write("id, username, password, passwordExpired\n1, ..123, today") [MSG]The String 'id, username, password, passwordExpired 1, user, 123, today' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 28 | [SRC]def fileInputStream = new FileInputStream(file.getPath()) [MSG]The type is not specified for variable "fileInputStream" |
UnnecessaryGetter | 3 | 28 | [SRC]def fileInputStream = new FileInputStream(file.getPath()) [MSG]getPath() can probably be rewritten as path |
VariableTypeRequired | 3 | 29 | [SRC]def bomInputStream = new BOMInputStream(fileInputStream) [MSG]The type is not specified for variable "bomInputStream" |
VariableTypeRequired | 3 | 30 | [SRC]def reader = new InputStreamReader(bomInputStream, 'UTF-8') [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 34 | [SRC]def result = CSVHelper.me().getCSVRecordContent(records...or().next()) [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 37 | [SRC]assert result == "1, user, 123, today" [MSG]The String '1, user, 123, today' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 41 | [SRC]def "is object field"() { [MSG]Method "is object field" has a dynamic return type |
VariableTypeRequired | 3 | 43 | [SRC]def result = CSVHelper.me().isObjectField(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 50 | [SRC]null || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 51 | [SRC]"" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 51 | [SRC]"" || false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 52 | [SRC]"abc" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 52 | [SRC]"abc" || false [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 53 | [SRC]"abc.def" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 53 | [SRC]"abc.def" || true [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 56 | [SRC]def "is query field"() { [MSG]Method "is query field" has a dynamic return type |
VariableTypeRequired | 3 | 58 | [SRC]def result = CSVHelper.me().isQueryField(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 65 | [SRC]null || false [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 66 | [SRC]"" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 66 | [SRC]"" || false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 67 | [SRC]"abc" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 67 | [SRC]"abc" || false [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 68 | [SRC]"abc(*)" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 68 | [SRC]"abc(*)" || true [MSG]The String 'abc(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 69 | [SRC]"abc.def" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 69 | [SRC]"abc.def" || false [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 70 | [SRC]"abc.def(*)" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 70 | [SRC]"abc.def(*)" || true [MSG]The String 'abc.def(*)' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 73 | [SRC]def "replace query sign"() { [MSG]Method "replace query sign" has a dynamic return type |
VariableTypeRequired | 3 | 75 | [SRC]def result = CSVHelper.me().removeQuerySign(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 82 | [SRC]null || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 83 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 83 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 83 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 84 | [SRC]"abc" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 84 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 84 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 85 | [SRC]"abc(*)" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 85 | [SRC]"abc(*)" || "abc" [MSG]The String 'abc(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 85 | [SRC]"abc(*)" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 86 | [SRC]"abc.def" || "abc.def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 86 | [SRC]"abc.def" || "abc.def" [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 86 | [SRC]"abc.def" || "abc.def" [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 87 | [SRC]"abc.def(*)" || "abc.def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 87 | [SRC]"abc.def(*)" || "abc.def" [MSG]The String 'abc.def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 87 | [SRC]"abc.def(*)" || "abc.def" [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 88 | [SRC]"Abc" || "Abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 88 | [SRC]"Abc" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 88 | [SRC]"Abc" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 89 | [SRC]"Abc.Def(*)" || "Abc.Def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 89 | [SRC]"Abc.Def(*)" || "Abc.Def" [MSG]The String 'Abc.Def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 89 | [SRC]"Abc.Def(*)" || "Abc.Def" [MSG]The String 'Abc.Def' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 92 | [SRC]def "get object field query field null"() { [MSG]Method "get object field query field null" has a dynamic return type |
VariableTypeRequired | 3 | 94 | [SRC]def result = CSVHelper.me().getObjectFieldQueryField(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 101 | [SRC]null || java.lang.AssertionError [MSG]The expression using || is compared to a constant |
UnnecessaryPackageReference | 3 | 101 | [SRC]null || java.lang.AssertionError [MSG]Specifying the package name is not necessary for java.lang.AssertionError |
MethodReturnTypeRequired | 3 | 104 | [SRC]def "get object field query field"() { [MSG]Method "get object field query field" has a dynamic return type |
VariableTypeRequired | 3 | 106 | [SRC]def result = CSVHelper.me().getObjectFieldQueryField(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 113 | [SRC]"" || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 113 | [SRC]"" || null [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 114 | [SRC]"abc" || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 114 | [SRC]"abc" || null [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 115 | [SRC]"abc(*)" || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 115 | [SRC]"abc(*)" || null [MSG]The String 'abc(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 116 | [SRC]"abc.def" || "def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 116 | [SRC]"abc.def" || "def" [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 116 | [SRC]"abc.def" || "def" [MSG]The String 'def' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 117 | [SRC]"abc.def(*)" || "def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 117 | [SRC]"abc.def(*)" || "def" [MSG]The String 'abc.def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 117 | [SRC]"abc.def(*)" || "def" [MSG]The String 'def' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 118 | [SRC]"Abc" || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 118 | [SRC]"Abc" || null [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 119 | [SRC]"Abc.Def(*)" || "Def" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 119 | [SRC]"Abc.Def(*)" || "Def" [MSG]The String 'Abc.Def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 119 | [SRC]"Abc.Def(*)" || "Def" [MSG]The String 'Def' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 122 | [SRC]def "is comment line"() { [MSG]Method "is comment line" has a dynamic return type |
UnnecessaryGString | 3 | 124 | [SRC]File file = File.createTempFile("Comment", ".csv") [MSG]The String 'Comment' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 124 | [SRC]File file = File.createTempFile("Comment", ".csv") [MSG]The String '.csv' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 126 | [SRC]def fileInputStream = new FileInputStream(file.getPath()) [MSG]The type is not specified for variable "fileInputStream" |
UnnecessaryGetter | 3 | 126 | [SRC]def fileInputStream = new FileInputStream(file.getPath()) [MSG]getPath() can probably be rewritten as path |
VariableTypeRequired | 3 | 127 | [SRC]def bomInputStream = new BOMInputStream(fileInputStream) [MSG]The type is not specified for variable "bomInputStream" |
VariableTypeRequired | 3 | 128 | [SRC]def reader = new InputStreamReader(bomInputStream, 'UTF-8') [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 132 | [SRC]def result = CSVHelper.me().isCommentLine(records.iterator().next()) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 139 | [SRC]"" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 139 | [SRC]"" || false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 140 | [SRC]"abc" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 140 | [SRC]"abc" || false [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 141 | [SRC]";abc" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 141 | [SRC]";abc" || true [MSG]The String ';abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 142 | [SRC]";" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 142 | [SRC]";" || true [MSG]The String ';' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 143 | [SRC]" ;abc" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 143 | [SRC]" ;abc" || true [MSG]The String ' ;abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 144 | [SRC]" ;" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 144 | [SRC]" ;" || true [MSG]The String ' ;' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 145 | [SRC]" ;abc," || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 145 | [SRC]" ;abc," || true [MSG]The String ' ;abc,' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 146 | [SRC]" ;,abc" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 146 | [SRC]" ;,abc" || true [MSG]The String ' ;,abc' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 149 | [SRC]def "get object field name"() { [MSG]Method "get object field name" has a dynamic return type |
VariableTypeRequired | 3 | 151 | [SRC]def result = CSVHelper.me().getObjectFieldName(input) [MSG]The type is not specified for variable "result" |
UnnecessaryBooleanExpression | 3 | 158 | [SRC]null || null [MSG]The expression using || is compared to a constant |
UnnecessaryBooleanExpression | 3 | 159 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 159 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 159 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 160 | [SRC]"abc" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 160 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 160 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 161 | [SRC]"abc(*)" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 161 | [SRC]"abc(*)" || "abc" [MSG]The String 'abc(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 161 | [SRC]"abc(*)" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 162 | [SRC]"abc(*)(*)" || "abc(*)" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 162 | [SRC]"abc(*)(*)" || "abc(*)" [MSG]The String 'abc(*)(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 162 | [SRC]"abc(*)(*)" || "abc(*)" [MSG]The String 'abc(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 163 | [SRC]"abc.def" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 163 | [SRC]"abc.def" || "abc" [MSG]The String 'abc.def' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 163 | [SRC]"abc.def" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 164 | [SRC]"abc.def(*)" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 164 | [SRC]"abc.def(*)" || "abc" [MSG]The String 'abc.def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 164 | [SRC]"abc.def(*)" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 165 | [SRC]"Abc" || "Abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 165 | [SRC]"Abc" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 165 | [SRC]"Abc" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 166 | [SRC]"Abc.Def(*)" || "Abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 166 | [SRC]"Abc.Def(*)" || "Abc" [MSG]The String 'Abc.Def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 166 | [SRC]"Abc.Def(*)" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 167 | [SRC]".Def(*)" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 167 | [SRC]".Def(*)" || "" [MSG]The String '.Def(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 167 | [SRC]".Def(*)" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 168 | [SRC]"Abc.(*)" || "Abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 168 | [SRC]"Abc.(*)" || "Abc" [MSG]The String 'Abc.(*)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 168 | [SRC]"Abc.(*)" || "Abc" [MSG]The String 'Abc' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 171 | [SRC]def "test getFieldType id"() { [MSG]Method "test getFieldType id" has a dynamic return type |
VariableTypeRequired | 3 | 173 | [SRC]def type = CSVHelper.me().getFieldType("id", null) [MSG]The type is not specified for variable "type" |
UnnecessaryGString | 3 | 173 | [SRC]def type = CSVHelper.me().getFieldType("id", null) [MSG]The String 'id' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 176 | [SRC]assert type == "long" [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 179 | [SRC]def "test getFieldType simple"() { [MSG]Method "test getFieldType simple" has a dynamic return type |
VariableTypeRequired | 3 | 181 | [SRC]def headerName = "quantity" [MSG]The type is not specified for variable "headerName" |
UnnecessaryGString | 3 | 181 | [SRC]def headerName = "quantity" [MSG]The String 'quantity' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 182 | [SRC]def meta = [MSG]The type is not specified for variable "meta" |
UnnecessaryGString | 3 | 184 | [SRC]"title" : "Quantity", [MSG]The String 'title' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 184 | [SRC]"title" : "Quantity", [MSG]The String 'Quantity' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 185 | [SRC]"dataIndex" : "quantity", [MSG]The String 'dataIndex' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 185 | [SRC]"dataIndex" : "quantity", [MSG]The String 'quantity' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 186 | [SRC]"key" : "quantity", [MSG]The String 'key' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 186 | [SRC]"key" : "quantity", [MSG]The String 'quantity' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 187 | [SRC]"editable" : true, [MSG]The String 'editable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 188 | [SRC]"display" : true, [MSG]The String 'display' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 189 | [SRC]"labelField" : "authority", [MSG]The String 'labelField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 189 | [SRC]"labelField" : "authority", [MSG]The String 'authority' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 190 | [SRC]"backReferenceField": "", [MSG]The String 'backReferenceField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 190 | [SRC]"backReferenceField": "", [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 191 | [SRC]"type" : "decimal", [MSG]The String 'type' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 191 | [SRC]"type" : "decimal", [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 192 | [SRC]"nullable" : false, [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 193 | [SRC]"validator" : "", [MSG]The String 'validator' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 193 | [SRC]"validator" : "", [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 194 | [SRC]"updatable" : true [MSG]The String 'updatable' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 198 | [SRC]def type = CSVHelper.me().getFieldType(headerName, meta) [MSG]The type is not specified for variable "type" |
UnnecessaryGString | 3 | 201 | [SRC]assert type == "decimal" [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 205 | [SRC]def "test getFieldType object"() { [MSG]Method "test getFieldType object" has a dynamic return type |
VariableTypeRequired | 3 | 207 | [SRC]def headerName = "authority.name" [MSG]The type is not specified for variable "headerName" |
UnnecessaryGString | 3 | 207 | [SRC]def headerName = "authority.name" [MSG]The String 'authority.name' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 208 | [SRC]def meta = [MSG]The type is not specified for variable "meta" |
UnnecessaryGString | 3 | 210 | [SRC]"title" : "Authority", [MSG]The String 'title' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 210 | [SRC]"title" : "Authority", [MSG]The String 'Authority' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 211 | [SRC]"dataIndex" : "authority", [MSG]The String 'dataIndex' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 211 | [SRC]"dataIndex" : "authority", [MSG]The String 'authority' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 212 | [SRC]"key" : "authority", [MSG]The String 'key' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 212 | [SRC]"key" : "authority", [MSG]The String 'authority' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 213 | [SRC]"editable" : true, [MSG]The String 'editable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 214 | [SRC]"display" : true, [MSG]The String 'display' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 215 | [SRC]"labelField" : "authority", [MSG]The String 'labelField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 215 | [SRC]"labelField" : "authority", [MSG]The String 'authority' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 216 | [SRC]"backReferenceField": "", [MSG]The String 'backReferenceField' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 216 | [SRC]"backReferenceField": "", [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 217 | [SRC]"type" : "tech_muyan_security_Role", [MSG]The String 'type' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 217 | [SRC]"type" : "tech_muyan_security_Role", [MSG]The String 'tech_muyan_security_Role' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 218 | [SRC]"nullable" : false, [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 219 | [SRC]"validator" : "", [MSG]The String 'validator' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 219 | [SRC]"validator" : "", [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 220 | [SRC]"updatable" : true [MSG]The String 'updatable' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 224 | [SRC]def type = CSVHelper.me().getFieldType(headerName, meta) [MSG]The type is not specified for variable "type" |
UnnecessaryGString | 3 | 227 | [SRC]assert type == "tech.muyan.security.Role" [MSG]The String 'tech.muyan.security.Role' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 231 | [SRC]def "test startsAndEndsWithQuote"() { [MSG]Method "test startsAndEndsWithQuote" has a dynamic return type |
VariableTypeRequired | 3 | 233 | [SRC]def value = CSVHelper.me().startsAndEndsWithQuote(input) [MSG]The type is not specified for variable "value" |
UnnecessaryBooleanExpression | 3 | 240 | [SRC]"\"abc\"" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 240 | [SRC]"\"abc\"" || true [MSG]The String '"abc"' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 241 | [SRC]"\"\"" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 241 | [SRC]"\"\"" || true [MSG]The String '""' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 242 | [SRC]"abc" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 242 | [SRC]"abc" || false [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 243 | [SRC]"" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 243 | [SRC]"" || false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 244 | [SRC]"\"abc" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 244 | [SRC]"\"abc" || false [MSG]The String '"abc' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 248 | [SRC]def "test removeStartAndEndQuote"() { [MSG]Method "test removeStartAndEndQuote" has a dynamic return type |
VariableTypeRequired | 3 | 250 | [SRC]def value = CSVHelper.me().removeStartAndEndQuote(input) [MSG]The type is not specified for variable "value" |
UnnecessaryBooleanExpression | 3 | 257 | [SRC]"\"abc\"" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 257 | [SRC]"\"abc\"" || "abc" [MSG]The String '"abc"' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 257 | [SRC]"\"abc\"" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 258 | [SRC]"\"\"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 258 | [SRC]"\"\"" || "" [MSG]The String '""' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 258 | [SRC]"\"\"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 259 | [SRC]"abc" || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 259 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 259 | [SRC]"abc" || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 260 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 260 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 260 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 261 | [SRC]"\"abc" || "\"abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 261 | [SRC]"\"abc" || "\"abc" [MSG]The String '"abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 261 | [SRC]"\"abc" || "\"abc" [MSG]The String '"abc' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 265 | [SRC]def "test isDynamicFieldColumn"() { [MSG]Method "test isDynamicFieldColumn" has a dynamic return type |
VariableTypeRequired | 3 | 267 | [SRC]def value = CSVHelper.me().isDynamicFieldColumn(input) [MSG]The type is not specified for variable "value" |
UnnecessaryBooleanExpression | 3 | 274 | [SRC]"" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 274 | [SRC]"" || false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 275 | [SRC]"a(#)" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 275 | [SRC]"a(#)" || true [MSG]The String 'a(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 276 | [SRC]"ABC_DEF(#)" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 276 | [SRC]"ABC_DEF(#)" || true [MSG]The String 'ABC_DEF(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 277 | [SRC]"ABC_DEF(#)(#)" || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 277 | [SRC]"ABC_DEF(#)(#)" || true [MSG]The String 'ABC_DEF(#)(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 278 | [SRC]"a" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 278 | [SRC]"a" || false [MSG]The String 'a' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 279 | [SRC]"ABC_DEF" || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 279 | [SRC]"ABC_DEF" || false [MSG]The String 'ABC_DEF' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 283 | [SRC]def "test removeDynamicFieldSign"() { [MSG]Method "test removeDynamicFieldSign" has a dynamic return type |
VariableTypeRequired | 3 | 285 | [SRC]def value = CSVHelper.me().removeDynamicFieldSign(input) [MSG]The type is not specified for variable "value" |
UnnecessaryBooleanExpression | 3 | 292 | [SRC]"" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 292 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 292 | [SRC]"" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 293 | [SRC]"(#)" || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 293 | [SRC]"(#)" || "" [MSG]The String '(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 293 | [SRC]"(#)" || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 294 | [SRC]"ABC" || "ABC" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 294 | [SRC]"ABC" || "ABC" [MSG]The String 'ABC' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 294 | [SRC]"ABC" || "ABC" [MSG]The String 'ABC' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 295 | [SRC]"ABC(#)" || "ABC" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 295 | [SRC]"ABC(#)" || "ABC" [MSG]The String 'ABC(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 295 | [SRC]"ABC(#)" || "ABC" [MSG]The String 'ABC' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 296 | [SRC]"ABC(#)(#)" || "ABC(#)" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 296 | [SRC]"ABC(#)(#)" || "ABC(#)" [MSG]The String 'ABC(#)(#)' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 296 | [SRC]"ABC(#)(#)" || "ABC(#)" [MSG]The String 'ABC(#)' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]class ImportRecordSpec extends Specification implements ..ortRecord> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 16 | [SRC]def cleanup() { [MSG]Violation in class ImportRecordSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 19 | [SRC]void "test domain not null and blank constraints"() { [MSG]Violation in class ImportRecordSpec. The method name test domain not null and blank constraints in class tech.muyan.importexport.ImportRecordSpec does not match [a-z]\w* |
MethodName | 2 | 36 | [SRC]void "test domain nullable constraints"() { [MSG]Violation in class ImportRecordSpec. The method name test domain nullable constraints in class tech.muyan.importexport.ImportRecordSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 12 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 12 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 16 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryBooleanExpression | 3 | 29 | [SRC]"domainClass" | null || "nullable" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 29 | [SRC]"domainClass" | null || "nullable" [MSG]The String 'domainClass' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 29 | [SRC]"domainClass" | null || "nullable" [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 30 | [SRC]"csvFileMD5" | "" || "blank" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 30 | [SRC]"csvFileMD5" | "" || "blank" [MSG]The String 'csvFileMD5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]"csvFileMD5" | "" || "blank" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]"csvFileMD5" | "" || "blank" [MSG]The String 'blank' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 31 | [SRC]"csvFileMD5" | null || "nullable" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 31 | [SRC]"csvFileMD5" | null || "nullable" [MSG]The String 'csvFileMD5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]"csvFileMD5" | null || "nullable" [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"status" | null | "nullable" [MSG]The String 'status' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 32 | [SRC]"status" | null | "nullable" [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"startDate" | null | "nullable" [MSG]The String 'startDate' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 33 | [SRC]"startDate" | null | "nullable" [MSG]The String 'nullable' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 45 | [SRC]"csvFileHeader" | null [MSG]The String 'csvFileHeader' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 46 | [SRC]"insertedIds" | null [MSG]The String 'insertedIds' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]"updatedIds" | null [MSG]The String 'updatedIds' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"failedLines" | null [MSG]The String 'failedLines' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]"skippedLines" | null [MSG]The String 'skippedLines' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"logs" | null [MSG]The String 'logs' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"insertedIds" | "" [MSG]The String 'insertedIds' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"insertedIds" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"updatedIds" | "" [MSG]The String 'updatedIds' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"updatedIds" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]"failedLines" | "" [MSG]The String 'failedLines' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]"failedLines" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]"skippedLines" | "" [MSG]The String 'skippedLines' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 54 | [SRC]"skippedLines" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 55 | [SRC]"logs" | "" [MSG]The String 'logs' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 55 | [SRC]"logs" | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 56 | [SRC]"finishDate" | null [MSG]The String 'finishDate' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 20 | [SRC]class ConverterFactoryTest extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 25 | [SRC]def "test registerConverter"() { [MSG]Violation in class ConverterFactoryTest. The method name test registerConverter in class tech.muyan.importexport.converter.ConverterFactoryTest does not match [a-z]\w* |
MethodName | 2 | 43 | [SRC]def "test no convert found"() { [MSG]Violation in class ConverterFactoryTest. The method name test no convert found in class tech.muyan.importexport.converter.ConverterFactoryTest does not match [a-z]\w* |
MethodName | 2 | 56 | [SRC]def "test converts throw exception"() { [MSG]Violation in class ConverterFactoryTest. The method name test converts throw exception in class tech.muyan.importexport.converter.ConverterFactoryTest does not match [a-z]\w* |
MethodName | 2 | 81 | [SRC]def "test convert values"() { [MSG]Violation in class ConverterFactoryTest. The method name test convert values in class tech.muyan.importexport.converter.ConverterFactoryTest does not match [a-z]\w* |
FieldTypeRequired | 3 | 23 | [SRC]def longValue = Integer.MAX_VALUE + 1 [MSG]The type is not specified for field "longValue" |
MethodReturnTypeRequired | 3 | 25 | [SRC]def "test registerConverter"() { [MSG]Method "test registerConverter" has a dynamic return type |
UnnecessaryGString | 3 | 30 | [SRC]return s.equals("abc") [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryReturnKeyword | 3 | 30 | [SRC]return s.equals("abc") [MSG]The return keyword is not needed and can be removed |
UnnecessaryReturnKeyword | 3 | 35 | [SRC]return sourceValue [MSG]The return keyword is not needed and can be removed |
UnnecessaryGString | 3 | 40 | [SRC]assert ConverterFactory.getConverter("abc") != null [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 43 | [SRC]def "test no convert found"() { [MSG]Method "test no convert found" has a dynamic return type |
UnnecessaryBooleanExpression | 3 | 52 | [SRC]"a.b.enums.c" || UnRecognizedTypeException [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 52 | [SRC]"a.b.enums.c" || UnRecognizedTypeException [MSG]The String 'a.b.enums.c' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 53 | [SRC]"java.lang.StringUTF16" || UnRecognizedTypeException [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 53 | [SRC]"java.lang.StringUTF16" || UnRecognizedTypeException [MSG]The String 'java.lang.StringUTF16' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 56 | [SRC]def "test converts throw exception"() { [MSG]Method "test converts throw exception" has a dynamic return type |
VariableTypeRequired | 3 | 58 | [SRC]def convert = ConverterFactory.getConverter(type) [MSG]The type is not specified for variable "convert" |
UnnecessaryGString | 3 | 64 | [SRC]convert.convert(input, type, "fieldName") [MSG]The String 'fieldName' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]"boolean" | "notBo..lueException [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 71 | [SRC]"boolean" | "notBo..lueException [MSG]The String 'notBoolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 72 | [SRC]"date" | "notDa..lueException [MSG]The String 'date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 72 | [SRC]"date" | "notDa..lueException [MSG]The String 'notDate' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 73 | [SRC]"decimal" | "notDe..lueException [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 73 | [SRC]"decimal" | "notDe..lueException [MSG]The String 'notDecimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 74 | [SRC]"tech.muyan.enums.LogicType" | "notVa..lueException [MSG]The String 'tech.muyan.enums.LogicType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 74 | [SRC]"tech.muyan.enums.LogicType" | "notVa..lueException [MSG]The String 'notValidValue' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"tech.muyan.importexport.converter.EnumForTest" | "opt3"..hodException [MSG]The String 'tech.muyan.importexport.converter.EnumForTest' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 75 | [SRC]"tech.muyan.importexport.converter.EnumForTest" | "opt3"..hodException [MSG]The String 'opt3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 76 | [SRC]"httpMethod" | "notVa..lueException [MSG]The String 'httpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 76 | [SRC]"httpMethod" | "notVa..lueException [MSG]The String 'notValidHttpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 77 | [SRC]"integer" | "notVa..lueException [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 77 | [SRC]"integer" | "notVa..lueException [MSG]The String 'notValidInteger' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 78 | [SRC]"long" | "notVa..lueException [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 78 | [SRC]"long" | "notVa..lueException [MSG]The String 'notValidLong' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 81 | [SRC]def "test convert values"() { [MSG]Method "test convert values" has a dynamic return type |
VariableTypeRequired | 3 | 83 | [SRC]def convert = ConverterFactory.getConverter(type) [MSG]The type is not specified for variable "convert" |
UnnecessaryGString | 3 | 87 | [SRC]assert convert.convert(input, type, "fieldName") == output [MSG]The String 'fieldName' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 91 | [SRC]"boolean" | "Y" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 91 | [SRC]"boolean" | "Y" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 91 | [SRC]"boolean" | "Y" .. || true [MSG]The String 'Y' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 92 | [SRC]"boolean" | "y" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 92 | [SRC]"boolean" | "y" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 92 | [SRC]"boolean" | "y" .. || true [MSG]The String 'y' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 93 | [SRC]"boolean" | "Yes" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 93 | [SRC]"boolean" | "Yes" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 93 | [SRC]"boolean" | "Yes" .. || true [MSG]The String 'Yes' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 94 | [SRC]"boolean" | "YES" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 94 | [SRC]"boolean" | "YES" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 94 | [SRC]"boolean" | "YES" .. || true [MSG]The String 'YES' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 95 | [SRC]"boolean" | "true" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 95 | [SRC]"boolean" | "true" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 95 | [SRC]"boolean" | "true" .. || true [MSG]The String 'true' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 96 | [SRC]"boolean" | "TRUE" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 96 | [SRC]"boolean" | "TRUE" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 96 | [SRC]"boolean" | "TRUE" .. || true [MSG]The String 'TRUE' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 97 | [SRC]"boolean" | "T" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 97 | [SRC]"boolean" | "T" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 97 | [SRC]"boolean" | "T" .. || true [MSG]The String 'T' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 98 | [SRC]"boolean" | "t" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 98 | [SRC]"boolean" | "t" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 98 | [SRC]"boolean" | "t" .. || true [MSG]The String 't' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 99 | [SRC]"boolean" | "是" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 99 | [SRC]"boolean" | "是" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 99 | [SRC]"boolean" | "是" .. || true [MSG]The String '是' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 100 | [SRC]"boolean" | "1" .. || true [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 100 | [SRC]"boolean" | "1" .. || true [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 100 | [SRC]"boolean" | "1" .. || true [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 101 | [SRC]"boolean" | "N" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 101 | [SRC]"boolean" | "N" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 101 | [SRC]"boolean" | "N" .. || false [MSG]The String 'N' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 102 | [SRC]"boolean" | "n" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 102 | [SRC]"boolean" | "n" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 102 | [SRC]"boolean" | "n" .. || false [MSG]The String 'n' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 103 | [SRC]"boolean" | "No" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 103 | [SRC]"boolean" | "No" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 103 | [SRC]"boolean" | "No" .. || false [MSG]The String 'No' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 104 | [SRC]"boolean" | "NO" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 104 | [SRC]"boolean" | "NO" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 104 | [SRC]"boolean" | "NO" .. || false [MSG]The String 'NO' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 105 | [SRC]"boolean" | "false" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 105 | [SRC]"boolean" | "false" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 105 | [SRC]"boolean" | "false" .. || false [MSG]The String 'false' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 106 | [SRC]"boolean" | "FALSE" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 106 | [SRC]"boolean" | "FALSE" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 106 | [SRC]"boolean" | "FALSE" .. || false [MSG]The String 'FALSE' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 107 | [SRC]"boolean" | "F" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 107 | [SRC]"boolean" | "F" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 107 | [SRC]"boolean" | "F" .. || false [MSG]The String 'F' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 108 | [SRC]"boolean" | "f" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 108 | [SRC]"boolean" | "f" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 108 | [SRC]"boolean" | "f" .. || false [MSG]The String 'f' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 109 | [SRC]"boolean" | "否" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 109 | [SRC]"boolean" | "否" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 109 | [SRC]"boolean" | "否" .. || false [MSG]The String '否' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 110 | [SRC]"boolean" | "0" .. || false [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 110 | [SRC]"boolean" | "0" .. || false [MSG]The String 'boolean' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 110 | [SRC]"boolean" | "0" .. || false [MSG]The String '0' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 111 | [SRC]"integer" | "1" .. || 1 [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 111 | [SRC]"integer" | "1" .. || 1 [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 111 | [SRC]"integer" | "1" .. || 1 [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 112 | [SRC]"integer" | "0" .. || 0 [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 112 | [SRC]"integer" | "0" .. || 0 [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 112 | [SRC]"integer" | "0" .. || 0 [MSG]The String '0' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 113 | [SRC]"integer" | String.valueOf..er.MAX_VALUE [MSG]The String 'integer' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 114 | [SRC]"long" | "1" .. || 1 [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 114 | [SRC]"long" | "1" .. || 1 [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 114 | [SRC]"long" | "1" .. || 1 [MSG]The String '1' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 115 | [SRC]"long" | "0" .. || 0 [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 115 | [SRC]"long" | "0" .. || 0 [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 115 | [SRC]"long" | "0" .. || 0 [MSG]The String '0' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 116 | [SRC]"long" | "-1" .. || -1 [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 116 | [SRC]"long" | "-1" .. || -1 [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 116 | [SRC]"long" | "-1" .. || -1 [MSG]The String '-1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 117 | [SRC]"long" | String.valueOf..|| longValue [MSG]The String 'long' can be wrapped in single quotes instead of double quotes |
UnnecessaryBigDecimalInstantiation | 3 | 118 | [SRC]"decimal" | "1.25" ..imal("1.25") [MSG]Can be rewritten as 1.25 or 1.25G |
UnnecessaryGString | 3 | 118 | [SRC]"decimal" | "1.25" ..imal("1.25") [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 118 | [SRC]"decimal" | "1.25" ..imal("1.25") [MSG]The String '1.25' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 118 | [SRC]"decimal" | "1.25" ..imal("1.25") [MSG]The String '1.25' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 119 | [SRC]"decimal" | "0" ..Decimal("0") [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 119 | [SRC]"decimal" | "0" ..Decimal("0") [MSG]The String '0' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 119 | [SRC]"decimal" | "0" ..Decimal("0") [MSG]The String '0' can be wrapped in single quotes instead of double quotes |
UnnecessaryBigDecimalInstantiation | 3 | 120 | [SRC]"decimal" | "0.15" ..imal("0.15") [MSG]Can be rewritten as 0.15 or 0.15G |
UnnecessaryGString | 3 | 120 | [SRC]"decimal" | "0.15" ..imal("0.15") [MSG]The String 'decimal' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 120 | [SRC]"decimal" | "0.15" ..imal("0.15") [MSG]The String '0.15' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 120 | [SRC]"decimal" | "0.15" ..imal("0.15") [MSG]The String '0.15' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 121 | [SRC]"string" | "" .. || "" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 121 | [SRC]"string" | "" .. || "" [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 121 | [SRC]"string" | "" .. || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 121 | [SRC]"string" | "" .. || "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 122 | [SRC]"string" | "abc" .. || "abc" [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 122 | [SRC]"string" | "abc" .. || "abc" [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 122 | [SRC]"string" | "abc" .. || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 122 | [SRC]"string" | "abc" .. || "abc" [MSG]The String 'abc' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 123 | [SRC]"string" | null .. || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 123 | [SRC]"string" | null .. || null [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryBooleanExpression | 3 | 124 | [SRC]"string" | "NULL" .. || null [MSG]The expression using || is compared to a constant |
UnnecessaryGString | 3 | 124 | [SRC]"string" | "NULL" .. || null [MSG]The String 'string' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 124 | [SRC]"string" | "NULL" .. || null [MSG]The String 'NULL' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 125 | [SRC]"date" | "2012-11-20" ..012, 11, 20) [MSG]The String 'date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 125 | [SRC]"date" | "2012-11-20" ..012, 11, 20) [MSG]The String '2012-11-20' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 126 | [SRC]"datetime" | "2012-11-20 11.. 11, 20, 01) [MSG]The String 'datetime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 126 | [SRC]"datetime" | "2012-11-20 11.. 11, 20, 01) [MSG]The String '2012-11-20 11:20:01' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 127 | [SRC]"date" | "2012/11/20" ..012, 11, 20) [MSG]The String 'date' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 127 | [SRC]"date" | "2012/11/20" ..012, 11, 20) [MSG]The String '2012/11/20' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 128 | [SRC]"datetime" | "2012/11/20 11.. 11, 20, 01) [MSG]The String 'datetime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 128 | [SRC]"datetime" | "2012/11/20 11.. 11, 20, 01) [MSG]The String '2012/11/20 11:20:01' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 129 | [SRC]"datetime" | "2012-11-20T11.., 108000000) [MSG]The String 'datetime' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 129 | [SRC]"datetime" | "2012-11-20T11.., 108000000) [MSG]The String '2012-11-20T11:20:01.108Z' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 130 | [SRC]"tech.muyan.enums.LogicType" | "Field depende..Type.DECIDES [MSG]The String 'tech.muyan.enums.LogicType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 130 | [SRC]"tech.muyan.enums.LogicType" | "Field depende..Type.DECIDES [MSG]The String 'Field dependencies logic' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]"tech.muyan.enums.DisplayComponentType" | "ABSTRACT_DATE..BSTRACT_DATE [MSG]The String 'tech.muyan.enums.DisplayComponentType' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 131 | [SRC]"tech.muyan.enums.DisplayComponentType" | "ABSTRACT_DATE..BSTRACT_DATE [MSG]The String 'ABSTRACT_DATE' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 132 | [SRC]"httpMethod" | "GET" ..tpMethod.GET [MSG]The String 'httpMethod' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 132 | [SRC]"httpMethod" | "GET" ..tpMethod.GET [MSG]The String 'GET' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]enum EnumForTest { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
FieldName | 2 | 9 | [SRC]Opt1, Opt2 [MSG]The fieldname Opt1 in class tech.muyan.importexport.converter.EnumForTest does not match [A-Z][A-Z0-9_]* |
FieldName | 2 | 9 | [SRC]Opt1, Opt2 [MSG]The fieldname Opt2 in class tech.muyan.importexport.converter.EnumForTest does not match [A-Z][A-Z0-9_]* |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class AuthenticationTokenSpec extends Specification impl..tionToken> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 8 | [SRC]def setup() { [MSG]Violation in class AuthenticationTokenSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 11 | [SRC]def cleanup() { [MSG]Violation in class AuthenticationTokenSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 14 | [SRC]void "test something"() { [MSG]Violation in class AuthenticationTokenSpec. The method name test something in class tech.muyan.security.AuthenticationTokenSpec does not match [a-z]\w* |
ComparisonOfTwoConstants | 2 | 16 | [SRC]true == true [MSG]Comparing two constants or constant literals is useless and may indicate a bug: (true == true) |
MethodReturnTypeRequired | 3 | 8 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 8 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 11 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 11 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGString | 3 | 15 | [SRC]expect: "fix me" [MSG]The String 'fix me' can be wrapped in single quotes instead of double quotes |
InvertedCondition | 3 | 16 | [SRC]true == true [MSG]true is a constant expression on the left side of a compare equals operation |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 12 | [SRC]class AuthorityHelperSpec extends Specification { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 14 | [SRC]def setup() { [MSG]Violation in class AuthorityHelperSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 17 | [SRC]def cleanup() { [MSG]Violation in class AuthorityHelperSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 20 | [SRC]def "check Authority"() { [MSG]Violation in class AuthorityHelperSpec. The method name check Authority in class tech.muyan.security.AuthorityHelperSpec does not match [a-z]\w* |
MethodName | 2 | 31 | [SRC]def "get object operate roles"() { [MSG]Violation in class AuthorityHelperSpec. The method name get object operate roles in class tech.muyan.security.AuthorityHelperSpec does not match [a-z]\w* |
UnusedVariable | 2 | 36 | [SRC]def first = [configAttribute: firstReturn] [MSG]The variable [first] in class tech.muyan.security.AuthorityHelperSpec is not used |
UnusedVariable | 2 | 37 | [SRC]def second = [configAttribute: secondReturn] [MSG]The variable [second] in class tech.muyan.security.AuthorityHelperSpec is not used |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.security; [MSG]Semicolons as line endings can be removed safely |
UnnecessaryGroovyImport | 3 | 5 | [SRC]import java.util.Collections |
UnusedImport | 3 | 5 | [SRC]import java.util.Collections [MSG]The [java.util.Collections] import is never referenced |
ImportFromSamePackage | 3 | 9 | [SRC]import tech.muyan.security.User |
MethodReturnTypeRequired | 3 | 14 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 14 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 17 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 17 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 20 | [SRC]def "check Authority"() { [MSG]Method "check Authority" has a dynamic return type |
VariableTypeRequired | 3 | 22 | [SRC]def auth = Mock(Authentication.class) [MSG]The type is not specified for variable "auth" |
UnnecessaryDotClass | 3 | 22 | [SRC]def auth = Mock(Authentication.class) [MSG]Authentication.class can be rewritten as Authentication |
VariableTypeRequired | 3 | 23 | [SRC]def roles = "" [MSG]The type is not specified for variable "roles" |
UnnecessaryGString | 3 | 23 | [SRC]def roles = "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 24 | [SRC]def result = AuthorityHelper.checkAuthority(auth, roles) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 31 | [SRC]def "get object operate roles"() { [MSG]Method "get object operate roles" has a dynamic return type |
VariableTypeRequired | 3 | 34 | [SRC]def userClazzName = User.getClass().getName() [MSG]The type is not specified for variable "userClazzName" |
UnnecessaryGetter | 3 | 34 | [SRC]def userClazzName = User.getClass().getName() [MSG]getName() can probably be rewritten as name |
VariableTypeRequired | 3 | 35 | [SRC]def userClazzSimpleName = User.getClass().getSimpleName() [MSG]The type is not specified for variable "userClazzSimpleName" |
UnnecessaryGetter | 3 | 35 | [SRC]def userClazzSimpleName = User.getClass().getSimpleName() [MSG]getSimpleName() can probably be rewritten as simpleName |
VariableTypeRequired | 3 | 36 | [SRC]def first = [configAttribute: firstReturn] [MSG]The type is not specified for variable "first" |
VariableTypeRequired | 3 | 37 | [SRC]def second = [configAttribute: secondReturn] [MSG]The type is not specified for variable "second" |
VariableTypeRequired | 3 | 40 | [SRC]def result = AuthorityHelper.getObjectOperateRoles(User...T, wildcard) [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 47 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 47 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role2,role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"/**" | true | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String '/**' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"/**" | true | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"/**" | true | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 48 | [SRC]"/**" | true | [configAttribute: "role1,role2"] | [..role1,role3" [MSG]The String 'role1,role2,role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]"" | false | null | [configAttribute: "r..role1,role3" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]"" | false | null | [configAttribute: "r..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 49 | [SRC]"" | false | null | [configAttribute: "r..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"" | false | [configAttribute: null]| [configAttr..role1,role3" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"" | false | [configAttribute: null]| [configAttr..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 50 | [SRC]"" | false | [configAttribute: null]| [configAttr..role1,role3" [MSG]The String 'role1,role3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"" | false | null | null | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]"" | false | null | null | "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"" | false | [configAttribute: "role1,role2"] | n..role1,role2" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"" | false | [configAttribute: "role1,role2"] | n..role1,role2" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 52 | [SRC]"" | false | [configAttribute: "role1,role2"] | n..role1,role2" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role2" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role2" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 53 | [SRC]"" | false | [configAttribute: "role1,role2"] | [..role1,role2" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class GroupRoleSpec extends Specification implements Dom..GroupRole> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 8 | [SRC]def setup() { [MSG]Violation in class GroupRoleSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 11 | [SRC]def cleanup() { [MSG]Violation in class GroupRoleSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 14 | [SRC]void "test equals"() { [MSG]Violation in class GroupRoleSpec. The method name test equals in class tech.muyan.security.GroupRoleSpec does not match [a-z]\w* |
ComparisonWithSelf | 2 | 26 | [SRC]gr1.equals(gr1) == true [MSG]Comparing an object to itself is useless and may indicate a bug: gr1.equals(gr1) |
MethodName | 2 | 32 | [SRC]void "test create group role and remove"() { [MSG]Violation in class GroupRoleSpec. The method name test create group role and remove in class tech.muyan.security.GroupRoleSpec does not match [a-z]\w* |
MethodName | 2 | 53 | [SRC]void "test remove all by group"() { [MSG]Violation in class GroupRoleSpec. The method name test remove all by group in class tech.muyan.security.GroupRoleSpec does not match [a-z]\w* |
MethodName | 2 | 77 | [SRC]void "test remove all by role"() { [MSG]Violation in class GroupRoleSpec. The method name test remove all by role in class tech.muyan.security.GroupRoleSpec does not match [a-z]\w* |
MethodName | 2 | 101 | [SRC]void "test getAuthorities"() { [MSG]Violation in class GroupRoleSpec. The method name test getAuthorities in class tech.muyan.security.GroupRoleSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 8 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 8 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 11 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 11 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
NoDef | 3 | 16 | [SRC]def r1 = new Role(id: 1, authority: "role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 16 | [SRC]def r1 = new Role(id: 1, authority: "role1") [MSG]The type is not specified for variable "r1" |
UnnecessaryGString | 3 | 16 | [SRC]def r1 = new Role(id: 1, authority: "role1") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 18 | [SRC]def r2 = new Role(id: 1, authority: "role2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 18 | [SRC]def r2 = new Role(id: 1, authority: "role2") [MSG]The type is not specified for variable "r2" |
UnnecessaryGString | 3 | 18 | [SRC]def r2 = new Role(id: 1, authority: "role2") [MSG]The String 'role2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 20 | [SRC]def g1 = new Group(id: 1, name: "group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 20 | [SRC]def g1 = new Group(id: 1, name: "group1") [MSG]The type is not specified for variable "g1" |
UnnecessaryGString | 3 | 20 | [SRC]def g1 = new Group(id: 1, name: "group1") [MSG]The String 'group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 22 | [SRC]def gr1 = new GroupRole(role: r1, group: g1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 22 | [SRC]def gr1 = new GroupRole(role: r1, group: g1) [MSG]The type is not specified for variable "gr1" |
NoDef | 3 | 23 | [SRC]def gr2 = new GroupRole(role: r2, group: g1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 23 | [SRC]def gr2 = new GroupRole(role: r2, group: g1) [MSG]The type is not specified for variable "gr2" |
UnnecessaryGString | 3 | 29 | [SRC]gr1.equals("") == false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 34 | [SRC]def role = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 34 | [SRC]def role = new Role(authority: "Role1") [MSG]The type is not specified for variable "role" |
UnnecessaryGString | 3 | 34 | [SRC]def role = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 36 | [SRC]def group = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 36 | [SRC]def group = new Group(name: "Group1") [MSG]The type is not specified for variable "group" |
UnnecessaryGString | 3 | 36 | [SRC]def group = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 45 | [SRC]def success = GroupRole.remove(group, role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 45 | [SRC]def success = GroupRole.remove(group, role) [MSG]The type is not specified for variable "success" |
NoDef | 3 | 55 | [SRC]def role1 = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 55 | [SRC]def role1 = new Role(authority: "Role1") [MSG]The type is not specified for variable "role1" |
UnnecessaryGString | 3 | 55 | [SRC]def role1 = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 57 | [SRC]def role2 = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 57 | [SRC]def role2 = new Role(authority: "Role1") [MSG]The type is not specified for variable "role2" |
UnnecessaryGString | 3 | 57 | [SRC]def role2 = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 60 | [SRC]def group = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 60 | [SRC]def group = new Group(name: "Group1") [MSG]The type is not specified for variable "group" |
UnnecessaryGString | 3 | 60 | [SRC]def group = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 70 | [SRC]def removed = GroupRole.removeAll(group) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 70 | [SRC]def removed = GroupRole.removeAll(group) [MSG]The type is not specified for variable "removed" |
NoDef | 3 | 79 | [SRC]def role = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 79 | [SRC]def role = new Role(authority: "Role1") [MSG]The type is not specified for variable "role" |
UnnecessaryGString | 3 | 79 | [SRC]def role = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 82 | [SRC]def group1 = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 82 | [SRC]def group1 = new Group(name: "Group1") [MSG]The type is not specified for variable "group1" |
UnnecessaryGString | 3 | 82 | [SRC]def group1 = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 84 | [SRC]def group2 = new Group(name: "Group2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 84 | [SRC]def group2 = new Group(name: "Group2") [MSG]The type is not specified for variable "group2" |
UnnecessaryGString | 3 | 84 | [SRC]def group2 = new Group(name: "Group2") [MSG]The String 'Group2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 94 | [SRC]def removed = GroupRole.removeAll(role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 94 | [SRC]def removed = GroupRole.removeAll(role) [MSG]The type is not specified for variable "removed" |
NoDef | 3 | 103 | [SRC]def g1 = new Group(name: "group") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 103 | [SRC]def g1 = new Group(name: "group") [MSG]The type is not specified for variable "g1" |
UnnecessaryGString | 3 | 103 | [SRC]def g1 = new Group(name: "group") [MSG]The String 'group' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 106 | [SRC]def r1 = new Role(authority: "role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 106 | [SRC]def r1 = new Role(authority: "role1") [MSG]The type is not specified for variable "r1" |
UnnecessaryGString | 3 | 106 | [SRC]def r1 = new Role(authority: "role1") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 107 | [SRC]def r2 = new Role(authority: "role2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 107 | [SRC]def r2 = new Role(authority: "role2") [MSG]The type is not specified for variable "r2" |
UnnecessaryGString | 3 | 107 | [SRC]def r2 = new Role(authority: "role2") [MSG]The String 'role2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 108 | [SRC]def r3 = new Role(authority: "role3") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 108 | [SRC]def r3 = new Role(authority: "role3") [MSG]The type is not specified for variable "r3" |
UnnecessaryGString | 3 | 108 | [SRC]def r3 = new Role(authority: "role3") [MSG]The String 'role3' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 113 | [SRC]def gr1 = new GroupRole(group: g1, role: r1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 113 | [SRC]def gr1 = new GroupRole(group: g1, role: r1) [MSG]The type is not specified for variable "gr1" |
NoDef | 3 | 114 | [SRC]def gr2 = new GroupRole(group: g1, role: r2) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 114 | [SRC]def gr2 = new GroupRole(group: g1, role: r2) [MSG]The type is not specified for variable "gr2" |
NoDef | 3 | 115 | [SRC]def gr3 = new GroupRole(group: g1, role: r3) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 115 | [SRC]def gr3 = new GroupRole(group: g1, role: r3) [MSG]The type is not specified for variable "gr3" |
NoDef | 3 | 122 | [SRC]def roles = Group.findByName("group").getAuthorities() [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 122 | [SRC]def roles = Group.findByName("group").getAuthorities() [MSG]The type is not specified for variable "roles" |
UnnecessaryGetter | 3 | 122 | [SRC]def roles = Group.findByName("group").getAuthorities() [MSG]getAuthorities() can probably be rewritten as authorities |
UnnecessaryGString | 3 | 122 | [SRC]def roles = Group.findByName("group").getAuthorities() [MSG]The String 'group' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class RequestMapSpec extends Specification implements Do..equestMap> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 12 | [SRC]def setup() { [MSG]Violation in class RequestMapSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 15 | [SRC]def cleanup() { [MSG]Violation in class RequestMapSpec. The method cleanup is both empty and not marked with @Override |
MethodName | 2 | 18 | [SRC]def "test render"(){ [MSG]Violation in class RequestMapSpec. The method name test render in class tech.muyan.security.RequestMapSpec does not match [a-z]\w* |
UnusedVariable | 2 | 21 | [SRC]Role r1 = Mock(Role.class) [MSG]The variable [r1] in class tech.muyan.security.RequestMapSpec is not used |
MethodName | 2 | 38 | [SRC]def "test after create/update hook"() { [MSG]Violation in class RequestMapSpec. The method name test after create/update hook in class tech.muyan.security.RequestMapSpec does not match [a-z]\w* |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.security; [MSG]Semicolons as line endings can be removed safely |
MethodReturnTypeRequired | 3 | 12 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 12 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 15 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 15 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 18 | [SRC]def "test render"(){ [MSG]Method "test render" has a dynamic return type |
UnnecessaryDotClass | 3 | 21 | [SRC]Role r1 = Mock(Role.class) [MSG]Role.class can be rewritten as Role |
UnnecessaryGString | 3 | 22 | [SRC]1 * Role.findByAuthority("role1") >> [id: 2] [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]RequestMap rm = new RequestMap(configAttribute: "role1",.. url: "url") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 23 | [SRC]RequestMap rm = new RequestMap(configAttribute: "role1",.. url: "url") [MSG]The String 'url' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 27 | [SRC]def result = rm.render() [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 31 | [SRC]result.url == "url" [MSG]The String 'url' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 38 | [SRC]def "test after create/update hook"() { [MSG]Method "test after create/update hook" has a dynamic return type |
VariableTypeRequired | 3 | 40 | [SRC]def sss = Mock(SpringSecurityService.class) [MSG]The type is not specified for variable "sss" |
UnnecessaryDotClass | 3 | 40 | [SRC]def sss = Mock(SpringSecurityService.class) [MSG]SpringSecurityService.class can be rewritten as SpringSecurityService |
UnnecessaryGString | 3 | 41 | [SRC]RequestMap rm = new RequestMap(configAttribute: "role1",.. url: "url") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 41 | [SRC]RequestMap rm = new RequestMap(configAttribute: "role1",.. url: "url") [MSG]The String 'url' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]rm.configAttribute = "role1,role2" [MSG]The String 'role1,role2' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 6 | [SRC]class RoleSpec extends Specification implements DomainUnitTest<Role> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
MethodName | 2 | 8 | [SRC]void "test create new Role"() { [MSG]Violation in class RoleSpec. The method name test create new Role in class tech.muyan.security.RoleSpec does not match [a-z]\w* |
NoDef | 3 | 10 | [SRC]def r1 = new Role(authority: "role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 10 | [SRC]def r1 = new Role(authority: "role1") [MSG]The type is not specified for variable "r1" |
UnnecessaryGString | 3 | 10 | [SRC]def r1 = new Role(authority: "role1") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 14 | [SRC]def role = Role.findByAuthority("role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 14 | [SRC]def role = Role.findByAuthority("role1") [MSG]The type is not specified for variable "role" |
UnnecessaryGString | 3 | 14 | [SRC]def role = Role.findByAuthority("role1") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 10 | [SRC]class UserGroupSpec extends Specification implements Dom..UserGroup> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 12 | [SRC]def setup() { [MSG]Violation in class UserGroupSpec. The method setup is both empty and not marked with @Override |
MethodName | 2 | 22 | [SRC]void "test equals"() { [MSG]Violation in class UserGroupSpec. The method name test equals in class tech.muyan.security.UserGroupSpec does not match [a-z]\w* |
ComparisonWithSelf | 2 | 44 | [SRC]ug1.equals(ug1) == true [MSG]Comparing an object to itself is useless and may indicate a bug: ug1.equals(ug1) |
MethodName | 2 | 50 | [SRC]void "test create user group and remove"() { [MSG]Violation in class UserGroupSpec. The method name test create user group and remove in class tech.muyan.security.UserGroupSpec does not match [a-z]\w* |
MethodName | 2 | 81 | [SRC]void "test remove all by user"() { [MSG]Violation in class UserGroupSpec. The method name test remove all by user in class tech.muyan.security.UserGroupSpec does not match [a-z]\w* |
MethodName | 2 | 112 | [SRC]void "test remove all by group"() { [MSG]Violation in class UserGroupSpec. The method name test remove all by group in class tech.muyan.security.UserGroupSpec does not match [a-z]\w* |
ImportFromSamePackage | 3 | 6 | [SRC]import tech.muyan.security.User |
ImportFromSamePackage | 3 | 7 | [SRC]import tech.muyan.security.Group |
ImportFromSamePackage | 3 | 8 | [SRC]import tech.muyan.security.UserGroup |
MethodReturnTypeRequired | 3 | 12 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 12 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 15 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 15 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGetter | 3 | 16 | [SRC]UserGroup.deleteAll(UserGroup.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 17 | [SRC]Group.deleteAll(Group.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 18 | [SRC]User.deleteAll(User.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 19 | [SRC]Organization.deleteAll(Organization.getAll()) [MSG]getAll() can probably be rewritten as all |
NoDef | 3 | 24 | [SRC]def g1 = new Group(name: "group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 24 | [SRC]def g1 = new Group(name: "group1") [MSG]The type is not specified for variable "g1" |
UnnecessaryGString | 3 | 24 | [SRC]def g1 = new Group(name: "group1") [MSG]The String 'group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 27 | [SRC]def g2 = new Group(name: "group2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def g2 = new Group(name: "group2") [MSG]The type is not specified for variable "g2" |
UnnecessaryGString | 3 | 27 | [SRC]def g2 = new Group(name: "group2") [MSG]The String 'group2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 30 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 30 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 30 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 33 | [SRC]def u1 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 33 | [SRC]def u1 = new User( [MSG]The type is not specified for variable "u1" |
UnnecessaryGString | 3 | 34 | [SRC]username: "user1", password: "password", [MSG]The String 'user1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]username: "user1", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 40 | [SRC]def ug1 = new UserGroup(group: g1, user: u1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 40 | [SRC]def ug1 = new UserGroup(group: g1, user: u1) [MSG]The type is not specified for variable "ug1" |
NoDef | 3 | 41 | [SRC]def ug2 = new UserGroup(group: g2, user: u1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 41 | [SRC]def ug2 = new UserGroup(group: g2, user: u1) [MSG]The type is not specified for variable "ug2" |
UnnecessaryGString | 3 | 47 | [SRC]ug1.equals("") == false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 53 | [SRC]def group = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 53 | [SRC]def group = new Group(name: "Group1") [MSG]The type is not specified for variable "group" |
UnnecessaryGString | 3 | 53 | [SRC]def group = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 56 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 56 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 56 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 59 | [SRC]def user = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 59 | [SRC]def user = new User( [MSG]The type is not specified for variable "user" |
UnnecessaryGString | 3 | 60 | [SRC]username: "user2", password: "password", [MSG]The String 'user2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 60 | [SRC]username: "user2", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 73 | [SRC]def success = UserGroup.remove(user, group) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 73 | [SRC]def success = UserGroup.remove(user, group) [MSG]The type is not specified for variable "success" |
NoDef | 3 | 83 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 83 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 83 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 86 | [SRC]def group1 = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 86 | [SRC]def group1 = new Group(name: "Group1") [MSG]The type is not specified for variable "group1" |
UnnecessaryGString | 3 | 86 | [SRC]def group1 = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 88 | [SRC]def group2 = new Group(name: "Group2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 88 | [SRC]def group2 = new Group(name: "Group2") [MSG]The type is not specified for variable "group2" |
UnnecessaryGString | 3 | 88 | [SRC]def group2 = new Group(name: "Group2") [MSG]The String 'Group2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 91 | [SRC]def user = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 91 | [SRC]def user = new User( [MSG]The type is not specified for variable "user" |
UnnecessaryGString | 3 | 92 | [SRC]username: "user3", password: "password", [MSG]The String 'user3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 92 | [SRC]username: "user3", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 105 | [SRC]def removed = UserGroup.removeAll(user) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 105 | [SRC]def removed = UserGroup.removeAll(user) [MSG]The type is not specified for variable "removed" |
NoDef | 3 | 114 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 114 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 114 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 117 | [SRC]def group = new Group(name: "Group1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 117 | [SRC]def group = new Group(name: "Group1") [MSG]The type is not specified for variable "group" |
UnnecessaryGString | 3 | 117 | [SRC]def group = new Group(name: "Group1") [MSG]The String 'Group1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 120 | [SRC]def user1 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 120 | [SRC]def user1 = new User( [MSG]The type is not specified for variable "user1" |
UnnecessaryGString | 3 | 121 | [SRC]username: "user4", password: "password", [MSG]The String 'user4' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 121 | [SRC]username: "user4", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 127 | [SRC]def user2 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 127 | [SRC]def user2 = new User( [MSG]The type is not specified for variable "user2" |
UnnecessaryGString | 3 | 128 | [SRC]username: "user5", password: "password", [MSG]The String 'user5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 128 | [SRC]username: "user5", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 141 | [SRC]def removed = UserGroup.removeAll(group) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 141 | [SRC]def removed = UserGroup.removeAll(group) [MSG]The type is not specified for variable "removed" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 7 | [SRC]class UserRoleSpec extends Specification implements Doma..<UserRole> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 9 | [SRC]def setup() { [MSG]Violation in class UserRoleSpec. The method setup is both empty and not marked with @Override |
MethodName | 2 | 19 | [SRC]void "test equals"() { [MSG]Violation in class UserRoleSpec. The method name test equals in class tech.muyan.security.UserRoleSpec does not match [a-z]\w* |
ComparisonWithSelf | 2 | 41 | [SRC]ur1.equals(ur1) == true [MSG]Comparing an object to itself is useless and may indicate a bug: ur1.equals(ur1) |
MethodName | 2 | 47 | [SRC]void "test create user role and remove"() { [MSG]Violation in class UserRoleSpec. The method name test create user role and remove in class tech.muyan.security.UserRoleSpec does not match [a-z]\w* |
MethodName | 2 | 78 | [SRC]void "test remove all by user"() { [MSG]Violation in class UserRoleSpec. The method name test remove all by user in class tech.muyan.security.UserRoleSpec does not match [a-z]\w* |
MethodName | 2 | 109 | [SRC]void "test remove all by role"() { [MSG]Violation in class UserRoleSpec. The method name test remove all by role in class tech.muyan.security.UserRoleSpec does not match [a-z]\w* |
MethodReturnTypeRequired | 3 | 9 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 9 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 12 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 12 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
UnnecessaryGetter | 3 | 13 | [SRC]UserRole.deleteAll(UserRole.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 14 | [SRC]Role.deleteAll(Role.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 15 | [SRC]User.deleteAll(User.getAll()) [MSG]getAll() can probably be rewritten as all |
UnnecessaryGetter | 3 | 16 | [SRC]Organization.deleteAll(Organization.getAll()) [MSG]getAll() can probably be rewritten as all |
NoDef | 3 | 21 | [SRC]def r1 = new Role(authority: "role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 21 | [SRC]def r1 = new Role(authority: "role1") [MSG]The type is not specified for variable "r1" |
UnnecessaryGString | 3 | 21 | [SRC]def r1 = new Role(authority: "role1") [MSG]The String 'role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 24 | [SRC]def r2 = new Role(authority: "role2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 24 | [SRC]def r2 = new Role(authority: "role2") [MSG]The type is not specified for variable "r2" |
UnnecessaryGString | 3 | 24 | [SRC]def r2 = new Role(authority: "role2") [MSG]The String 'role2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 27 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 27 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 27 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 30 | [SRC]def u1 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 30 | [SRC]def u1 = new User( [MSG]The type is not specified for variable "u1" |
UnnecessaryGString | 3 | 31 | [SRC]username: "user1", password: "password", [MSG]The String 'user1' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 31 | [SRC]username: "user1", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 37 | [SRC]def ur1 = new UserRole(role: r1, user: u1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 37 | [SRC]def ur1 = new UserRole(role: r1, user: u1) [MSG]The type is not specified for variable "ur1" |
NoDef | 3 | 38 | [SRC]def ur2 = new UserRole(role: r2, user: u1) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 38 | [SRC]def ur2 = new UserRole(role: r2, user: u1) [MSG]The type is not specified for variable "ur2" |
UnnecessaryGString | 3 | 44 | [SRC]ur1.equals("") == false [MSG]The String '' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 50 | [SRC]def role = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 50 | [SRC]def role = new Role(authority: "Role1") [MSG]The type is not specified for variable "role" |
UnnecessaryGString | 3 | 50 | [SRC]def role = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 53 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 53 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 53 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 56 | [SRC]def user = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 56 | [SRC]def user = new User( [MSG]The type is not specified for variable "user" |
UnnecessaryGString | 3 | 57 | [SRC]username: "user2", password: "password", [MSG]The String 'user2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 57 | [SRC]username: "user2", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 70 | [SRC]def success = UserRole.remove(user, role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 70 | [SRC]def success = UserRole.remove(user, role) [MSG]The type is not specified for variable "success" |
NoDef | 3 | 80 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 80 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 80 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 83 | [SRC]def role1 = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 83 | [SRC]def role1 = new Role(authority: "Role1") [MSG]The type is not specified for variable "role1" |
UnnecessaryGString | 3 | 83 | [SRC]def role1 = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 85 | [SRC]def role2 = new Role(authority: "Role2") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 85 | [SRC]def role2 = new Role(authority: "Role2") [MSG]The type is not specified for variable "role2" |
UnnecessaryGString | 3 | 85 | [SRC]def role2 = new Role(authority: "Role2") [MSG]The String 'Role2' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 88 | [SRC]def user = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 88 | [SRC]def user = new User( [MSG]The type is not specified for variable "user" |
UnnecessaryGString | 3 | 89 | [SRC]username: "user3", password: "password", [MSG]The String 'user3' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 89 | [SRC]username: "user3", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 102 | [SRC]def removed = UserRole.removeAll(user) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 102 | [SRC]def removed = UserRole.removeAll(user) [MSG]The type is not specified for variable "removed" |
NoDef | 3 | 111 | [SRC]def org = new Organization(name: "Test Organization") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 111 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The type is not specified for variable "org" |
UnnecessaryGString | 3 | 111 | [SRC]def org = new Organization(name: "Test Organization") [MSG]The String 'Test Organization' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 114 | [SRC]def role = new Role(authority: "Role1") [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 114 | [SRC]def role = new Role(authority: "Role1") [MSG]The type is not specified for variable "role" |
UnnecessaryGString | 3 | 114 | [SRC]def role = new Role(authority: "Role1") [MSG]The String 'Role1' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 117 | [SRC]def user1 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 117 | [SRC]def user1 = new User( [MSG]The type is not specified for variable "user1" |
UnnecessaryGString | 3 | 118 | [SRC]username: "user4", password: "password", [MSG]The String 'user4' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 118 | [SRC]username: "user4", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 124 | [SRC]def user2 = new User( [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 124 | [SRC]def user2 = new User( [MSG]The type is not specified for variable "user2" |
UnnecessaryGString | 3 | 125 | [SRC]username: "user5", password: "password", [MSG]The String 'user5' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 125 | [SRC]username: "user5", password: "password", [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
NoDef | 3 | 138 | [SRC]def removed = UserRole.removeAll(role) [MSG]def for declaration should not be used |
VariableTypeRequired | 3 | 138 | [SRC]def removed = UserRole.removeAll(role) [MSG]The type is not specified for variable "removed" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
CompileStatic | 2 | 11 | [SRC]class UserSpec extends Specification implements DomainUn..UserGroup> { [MSG]Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic |
EmptyMethod | 2 | 13 | [SRC]def setup() { [MSG]Violation in class UserSpec. The method setup is both empty and not marked with @Override |
EmptyMethod | 2 | 16 | [SRC]def cleanup() { [MSG]Violation in class UserSpec. The method cleanup is both empty and not marked with @Override |
FactoryMethodName | 2 | 19 | [SRC]def "create user with username and password"() { [MSG]Violation in class UserSpec. The method 'create user with username and password' matches the regular expression /(build.*|create.*)/ and does not appear in a class matching /*.Builder/ |
MethodName | 2 | 19 | [SRC]def "create user with username and password"() { [MSG]Violation in class UserSpec. The method name create user with username and password in class tech.muyan.security.UserSpec does not match [a-z]\w* |
MethodName | 2 | 28 | [SRC]def "test before insert"() { [MSG]Violation in class UserSpec. The method name test before insert in class tech.muyan.security.UserSpec does not match [a-z]\w* |
MethodName | 2 | 49 | [SRC]def "test render user"() { [MSG]Violation in class UserSpec. The method name test render user in class tech.muyan.security.UserSpec does not match [a-z]\w* |
UnnecessarySemicolon | 3 | 1 | [SRC]package tech.muyan.security; [MSG]Semicolons as line endings can be removed safely |
UnnecessaryGroovyImport | 3 | 6 | [SRC]import java.util.Arrays; |
UnusedImport | 3 | 6 | [SRC]import java.util.Arrays; [MSG]The [java.util.Arrays] import is never referenced |
UnnecessarySemicolon | 3 | 6 | [SRC]import java.util.Arrays; [MSG]Semicolons as line endings can be removed safely |
MethodReturnTypeRequired | 3 | 13 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
NoDef | 3 | 13 | [SRC]def setup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 16 | [SRC]def cleanup() { [MSG]Method "cleanup" has a dynamic return type |
NoDef | 3 | 16 | [SRC]def cleanup() { [MSG]def for method return type should not be used |
MethodReturnTypeRequired | 3 | 19 | [SRC]def "create user with username and password"() { [MSG]Method "create user with username and password" has a dynamic return type |
UnnecessaryGString | 3 | 21 | [SRC]User u = new User("username", "password") [MSG]The String 'username' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 21 | [SRC]User u = new User("username", "password") [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 24 | [SRC]u.username == "username" [MSG]The String 'username' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 25 | [SRC]u.password == "password" [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
MethodReturnTypeRequired | 3 | 28 | [SRC]def "test before insert"() { [MSG]Method "test before insert" has a dynamic return type |
UnnecessaryGString | 3 | 30 | [SRC]User u = new User("username", "password") [MSG]The String 'username' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 30 | [SRC]User u = new User("username", "password") [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 34 | [SRC]u.username == "username" [MSG]The String 'username' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 35 | [SRC]u.password == "password" [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]User u2 = new User("username2", "password") [MSG]The String 'username2' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 40 | [SRC]User u2 = new User("username2", "password") [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 42 | [SRC]def userGroups = u2.getAuthorities() [MSG]The type is not specified for variable "userGroups" |
UnnecessaryGetter | 3 | 42 | [SRC]def userGroups = u2.getAuthorities() [MSG]getAuthorities() can probably be rewritten as authorities |
MethodReturnTypeRequired | 3 | 49 | [SRC]def "test render user"() { [MSG]Method "test render user" has a dynamic return type |
UnnecessaryGString | 3 | 51 | [SRC]User u = new User("username_render", "password") [MSG]The String 'username_render' can be wrapped in single quotes instead of double quotes |
UnnecessaryGString | 3 | 51 | [SRC]User u = new User("username_render", "password") [MSG]The String 'password' can be wrapped in single quotes instead of double quotes |
VariableTypeRequired | 3 | 53 | [SRC]def result = u.render() [MSG]The type is not specified for variable "result" |
UnnecessaryGString | 3 | 62 | [SRC]result.username == "username_render" [MSG]The String 'username_render' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 62 | [SRC]result.username == "username_render" [MSG]The code could be more concise by using a with() or identity() block |
UnnecessaryGString | 3 | 63 | [SRC]result.password == "" [MSG]The String '' can be wrapped in single quotes instead of double quotes |
UnnecessaryObjectReferences | 3 | 63 | [SRC]result.password == "" [MSG]The code could be more concise by using a with() or identity() block |