Skip to content

Files

Latest commit

 

History

History
26 lines (17 loc) · 682 Bytes

FieldTypeRequired.md

File metadata and controls

26 lines (17 loc) · 682 Bytes

Pattern: Missing explicit field type

Issue: -

Description

Checks that field types are explicitly specified (and not using def).

Example of violations:

class MyClass {
    public static final NAME = "joe"        // violation
    private static count = 0                // violation

    private def name = NAME                 // violation
    protected final date = new Date()       // violation

    def defaultName                         // violation
    def maxSoFar = -1L                      // violation
}

Further Reading